From: Balbir Singh <bsingharora@gmail.com>
To: Ram Pai <linuxram@us.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Ingo Molnar <mingo@redhat.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"open list:LINUX FOR POWERPC (32-BIT AND 64-BIT)"
<linuxppc-dev@lists.ozlabs.org>, linux-mm <linux-mm@kvack.org>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, linux-arch <linux-arch@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dave Hansen <dave.hansen@intel.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>,
Aneesh Kumar KV <aneesh.kumar@linux.vnet.ibm.com>,
"Haren Myneni/Beaverton/IBM" <hbabu@us.ibm.com>,
Michal Hocko <mhocko@kernel.org>,
Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Jonathan Corbet <corbet@lwn.net>, Arnd Bergmann <arnd@arndb.de>,
fweimer@redhat.com, msuchanek@suse.com,
Thomas Gleixner <tglx@linutronix.de>,
Ulrich.Weigand@de.ibm.com, Ram Pai <ram.n.pai@gmail.com>
Subject: Re: [PATCH v4] mm, pkey: treat pkey-0 special
Date: Fri, 16 Mar 2018 22:02:22 +1100 [thread overview]
Message-ID: <CAKTCnzmSCT+VecdSRpyY2Rb_AW2ngCi3UTZfLE3VOLNSQn6vsA@mail.gmail.com> (raw)
In-Reply-To: <1521196416-18157-1-git-send-email-linuxram@us.ibm.com>
On Fri, Mar 16, 2018 at 9:33 PM, Ram Pai <linuxram@us.ibm.com> wrote:
> Applications need the ability to associate an address-range with some
> key and latter revert to its initial default key. Pkey-0 comes close to
> providing this function but falls short, because the current
> implementation disallows applications to explicitly associate pkey-0 to
> the address range.
>
> Clarify the semantics of pkey-0 and provide the corresponding
> implementation.
>
> Pkey-0 is special with the following semantics.
> (a) it is implicitly allocated and can never be freed. It always exists.
> (b) it is the default key assigned to any address-range.
> (c) it can be explicitly associated with any address-range.
>
> Tested on powerpc only. Could not test on x86.
Ram,
I was wondering if we should check the AMOR values on the ppc side to make sure
that pkey0 is indeed available for use as default. I am still of the
opinion that we
should consider non-0 default pkey in the long run. I'm OK with the patches for
now, but really 0 is not special except for it being the default bit
values present
in the PTE.
The patches themselves look OK to me
Balbir Singh.
next prev parent reply other threads:[~2018-03-16 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 10:33 [PATCH v4] mm, pkey: treat pkey-0 special Ram Pai
2018-03-16 11:02 ` Balbir Singh [this message]
2018-03-16 19:31 ` Ram Pai
2018-03-27 3:48 ` Michael Ellerman
2018-03-27 4:15 ` Balbir Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKTCnzmSCT+VecdSRpyY2Rb_AW2ngCi3UTZfLE3VOLNSQn6vsA@mail.gmail.com \
--to=bsingharora@gmail.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=arnd@arndb.de \
--cc=bauerman@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=corbet@lwn.net \
--cc=dave.hansen@intel.com \
--cc=ebiederm@xmission.com \
--cc=fweimer@redhat.com \
--cc=hbabu@us.ibm.com \
--cc=khandual@linux.vnet.ibm.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=linuxram@us.ibm.com \
--cc=mhocko@kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.com \
--cc=paulus@samba.org \
--cc=ram.n.pai@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).