On Wed, Dec 13, 2017 at 10:08 AM, Linus Torvalds
<[email protected]> wrote:
> On Wed, Dec 13, 2017 at 7:54 AM, Peter Zijlstra <[email protected]> wrote:
>>
>> Which is why get_user_pages() _should_ enforce this.
>>
>> What use are protection keys if you can trivially circumvent them?
>
> No, we will *not* worry about protection keys in get_user_pages().
>

Hmm.  If I goof some pointer and pass that bogus pointer to read(2),
and I'm using pkey to protect my mmapped database, I think i'd rather
that read(2) fail.  Sure, pkey is trivially circumventable using
wrpkru or mprotect, but those are obvious dangerous functions.

Reply via email to