summaryrefslogtreecommitdiffstats
path: root/arch/c6x/include
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2019-03-18 02:28:53 +0300
committerPaul Moore <paul@paul-moore.com>2019-03-20 21:08:32 -0400
commita43e66478ef7a2f8a7b2823b97cdae6605d34a02 (patch)
treece4ca08816da14f2338db245a74fa62589d21ba0 /arch/c6x/include
parent67f2a8a29311841ba6ab9b0e2d1b8f1e9978cd84 (diff)
downloadlinux-a43e66478ef7a2f8a7b2823b97cdae6605d34a02.tar.bz2
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 <msalter@redhat.com> Acked-by: Paul 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: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'arch/c6x/include')
-rw-r--r--arch/c6x/include/asm/syscall.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/c6x/include/asm/syscall.h b/arch/c6x/include/asm/syscall.h
index ae2be315ee9c..39dbd1ef994c 100644
--- a/arch/c6x/include/asm/syscall.h
+++ b/arch/c6x/include/asm/syscall.h
@@ -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 */