diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2021-06-03 11:41:46 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2021-06-16 17:09:09 +0300 |
commit | d008f8f8a0c3efe4fe1008a797f9497ea5965e27 (patch) | |
tree | 439dec9eedd5760c957c0b62ecfef4c944be8a1e /arch/powerpc/include/asm/kup.h | |
parent | 9f5bd8f1471d7498c934c0a686fd0997cf872653 (diff) | |
download | linux-d008f8f8a0c3efe4fe1008a797f9497ea5965e27.tar.xz |
powerpc/kuap: Remove KUAP_CURRENT_XXX
book3s/32 was the only user of KUAP_CURRENT_XXX.
After rework of book3s/32 KUAP, it is not used anymore.
Remove them.
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/549214ecf6887d965645e664520d4886663c5ffb.1622708530.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/include/asm/kup.h')
-rw-r--r-- | arch/powerpc/include/asm/kup.h | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/arch/powerpc/include/asm/kup.h b/arch/powerpc/include/asm/kup.h index 4b94d4293777..2c47feee9482 100644 --- a/arch/powerpc/include/asm/kup.h +++ b/arch/powerpc/include/asm/kup.h @@ -5,14 +5,6 @@ #define KUAP_READ 1 #define KUAP_WRITE 2 #define KUAP_READ_WRITE (KUAP_READ | KUAP_WRITE) -/* - * For prevent_user_access() only. - * Use the current saved situation instead of the to/from/size params. - * Used on book3s/32 - */ -#define KUAP_CURRENT_READ 4 -#define KUAP_CURRENT_WRITE 8 -#define KUAP_CURRENT (KUAP_CURRENT_READ | KUAP_CURRENT_WRITE) #ifdef CONFIG_PPC_BOOK3S_64 #include <asm/book3s/64/kup.h> @@ -129,17 +121,17 @@ static inline void prevent_read_write_user(void __user *to, const void __user *f static inline void prevent_current_access_user(void) { - prevent_user_access(NULL, NULL, ~0UL, KUAP_CURRENT); + prevent_user_access(NULL, NULL, ~0UL, KUAP_READ_WRITE); } static inline void prevent_current_read_from_user(void) { - prevent_user_access(NULL, NULL, ~0UL, KUAP_CURRENT_READ); + prevent_user_access(NULL, NULL, ~0UL, KUAP_READ); } static inline void prevent_current_write_to_user(void) { - prevent_user_access(NULL, NULL, ~0UL, KUAP_CURRENT_WRITE); + prevent_user_access(NULL, NULL, ~0UL, KUAP_WRITE); } #endif /* !__ASSEMBLY__ */ |