<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/include/asm/pkeys.h, branch linux-5.10.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.10.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-07-20T12:57:59Z</updated>
<entry>
<title>powerpc/book3s64/pkeys: Use MMU_FTR_PKEY instead of pkey_disabled static key</title>
<updated>2020-07-20T12:57:59Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2020-07-09T03:29:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f7045a45115b17fe695ea7075f5213706f202edb'/>
<id>urn:sha1:f7045a45115b17fe695ea7075f5213706f202edb</id>
<content type='text'>
Instead of pkey_disabled static key use mmu feature MMU_FTR_PKEY.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200709032946.881753-17-aneesh.kumar@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/book3s64/pkeys: Use pkey_execute_disable_supported</title>
<updated>2020-07-20T12:57:59Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2020-07-09T03:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2daf298de728dc37f32d0749fa4f59db36fa7d96'/>
<id>urn:sha1:2daf298de728dc37f32d0749fa4f59db36fa7d96</id>
<content type='text'>
Use pkey_execute_disable_supported to check for execute key support instead
of pkey_disabled.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200709032946.881753-16-aneesh.kumar@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/book3s64/pkeys: Make initial_allocation_mask static</title>
<updated>2020-07-20T12:57:58Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2020-07-09T03:29:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c8ab47362fe9a74f61b48efe957666a423c55a2'/>
<id>urn:sha1:3c8ab47362fe9a74f61b48efe957666a423c55a2</id>
<content type='text'>
initial_allocation_mask is not used outside this file.
Also mark reserved_allocation_mask and initial_allocation_mask __ro_after_init;

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200709032946.881753-12-aneesh.kumar@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/book3s64/pkeys: Convert pkey_total to num_pkey</title>
<updated>2020-07-20T12:57:58Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2020-07-09T03:29:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c529afd7cbc71ae1dc44a31efc7c1c9db3c3a143'/>
<id>urn:sha1:c529afd7cbc71ae1dc44a31efc7c1c9db3c3a143</id>
<content type='text'>
num_pkey now represents max number of keys supported such that we return
to userspace 0 - num_pkey - 1.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200709032946.881753-11-aneesh.kumar@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/book3s64/pkeys: Simplify pkey disable branch</title>
<updated>2020-07-20T12:57:58Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2020-07-09T03:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4678d4b477c3d2901f101986ca01406f3b7eaea'/>
<id>urn:sha1:a4678d4b477c3d2901f101986ca01406f3b7eaea</id>
<content type='text'>
Make the default value FALSE (pkey enabled) and set to TRUE when we
find the total number of keys supported to be zero.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200709032946.881753-10-aneesh.kumar@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/book3s64/pkeys: pkeys are supported only on hash on book3s.</title>
<updated>2020-07-20T12:57:57Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2020-07-09T03:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9658f83e721ddfcee3e08b16a6628420de424c3'/>
<id>urn:sha1:b9658f83e721ddfcee3e08b16a6628420de424c3</id>
<content type='text'>
Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200709032946.881753-4-aneesh.kumar@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/book3s64/pkeys: Fixup bit numbering</title>
<updated>2020-07-20T12:57:57Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
</author>
<published>2020-07-09T03:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=33699023f51f96ac9be38747e64967ea05e00bab'/>
<id>urn:sha1:33699023f51f96ac9be38747e64967ea05e00bab</id>
<content type='text'>
This number the pkey bit such that it is easy to follow. PKEY_BIT0 is
the lower order bit. This makes further changes easy to follow.

No functional change in this patch other than linux page table for
hash translation now maps pkeys differently.

Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200709032946.881753-3-aneesh.kumar@linux.ibm.com
</content>
</entry>
<entry>
<title>mmap locking API: convert mmap_sem comments</title>
<updated>2020-06-09T16:39:14Z</updated>
<author>
<name>Michel Lespinasse</name>
</author>
<published>2020-06-09T04:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c1e8d7c6a7a682e1405e3e242d32fc377fd196ff'/>
<id>urn:sha1:c1e8d7c6a7a682e1405e3e242d32fc377fd196ff</id>
<content type='text'>
Convert comments that reference mmap_sem to reference mmap_lock instead.

[akpm@linux-foundation.org: fix up linux-next leftovers]
[akpm@linux-foundation.org: s/lockaphore/lock/, per Vlastimil]
[akpm@linux-foundation.org: more linux-next fixups, per Michel]

Signed-off-by: Michel Lespinasse &lt;walken@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Reviewed-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Reviewed-by: Daniel Jordan &lt;daniel.m.jordan@oracle.com&gt;
Cc: Davidlohr Bueso &lt;dbueso@suse.de&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Jason Gunthorpe &lt;jgg@ziepe.ca&gt;
Cc: Jerome Glisse &lt;jglisse@redhat.com&gt;
Cc: John Hubbard &lt;jhubbard@nvidia.com&gt;
Cc: Laurent Dufour &lt;ldufour@linux.ibm.com&gt;
Cc: Liam Howlett &lt;Liam.Howlett@oracle.com&gt;
Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Ying Han &lt;yinghan@google.com&gt;
Link: http://lkml.kernel.org/r/20200520052908.204642-13-walken@google.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>powerpc/pkeys: make protection key 0 less special</title>
<updated>2018-07-24T11:43:24Z</updated>
<author>
<name>Ram Pai</name>
</author>
<published>2018-07-17T13:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07f522d203242b359624a284b61977600eebfd5a'/>
<id>urn:sha1:07f522d203242b359624a284b61977600eebfd5a</id>
<content type='text'>
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.

Lets make pkey-0 less special and treat it almost like any other key.
Thus it can be explicitly associated with any address range, and can be
freed. This gives the application more flexibility and power.  The
ability to free pkey-0 must be used responsibily, since pkey-0 is
associated with almost all address-range by default.

Even with this change pkey-0 continues to be slightly more special
from the following point of view.
(a) it is implicitly allocated.
(b) it is the default key assigned to any address-range.
(c) its permissions cannot be modified by userspace.

NOTE: (c) is specific to powerpc only. pkey-0 is associated by default
with all pages including kernel pages, and pkeys are also active in
kernel mode. If any permission is denied on pkey-0, the kernel running
in the context of the application will be unable to operate.

Tested on powerpc.

Signed-off-by: Ram Pai &lt;linuxram@us.ibm.com&gt;
[mpe: Drop #define PKEY_0 0 in favour of plain old 0]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pkeys: key allocation/deallocation must not change pkey registers</title>
<updated>2018-07-24T11:34:08Z</updated>
<author>
<name>Ram Pai</name>
</author>
<published>2018-07-17T13:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a4a5e5d2aadc793be95024f454cf511d115b62d'/>
<id>urn:sha1:4a4a5e5d2aadc793be95024f454cf511d115b62d</id>
<content type='text'>
Key allocation and deallocation has the side effect of programming the
UAMOR/AMR/IAMR registers. This is wrong, since its the responsibility of
the application and not that of the kernel, to modify the permission on
the key.

Do not modify the pkey registers at key allocation/deallocation.

This patch also fixes a bug where a sys_pkey_free() resets the UAMOR
bits of the key, thus making its permissions unmodifiable from user
space. Later if the same key gets reallocated from a different thread
this thread will no longer be able to change the permissions on the key.

Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem")
Cc: stable@vger.kernel.org # v4.16+
Reviewed-by: Thiago Jung Bauermann &lt;bauerman@linux.ibm.com&gt;
Signed-off-by: Ram Pai &lt;linuxram@us.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
