[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <09886a82-872d-8a43-fd61-549cf006ce6e@linux.vnet.ibm.com>
Date: Tue, 20 Jun 2017 11:35:00 +0530
From: Anshuman Khandual <khandual@...ux.vnet.ibm.com>
To: Balbir Singh <bsingharora@...il.com>,
Ram Pai <linuxram@...ibm.com>, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org
Cc: dave.hansen@...el.com, paulus@...ba.org,
aneesh.kumar@...ux.vnet.ibm.com
Subject: Re: [RFC v2 00/12] powerpc: Memory Protection Keys
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.
Powered by blists - more mailing lists