projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f491fe3
)
powerpc/book3s64/pkeys: Prevent key 1 modification from userspace.
author
Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com>
Thu, 9 Jul 2020 03:29:30 +0000
(08:59 +0530)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Mon, 20 Jul 2020 12:57:58 +0000
(22:57 +1000)
Key 1 is marked reserved by ISA. Setup uamor to prevent userspace modification
of the same.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link:
https://lore.kernel.org/r/20200709032946.881753-8-aneesh.kumar@linux.ibm.com
arch/powerpc/mm/book3s64/pkeys.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/mm/book3s64/pkeys.c
b/arch/powerpc/mm/book3s64/pkeys.c
index 2dea8c29df57c0f6b944ecdc9c61e22be66d81aa..e2bf93901bd0f12aefa86b9dc31094cc73f76aec 100644
(file)
--- a/
arch/powerpc/mm/book3s64/pkeys.c
+++ b/
arch/powerpc/mm/book3s64/pkeys.c
@@
-183,6
+183,7
@@
static int pkey_initialize(void)
* programming note.
*/
reserved_allocation_mask |= (0x1 << 1);
+ default_uamor &= ~(0x3ul << pkeyshift(1));
/*
* Prevent the usage of OS reserved the keys. Update UAMOR