Commit a43e6647 authored by Dmitry V. Levin's avatar Dmitry V. Levin Committed by Paul Moore

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: default avatarMark Salter <msalter@redhat.com>
Acked-by: default avatarPaul Moore <paul@paul-moore.com>
Cc: Elvira Khabirova <lineprinter@altlinux.org>
Cc: Eugene Syromyatnikov <esyr@redhat.com>
Cc: Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: linux-c6x-dev@linux-c6x.org
Cc: linux-audit@redhat.com
Signed-off-by: default avatarDmitry V. Levin <ldv@altlinux.org>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 67f2a8a2
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#ifndef __ASM_C6X_SYSCALL_H #ifndef __ASM_C6X_SYSCALL_H
#define __ASM_C6X_SYSCALL_H #define __ASM_C6X_SYSCALL_H
#include <uapi/linux/audit.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -120,4 +121,10 @@ static inline void syscall_set_arguments(struct task_struct *task, ...@@ -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 */ #endif /* __ASM_C6X_SYSCALLS_H */
...@@ -381,6 +381,8 @@ enum { ...@@ -381,6 +381,8 @@ enum {
#define AUDIT_ARCH_ARCV2BE (EM_ARCV2) #define AUDIT_ARCH_ARCV2BE (EM_ARCV2)
#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARMEB (EM_ARM) #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_CRIS (EM_CRIS|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_CSKY (EM_CSKY|__AUDIT_ARCH_LE) #define AUDIT_ARCH_CSKY (EM_CSKY|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_FRV (EM_FRV) #define AUDIT_ARCH_FRV (EM_FRV)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment