Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698493

Re: [PATCH v1 2/2] acpi, x86: Remove encryption mask from ACPI page protection type

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v1 2/2] acpi, x86: Remove encryption mask from ACPI page protection type
Date 2017-07-28 08:30 +0200
Message-ID <u86WC-6A-7@gated-at.bofh.it> (permalink)
References <u7Lfs-37f-13@gated-at.bofh.it> <u7LyO-3dv-23@gated-at.bofh.it> <u7SgY-7jy-47@gated-at.bofh.it> <u86WC-6A-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Tom Lendacky <thomas.lendacky@amd.com> wrote:

> > > +	 * in memory in an encrypted state so return a protection attribute
> > > +	 * that does not have the encryption bit set.
> > >   	 */
> > > -	 return PAGE_KERNEL;
> > > +	 return sme_active() ? PAGE_KERNEL_IO : PAGE_KERNEL;
> > 
> > Why isn't there a PAGE_KERNEL_NOENC define which you can simply return
> > instead of testing?
> 
> Sounds like something I should add to pgtable_types.h (which has a
> #define for PAGE_KERNEL_EXEC_NOENC, but not PAGE_KERNEL_NOENC). I'll
> create that #define.
> 
> As for the sme_active() check I was getting ahead of myself since
> under SEV the encryption mask is needed.  I'll change it to just
> return PAGE_KERNEL_NOENC and then worry about the SEV change in
> the SEV patches.

Ok, that works for me too, as we at least don't sprinke the code with repeated 
sme_active() toggles.

Thanks,

	Ingo

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v1 2/2] acpi, x86: Remove encryption mask from ACPI page  protection type Borislav Petkov <bp@alien8.de> - 2017-07-27 16:50 +0200
  Re: [PATCH v1 2/2] acpi, x86: Remove encryption mask from ACPI page  protection type Ingo Molnar <mingo@kernel.org> - 2017-07-28 08:30 +0200

csiph-web