nios2: define syscall_get_arch()
Subsystems (2)
PATCH v2 10/13 nios2: 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 Paul Moore <[email protected]>
Acked-by Ley Foon Tan <[email protected]>
Cc Elvira Khabirova <[email protected]>
Cc Eugene Syromyatnikov <[email protected]>
Cc Ley Foon Tan <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Andy Lutomirski <[email protected]>
Signed-off-by Dmitry V. Levin <[email protected]>
---
Notes:
v2: added Acked-by
arch/nios2/include/asm/syscall.h | 6 ++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 7 insertions(+)
arch/nios2/include/asm/syscall.h +6 -0
@@ -17,6 +17,7 @@#ifndef __ASM_NIOS2_SYSCALL_H__#define __ASM_NIOS2_SYSCALL_H__ +#include <uapi/linux/audit.h> #include <linux/err.h> #include <linux/sched.h>
@@ -135,4 +136,9 @@ static inline void syscall_set_arguments(struct task_struct *task, } } +static inline int syscall_get_arch (void ) +{ +return AUDIT_ARCH_NIOS2 ; +} +#endif
include/uapi/linux/audit.h +1 -0
@@ -403,6 +403,7 @@ enum { __AUDIT_ARCH_CONVENTION_MIPS64_N32)#define AUDIT_ARCH_NDS32 (EM_NDS32|__AUDIT_ARCH_LE)#define AUDIT_ARCH_NDS32BE (EM_NDS32) +#define AUDIT_ARCH_NIOS2 (EM_ALTERA_NIOS2|__AUDIT_ARCH_LE)#define AUDIT_ARCH_OPENRISC (EM_OPENRISC)#define AUDIT_ARCH_PARISC (EM_PARISC)#define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT)
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 Paul Moore <[email protected]>Acked-by Ley Foon Tan <[email protected]>Cc Elvira Khabirova <[email protected]>Cc Eugene Syromyatnikov <[email protected]>Cc Ley Foon Tan <[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: added Acked-byarch/nios2/include/asm/syscall.h | 6 ++++++ include/uapi/linux/audit.h | 1 + 2 files changed, 7 insertions(+)
Merged into audit/next, thanks everyone.
Signature · 2 lines
paul moore www.paul-moore.com