The syscall numbers for compat64 are the same as the native ones. The __NR_seccomp_*_32 are not needed for compat64, so don't define them.
Also update the SECCOMP_ARCH_COMPAT* macros for compat64.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com --- arch/arm64/include/asm/seccomp.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/include/asm/seccomp.h b/arch/arm64/include/asm/seccomp.h index 30256233788b..65958a8f661c 100644 --- a/arch/arm64/include/asm/seccomp.h +++ b/arch/arm64/include/asm/seccomp.h @@ -10,7 +10,7 @@
#include <asm/unistd.h>
-#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT32 #define __NR_seccomp_read_32 __NR_compat_read #define __NR_seccomp_write_32 __NR_compat_write #define __NR_seccomp_exit_32 __NR_compat_exit @@ -22,10 +22,14 @@ #define SECCOMP_ARCH_NATIVE AUDIT_ARCH_AARCH64 #define SECCOMP_ARCH_NATIVE_NR NR_syscalls #define SECCOMP_ARCH_NATIVE_NAME "aarch64" -#ifdef CONFIG_COMPAT +#if defined(CONFIG_COMPAT32) # define SECCOMP_ARCH_COMPAT AUDIT_ARCH_ARM -# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls +# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls # define SECCOMP_ARCH_COMPAT_NAME "arm" +#elif defined(CONFIG_COMPAT64) +# define SECCOMP_ARCH_COMPAT AUDIT_ARCH_AARCH64 +# define SECCOMP_ARCH_COMPAT_NR NR_syscalls +# define SECCOMP_ARCH_COMPAT_NAME "aarch64" #endif
#endif /* _ASM_SECCOMP_H */
On 05/08/2022 17:08, Tudor Cretu wrote:
The syscall numbers for compat64 are the same as the native ones. The __NR_seccomp_*_32 are not needed for compat64, so don't define them.
Also update the SECCOMP_ARCH_COMPAT* macros for compat64.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com
arch/arm64/include/asm/seccomp.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Happy with this, will merge in a few days unless there are different opinions.
Kevin
diff --git a/arch/arm64/include/asm/seccomp.h b/arch/arm64/include/asm/seccomp.h index 30256233788b..65958a8f661c 100644 --- a/arch/arm64/include/asm/seccomp.h +++ b/arch/arm64/include/asm/seccomp.h @@ -10,7 +10,7 @@ #include <asm/unistd.h> -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT32 #define __NR_seccomp_read_32 __NR_compat_read #define __NR_seccomp_write_32 __NR_compat_write #define __NR_seccomp_exit_32 __NR_compat_exit @@ -22,10 +22,14 @@ #define SECCOMP_ARCH_NATIVE AUDIT_ARCH_AARCH64 #define SECCOMP_ARCH_NATIVE_NR NR_syscalls #define SECCOMP_ARCH_NATIVE_NAME "aarch64" -#ifdef CONFIG_COMPAT +#if defined(CONFIG_COMPAT32) # define SECCOMP_ARCH_COMPAT AUDIT_ARCH_ARM -# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls +# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls # define SECCOMP_ARCH_COMPAT_NAME "arm" +#elif defined(CONFIG_COMPAT64) +# define SECCOMP_ARCH_COMPAT AUDIT_ARCH_AARCH64 +# define SECCOMP_ARCH_COMPAT_NR NR_syscalls +# define SECCOMP_ARCH_COMPAT_NAME "aarch64" #endif #endif /* _ASM_SECCOMP_H */
On 05/08/2022 18:50, Kevin Brodsky wrote:
On 05/08/2022 17:08, Tudor Cretu wrote:
The syscall numbers for compat64 are the same as the native ones. The __NR_seccomp_*_32 are not needed for compat64, so don't define them.
Also update the SECCOMP_ARCH_COMPAT* macros for compat64.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com
arch/arm64/include/asm/seccomp.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
Happy with this, will merge in a few days unless there are different opinions.
Now in next, thanks!
Kevin
Kevin
diff --git a/arch/arm64/include/asm/seccomp.h b/arch/arm64/include/asm/seccomp.h index 30256233788b..65958a8f661c 100644 --- a/arch/arm64/include/asm/seccomp.h +++ b/arch/arm64/include/asm/seccomp.h @@ -10,7 +10,7 @@ #include <asm/unistd.h> -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT32 #define __NR_seccomp_read_32 __NR_compat_read #define __NR_seccomp_write_32 __NR_compat_write #define __NR_seccomp_exit_32 __NR_compat_exit @@ -22,10 +22,14 @@ #define SECCOMP_ARCH_NATIVE AUDIT_ARCH_AARCH64 #define SECCOMP_ARCH_NATIVE_NR NR_syscalls #define SECCOMP_ARCH_NATIVE_NAME "aarch64" -#ifdef CONFIG_COMPAT +#if defined(CONFIG_COMPAT32) # define SECCOMP_ARCH_COMPAT AUDIT_ARCH_ARM -# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls +# define SECCOMP_ARCH_COMPAT_NR __NR_compat_syscalls # define SECCOMP_ARCH_COMPAT_NAME "arm" +#elif defined(CONFIG_COMPAT64) +# define SECCOMP_ARCH_COMPAT AUDIT_ARCH_AARCH64 +# define SECCOMP_ARCH_COMPAT_NR NR_syscalls +# define SECCOMP_ARCH_COMPAT_NAME "aarch64" #endif #endif /* _ASM_SECCOMP_H */
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