Re: [PATCH v3 1/2] x86: Don't let pgprot_modify() change the page encryption bit

2019-10-01 Thread Dave Hansen
On 9/30/19 10:54 PM, Thomas Hellstrom wrote: > Hi, > > On 9/18/19 7:57 PM, Dave Hansen wrote: >> On 9/17/19 6:01 AM, Thomas Hellström (VMware) wrote: >>> diff --git a/arch/x86/include/asm/pgtable_types.h >>> b/arch/x86/include/asm/pgtable_types.h >>> index b5e49e6bac63..8267dd426b15 100644 >>>

Re: [PATCH v3 1/2] x86: Don't let pgprot_modify() change the page encryption bit

2019-09-30 Thread Thomas Hellstrom
Hi, On 9/18/19 7:57 PM, Dave Hansen wrote: > On 9/17/19 6:01 AM, Thomas Hellström (VMware) wrote: >> diff --git a/arch/x86/include/asm/pgtable_types.h >> b/arch/x86/include/asm/pgtable_types.h >> index b5e49e6bac63..8267dd426b15 100644 >> --- a/arch/x86/include/asm/pgtable_types.h >> +++

Re: [PATCH v3 1/2] x86: Don't let pgprot_modify() change the page encryption bit

2019-09-18 Thread Dave Hansen
On 9/17/19 6:01 AM, Thomas Hellström (VMware) wrote: > diff --git a/arch/x86/include/asm/pgtable_types.h > b/arch/x86/include/asm/pgtable_types.h > index b5e49e6bac63..8267dd426b15 100644 > --- a/arch/x86/include/asm/pgtable_types.h > +++ b/arch/x86/include/asm/pgtable_types.h > @@ -123,7 +123,7

[PATCH v3 1/2] x86: Don't let pgprot_modify() change the page encryption bit

2019-09-17 Thread VMware
From: Thomas Hellstrom When SEV or SME is enabled and active, vm_get_page_prot() typically returns with the encryption bit set. This means that users of pgprot_modify(, vm_get_page_prot()) (mprotect_fixup, do_mmap) end up with a value of vma->vm_pg_prot that is not consistent with the intended