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

2019-09-11 Thread VMware
On 9/11/19 3:27 PM, Lendacky, Thomas wrote: On 9/11/19 7:40 AM, Thomas Hellström (VMware) wrote: 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()) (mprotec

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

2019-09-11 Thread Lendacky, Thomas
On 9/11/19 7:40 AM, Thomas Hellström (VMware) wrote: > 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 val

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

2019-09-11 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 pr