Re: 4.4-rc5: ugly warn on: 5 W+X pages found

Linus Torvalds
2015-12-15T19:06:40Z

On Tue, Dec 15, 2015 at 10:30 AM, Borislav Petkov <bp@alien8.de> wrote:
> On Tue, Dec 15, 2015 at 09:45:40AM -0800, Linus Torvalds wrote:
>>
>> +static inline int kernel_write_execute_prot(pgprotval_t protval)
>> +{
>> + return !(protval & _PAGE_USER) &&
>> + !(protval & _PAGE_NX) &&
>
> Shouldn't this be without a "!"? AFAIU, we want _PAGE_NX | _PAGE_RW?

We want to *warn* about PAGE_RW without PAGE_NX. No?

Linus