nds32: 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 <paul@paul-moore.com> Acked-by: Vincent Chen <vincentc@andestech.com> Acked-by: Greentime Hu <greentime@andestech.com> Cc: Elvira Khabirova <lineprinter@altlinux.org> Cc: Eugene Syromyatnikov <esyr@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: linux-audit@redhat.com Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:

committed by
Paul Moore

parent
530ff23a8e
commit
fa562447e1
@@ -5,6 +5,7 @@
|
||||
#ifndef _ASM_NDS32_SYSCALL_H
|
||||
#define _ASM_NDS32_SYSCALL_H 1
|
||||
|
||||
#include <uapi/linux/audit.h>
|
||||
#include <linux/err.h>
|
||||
struct task_struct;
|
||||
struct pt_regs;
|
||||
@@ -185,4 +186,12 @@ void syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
|
||||
|
||||
memcpy(®s->uregs[0] + i, args, n * sizeof(args[0]));
|
||||
}
|
||||
|
||||
static inline int
|
||||
syscall_get_arch(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)
|
||||
? AUDIT_ARCH_NDS32BE : AUDIT_ARCH_NDS32;
|
||||
}
|
||||
|
||||
#endif /* _ASM_NDS32_SYSCALL_H */
|
||||
|
Reference in New Issue
Block a user