On 04/06/2018 05:09 PM, Ram Pai wrote:
>> -    /*
>> -     * Look for a protection-key-drive execute-only mapping
>> -     * which is now being given permissions that are not
>> -     * execute-only.  Move it back to the default pkey.
>> -     */
>> -    if (vma_is_pkey_exec_only(vma) &&
>> -        (prot & (PROT_READ|PROT_WRITE))) {
>> -            return 0;
>> -    }
>> +
> Dave,
>       this can be simply:
> 
>       if ((vma_is_pkey_exec_only(vma) && (prot != PROT_EXEC))
>               return ARCH_DEFAULT_PKEY;

Yes, but we're removing that code entirely. :)

Reply via email to