On 07/10/2022 15:27, Amit Kachhap wrote:
On 9/28/22 21:01, Kevin Brodsky wrote:
linux/user_ptr.h now uses generic PCuABI implementations of uaddr_to_user_ptr* and no longer includises asm/user_ptr.h. Time to remove it along with the corresponding config option.
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com
arch/Kconfig | 3 --- arch/arm64/Kconfig | 1 - arch/arm64/include/asm/user_ptr.h | 35 ------------------------------- 3 files changed, 39 deletions(-) delete mode 100644 arch/arm64/include/asm/user_ptr.h
diff --git a/arch/Kconfig b/arch/Kconfig index b173a07c5a91..db0f652580c6 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1379,9 +1379,6 @@ config HAVE_ARCH_NODE_DEV_GROUP config ARCH_HAS_CHERI_H bool -config ARCH_HAS_USER_PTR_H - bool
config ARCH_HAS_CHERI_CAPABILITIES bool diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a0635a459a67..5bc5ab5e8689 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -30,7 +30,6 @@ config ARM64 select ARCH_HAS_GIGANTIC_PAGE select ARCH_HAS_KCOV select ARCH_HAS_CHERI_H - select ARCH_HAS_USER_PTR_H select ARCH_HAS_KEEPINITRD select ARCH_HAS_MEMBARRIER_SYNC_CORE select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE diff --git a/arch/arm64/include/asm/user_ptr.h b/arch/arm64/include/asm/user_ptr.h deleted file mode 100644 index 323ad0301cbd..000000000000 --- a/arch/arm64/include/asm/user_ptr.h +++ /dev/null @@ -1,35 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -#ifndef __ASM_USER_PTR_H -#define __ASM_USER_PTR_H
-#include <asm/morello.h>
-#ifdef CONFIG_CHERI_PURECAP_UABI
-static inline void __user *uaddr_to_user_ptr(ptraddr_t addr) -{ - /* - * TODO [PCuABI] - the user root capability should be used, not the - * kernel one. - */ - uintcap_t root_cap = morello_get_root_cap();
Even this function morello_get_root_cap() can be removed now.
Indeed that is planned :) More generally almost all uses of morello_root_cap should be removed, I'm planning this for either v2 or another series, see also the cover letter.
Kevin
- return (void __user *)__builtin_cheri_address_set(root_cap, addr); -} -#define uaddr_to_user_ptr(addr) uaddr_to_user_ptr(addr)
-static inline void __user *uaddr_to_user_ptr_safe(ptraddr_t addr) -{ - /* - * TODO [PCuABI] - the user root capability should be used, not the - * kernel one. - */ - uintcap_t root_cap = morello_get_root_cap();
- return (void __user *)__builtin_cheri_address_set(root_cap, addr); -} -#define uaddr_to_user_ptr_safe(addr) uaddr_to_user_ptr_safe(addr)
-#endif /* CONFIG_CHERI_PURECAP_UABI */
-#endif /* __ASM_USER_PTR_H */