lkml.org 
[lkml]   [2022]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: PKU usage improvements for threads
    From
    On 8/24/22 01:51, Stephen Röttger wrote:
    >>> Yeah, that's something for which our defenses are quite weak. But, it
    >>> also calls for a very generic mm/ solution and not something specific at
    >>> all to pkeys.
    > We were also thinking about if this should be a more generic feature instead of
    > being tied to pkeys. I.e. the doc above has an alternative proposal to introduce
    > something like a memory seal/unseal syscall.
    > I was personally leaning towards using pkeys for this for a few reasons:
    > * intuitively it would make sense to me to extend PKEY_DISABLE_ACCESS
    > to also mean disable all changes to the memory, not just the data.

    It would make some sense, but we can't do it with the existing
    PKEY_DISABLE_ACCESS ABI. It would surely break existing users if they
    couldn't munmap() memory that was PKEY_DISABLE_ACCESS.

    But, making it part of the mprotect() ABI wouldn't be the worst thing in
    the world. Since we have a pkey_mprotect(), any mprotect()-based
    mechanism could even reuse the existing pkey syscalls.

    I do agree with Andy, though, that I'm not quite sure what the attack
    model is here. If an attacker can make arbitrary system calls, surely
    protecting one little altstack VMA isn't doing to help much.

    \
     
     \ /
      Last update: 2022-08-24 18:28    [W:3.261 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site