c6x: define syscall_get_arch()
PATCH v2 3/13 c6x: define syscall_get_arch()
syscall_get_arch() is required to be implemented on all architectures in addition to already implemented syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions in order to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request.
Acked-by Mark Salter <[email protected]>
Acked-by Paul Moore <[email protected]>
Cc Elvira Khabirova <[email protected]>
Cc Eugene Syromyatnikov <[email protected]>
Cc Aurelien Jacquiot <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Andy Lutomirski <[email protected]>
Signed-off-by Dmitry V. Levin <[email protected]>
---
Notes:
v2: unchanged
arch/c6x/include/asm/syscall.h | 7 +++++++ include/uapi/linux/audit.h | 2 ++ 2 files changed, 9 insertions(+)
arch/c6x/include/asm/syscall.h +7 -0
@@ -11,6 +11,7 @@#ifndef __ASM_C6X_SYSCALL_H#define __ASM_C6X_SYSCALL_H +#include <uapi/linux/audit.h> #include <linux/err.h> #include <linux/sched.h>
@@ -120,4 +121,10 @@ static inline void syscall_set_arguments(struct task_struct *task, } } +static inline int syscall_get_arch (void ) +{ +return IS_ENABLED (CONFIG_CPU_BIG_ENDIAN ) + ?AUDIT_ARCH_C6XBE :AUDIT_ARCH_C6X ; +} +#endif /* __ASM_C6X_SYSCALLS_H */
include/uapi/linux/audit.h +2 -0
@@ -381,6 +381,8 @@ enum {#define AUDIT_ARCH_ARCV2BE (EM_ARCV2)#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)#define AUDIT_ARCH_ARMEB (EM_ARM) +#define AUDIT_ARCH_C6X (EM_TI_C6000|__AUDIT_ARCH_LE) +#define AUDIT_ARCH_C6XBE (EM_TI_C6000)#define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)#define AUDIT_ARCH_CSKY (EM_CSKY|__AUDIT_ARCH_LE)#define AUDIT_ARCH_FRV (EM_FRV)
Signature · 1 line
ldv
Quoted 17 lines · Dmitry V. Levin
syscall_get_arch()is required to be implemented on all architectures in addition to already implementedsyscall_get_nr(),syscall_get_arguments(),syscall_get_error(), andsyscall_get_return_value()functions in order to extend the generic ptrace API withPTRACE_GET_SYSCALL_INFOrequest.Acked-by Mark Salter <[email protected]>Acked-by Paul Moore <[email protected]>Cc Elvira Khabirova <[email protected]>Cc Eugene Syromyatnikov <[email protected]>Cc Aurelien Jacquiot <[email protected]>Cc Oleg Nesterov <[email protected]>Cc Andy Lutomirski <[email protected]>Signed-off-by Dmitry V. Levin <[email protected]>
Quoted 8 lines
---
Notes:
v2: unchangedarch/c6x/include/asm/syscall.h | 7 +++++++ include/uapi/linux/audit.h | 2 ++ 2 files changed, 9 insertions(+)
Merged into audit/next, thanks everyone.
Signature · 2 lines
paul moore www.paul-moore.com