Some generic COMPAT definitions have been consolidated in asm-generic/compat.h: commit 84a0c977ab98 ("asm-generic: compat: Cleanup duplicate definitions")
Remove those that are already defined to the same value there from arm64 asm/compat.h.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com --- arch/arm64/include/asm/compat.h | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index a85a500148ac..2255df98fbcd 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -85,10 +85,6 @@ struct compat_statfs { compat_long_t f_spare[4]; };
-#define COMPAT_RLIM_INFINITY 0xffffffff - -#define COMPAT_OFF_T_MAX 0x7fffffff - static inline void __user *compat_ptr(compat_uptr_t uptr) { /*
Some compat defines are still using 32-bits values, update them to a 64-bits one (COMPAT_OFF_T_MAX) or use the native value (COMPAT_RLIM_INFINITY) in COMPAT64.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com --- include/asm-generic/compat.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/compat.h b/include/asm-generic/compat.h index 8aa32efdeee8..f4ef0518470e 100644 --- a/include/asm-generic/compat.h +++ b/include/asm-generic/compat.h @@ -7,12 +7,20 @@ #endif
#ifndef COMPAT_RLIM_INFINITY +#ifdef CONFIG_COMPAT64 +#define COMPAT_RLIM_INFINITY RLIM_INFINITY +#else #define COMPAT_RLIM_INFINITY 0xffffffff -#endif +#endif /* CONFIG_COMPAT64 */ +#endif /* COMPAT_RLIM_INFINITY */
#ifndef COMPAT_OFF_T_MAX +#ifdef CONFIG_COMPAT64 +#define COMPAT_OFF_T_MAX LONG_MAX +#else #define COMPAT_OFF_T_MAX 0x7fffffff -#endif +#endif /* CONFIG_COMPAT64 */ +#endif /* COMPAT_OFF_T_MAX */
#ifndef compat_arg_u64 #ifndef CONFIG_CPU_BIG_ENDIAN
COMPAT_MINISGSTKSZ is automatically defined to the native value in linux/compat.h if not defined, so only define it for COMPAT32 in arm64.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com --- arch/arm64/include/asm/compat.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index 2255df98fbcd..fe88e40f8960 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -96,7 +96,9 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) #define compat_ptr(uptr) compat_ptr(uptr)
#define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current))) +#ifdef CONFIG_COMPAT32 #define COMPAT_MINSIGSTKSZ 2048 +#endif
#ifdef CONFIG_COMPAT64 #define COMPAT_USE_64BIT_TIME 1
On 17/01/2023 14:10, Teo Couprie Diaz wrote:
COMPAT_MINISGSTKSZ is automatically defined to the native value in
Still not quite the right spelling :) I've fixed that locally and merged the series in my 6.1 branch [1], thanks!
Kevin
[1] https://git.morello-project.org/kbrodsky-arm/linux/-/commits/morello/next-6....
linux/compat.h if not defined, so only define it for COMPAT32 in arm64.
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com
arch/arm64/include/asm/compat.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h index 2255df98fbcd..fe88e40f8960 100644 --- a/arch/arm64/include/asm/compat.h +++ b/arch/arm64/include/asm/compat.h @@ -96,7 +96,9 @@ static inline void __user *compat_ptr(compat_uptr_t uptr) #define compat_ptr(uptr) compat_ptr(uptr) #define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current))) +#ifdef CONFIG_COMPAT32 #define COMPAT_MINSIGSTKSZ 2048 +#endif #ifdef CONFIG_COMPAT64 #define COMPAT_USE_64BIT_TIME 1
linux-morello@op-lists.linaro.org