diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-07-11 18:59:21 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-08-02 15:22:18 +0300 |
commit | 3a24ea0df83e32355d897a18bbd82e05986dcdc3 (patch) | |
tree | 7475f41263f21546c960ad4e10d26d2fa12a5c59 /arch/powerpc/mm/nohash | |
parent | eb52f66f0abd468caf8be4e690d7fdef96250c2f (diff) | |
download | linux-3a24ea0df83e32355d897a18bbd82e05986dcdc3.tar.xz |
powerpc/kuap: Use ASM feature fixups instead of static branches
To avoid a useless nop on top of every uaccess enable/disable and
make life easier for objtool, replace static branches by ASM feature
fixups that will nop KUAP enabling instructions out in the unlikely
case KUAP is disabled at boottime.
Leave it as is on book3s/64 for now, it will be handled later when
objtool is activated on PPC64.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/671948788024fd890ec4ed175bc332dab8664ea5.1689091022.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/mm/nohash')
-rw-r--r-- | arch/powerpc/mm/nohash/kup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/nohash/kup.c b/arch/powerpc/mm/nohash/kup.c index 94ff82b9ae60..e1f7de2e54ec 100644 --- a/arch/powerpc/mm/nohash/kup.c +++ b/arch/powerpc/mm/nohash/kup.c @@ -24,6 +24,6 @@ void setup_kuap(bool disabled) pr_info("Activating Kernel Userspace Access Protection\n"); - __prevent_user_access(KUAP_READ_WRITE); + prevent_user_access(KUAP_READ_WRITE); } #endif |