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 in COMPAT64 (COMPAT_RLIM_INFINITY).
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
In title: maybe s/to 64-bits/for compat64/? Maybe you can drop the first "compat" to avoid the repetition, e.g. "Update defines for compat64".
On 17/01/2023 11:00, Teo Couprie Diaz wrote:
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 in COMPAT64 (COMPAT_RLIM_INFINITY).
It looks like that parenthesis pertains to "use the native value" so it should be just after it, otherwise it looks like only the latter is for compat64.
Kevin
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
On 17/01/2023 12:02, Kevin Brodsky wrote:
In title: maybe s/to 64-bits/for compat64/? Maybe you can drop the first "compat" to avoid the repetition, e.g. "Update defines for compat64".
It does sound better, thanks !
On 17/01/2023 11:00, Teo Couprie Diaz wrote:
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 in COMPAT64 (COMPAT_RLIM_INFINITY).
It looks like that parenthesis pertains to "use the native value" so it should be just after it, otherwise it looks like only the latter is for compat64.
I see what you mean, will change. Téo
Kevin
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
linux-morello mailing list -- linux-morello@op-lists.linaro.org To unsubscribe send an email to linux-morello-leave@op-lists.linaro.org
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
In title: s/MNSIGSTKSZ/MINSIGSTKSZ/
Kevin
On 17/01/2023 11:00, Teo Couprie Diaz wrote:
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 12:04, Kevin Brodsky wrote:
In title: s/MNSIGSTKSZ/MINSIGSTKSZ/
Fixed, thanks Téo
Kevin
On 17/01/2023 11:00, Teo Couprie Diaz wrote:
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
linux-morello mailing list -- linux-morello@op-lists.linaro.org To unsubscribe send an email to linux-morello-leave@op-lists.linaro.org
linux-morello@op-lists.linaro.org