Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-13 Thread Michal Hocko
On Thu 13-07-17 08:53:52, Benjamin Herrenschmidt wrote: > On Wed, 2017-07-12 at 09:23 +0200, Michal Hocko wrote: > > > > > > > > Ideally the MMU looks at the PTE for keys, in order to enforce > > > protection. This is the case with x86 and is the case with power9 Radix > > > page table. Hence

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-12 Thread Benjamin Herrenschmidt
On Wed, 2017-07-12 at 09:23 +0200, Michal Hocko wrote: > > > > > Ideally the MMU looks at the PTE for keys, in order to enforce > > protection. This is the case with x86 and is the case with power9 Radix > > page table. Hence the keys have to be programmed into the PTE. > > But x86 doesn't

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-12 Thread Michal Hocko
On Wed 12-07-17 09:23:37, Michal Hocko wrote: > On Tue 11-07-17 12:32:57, Ram Pai wrote: [...] > > Ideally the MMU looks at the PTE for keys, in order to enforce > > protection. This is the case with x86 and is the case with power9 Radix > > page table. Hence the keys have to be programmed into

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-12 Thread Michal Hocko
On Tue 11-07-17 12:32:57, Ram Pai wrote: > On Tue, Jul 11, 2017 at 04:52:46PM +0200, Michal Hocko wrote: > > On Wed 05-07-17 14:21:37, Ram Pai wrote: > > > Memory protection keys enable applications to protect its > > > address space from inadvertent access or corruption from > > > itself. > > >

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-11 Thread Benjamin Herrenschmidt
On Tue, 2017-07-11 at 12:32 -0700, Ram Pai wrote: > Ideally the MMU looks at the PTE for keys, in order to enforce > protection. This is the case with x86 and is the case with power9 Radix > page table. Hence the keys have to be programmed into the PTE. POWER9 radix doesn't currently support

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-11 Thread Ram Pai
On Tue, Jul 11, 2017 at 04:52:46PM +0200, Michal Hocko wrote: > On Wed 05-07-17 14:21:37, Ram Pai wrote: > > Memory protection keys enable applications to protect its > > address space from inadvertent access or corruption from > > itself. > > > > The overall idea: > > > > A process allocates a

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-11 Thread Michal Hocko
On Wed 05-07-17 14:21:37, Ram Pai wrote: > Memory protection keys enable applications to protect its > address space from inadvertent access or corruption from > itself. > > The overall idea: > > A process allocates a key and associates it with > an address range withinits address

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-10 Thread Ram Pai
On Sun, Jul 09, 2017 at 11:05:44PM -0700, Ram Pai wrote: > On Mon, Jul 10, 2017 at 11:13:23AM +0530, Anshuman Khandual wrote: > > On 07/06/2017 02:51 AM, Ram Pai wrote: . > > > do you have data points to show the difference in > > performance between this version and the last one where > > we

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-10 Thread Ram Pai
On Mon, Jul 10, 2017 at 11:13:23AM +0530, Anshuman Khandual wrote: > On 07/06/2017 02:51 AM, Ram Pai wrote: > > Memory protection keys enable applications to protect its > > address space from inadvertent access or corruption from > > itself. > > > > The overall idea: > > > > A process

Re: [RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-09 Thread Anshuman Khandual
On 07/06/2017 02:51 AM, Ram Pai wrote: > Memory protection keys enable applications to protect its > address space from inadvertent access or corruption from > itself. > > The overall idea: > > A process allocates a key and associates it with > an address range withinits address

[RFC v5 00/38] powerpc: Memory Protection Keys

2017-07-05 Thread Ram Pai
Memory protection keys enable applications to protect its address space from inadvertent access or corruption from itself. The overall idea: A process allocates a key and associates it with an address range withinits address space. The process then can dynamically set