lkml.org 
[lkml]   [2017]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC v2 00/12] powerpc: Memory Protection Keys
    From
    Date
    On 06/20/2017 10:40 AM, Balbir Singh wrote:
    > On Fri, 2017-06-16 at 20:52 -0700, Ram Pai wrote:
    >> Memory protection keys enable applications to protect its
    >> address space from inadvertent access or corruption from
    >> itself.
    >
    > I presume by itself you mean protection between threads?

    Between threads due to race conditions or from the same thread
    because of programming error.

    >
    >>
    >> The overall idea:
    >>
    >> A process allocates a key and associates it with
    >> a address range within its address space.
    >
    > OK, so this is per VMA?

    Yeah but the same key can be given to multiple VMAs. Any
    change will effect every VMA who got tagged by it.

    >
    >> The process than can dynamically set read/write
    >> permissions on the key without involving the
    >> kernel.
    >
    > This bit is not clear, how can the key be set without
    > involving the kernel? I presume you mean the key is set

    With pkey_mprotect() system call, all the effected PTEs get
    tagged for once. Switching the permission happens just by
    writing into the register on the fly.

    > in the PTE's and the access protection values can be
    > set without involving the kernel?

    PTE setting happens once, access protection values can be
    changed on the fly through register.

    \
     
     \ /
      Last update: 2017-06-20 08:06    [W:4.353 / U:0.364 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site