X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=mm%2Fmprotect.c;h=7967825f6d3352b3b57ccd23018d461d41498b78;hb=e5b7d90fd09dd5db2ca91dd716e721e51c9a861f;hp=675e5d34a5077303648f72bb2af9439449d9544c;hpb=3c6a6910a81eae3566bb5fef6ea0f624382595e6;p=linux.git diff --git a/mm/mprotect.c b/mm/mprotect.c index 675e5d34a507..7967825f6d33 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -459,6 +459,8 @@ static int do_mprotect_pkey(unsigned long start, size_t len, const bool rier = (current->personality & READ_IMPLIES_EXEC) && (prot & PROT_READ); + start = untagged_addr(start); + prot &= ~(PROT_GROWSDOWN|PROT_GROWSUP); if (grows == (PROT_GROWSDOWN|PROT_GROWSUP)) /* can't be both */ return -EINVAL;