mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
mm: Clear arch specific VM flags on protection change
When protection bits are changed on a VMA, some of the architecture specific flags should be cleared as well. An examples of this are the PKEY flags on x86. This patch expands the current code that clears PKEY flags for x86, to support similar functionality for other architectures as well. Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com> Cc: Khalid Aziz <khalid@gonehiking.org> Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9035cf9a97
commit
2c2d57b5e7
@@ -475,7 +475,7 @@ static int do_mprotect_pkey(unsigned long start, size_t len,
|
||||
* cleared from the VMA.
|
||||
*/
|
||||
mask_off_old_flags = VM_READ | VM_WRITE | VM_EXEC |
|
||||
ARCH_VM_PKEY_FLAGS;
|
||||
VM_FLAGS_CLEAR;
|
||||
|
||||
new_vma_pkey = arch_override_mprotect_pkey(vma, prot, pkey);
|
||||
newflags = calc_vm_prot_bits(prot, new_vma_pkey);
|
||||
|
Reference in New Issue
Block a user