[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKTCnz=QrNoG0wdTZRJqmYfFOZmq2czZ4x8v1e=ouNx2Y8D6wg@mail.gmail.com>
Date: Fri, 9 Mar 2018 19:37:04 +1100
From: Balbir Singh <bsingharora@...il.com>
To: Ram Pai <linuxram@...ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Ingo Molnar <mingo@...hat.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)"
<linuxppc-dev@...ts.ozlabs.org>, linux-mm <linux-mm@...ck.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
linux-arch <linux-arch@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dave Hansen <dave.hansen@...el.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Anshuman Khandual <khandual@...ux.vnet.ibm.com>,
Aneesh Kumar KV <aneesh.kumar@...ux.vnet.ibm.com>,
"Haren Myneni/Beaverton/IBM" <hbabu@...ibm.com>,
Michal Hocko <mhocko@...nel.org>,
Thiago Jung Bauermann <bauerman@...ux.vnet.ibm.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Jonathan Corbet <corbet@....net>,
Arnd Bergmann <arnd@...db.de>, fweimer@...hat.com,
msuchanek@...e.com, Ulrich.Weigand@...ibm.com
Subject: Re: [PATCH] x86, powerpc : pkey-mprotect must allow pkey-0
On Fri, Mar 9, 2018 at 7:12 PM, Ram Pai <linuxram@...ibm.com> wrote:
> Once an address range is associated with an allocated pkey, it cannot be
> reverted back to key-0. There is no valid reason for the above behavior. On
> the contrary applications need the ability to do so.
>
> The patch relaxes the restriction.
I looked at the code and my observation was going to be that we need
to change mm_pkey_is_allocated. I still fail to understand what
happens if pkey 0 is reserved? What is the default key is it the first
available key? Assuming 0 is the default key may work and seems to
work, but I am sure its mostly by accident. It would be nice, if we
could have a notion of the default key. I don't like the special
meaning given to key 0 here. Remember on powerpc if 0 is reserved and
UAMOR/AMOR does not allow modification because it's reserved, setting
0 will still fail
Balbir
Powered by blists - more mailing lists