[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181109031613.GG21511@altlinux.org>
Date: Fri, 9 Nov 2018 06:16:13 +0300
From: "Dmitry V. Levin" <ldv@...linux.org>
To: Andy Lutomirski <luto@...nel.org>,
Mark Salter <msalter@...hat.com>,
Aurelien Jacquiot <jacquiot.aurelien@...il.com>,
Paul Moore <paul@...l-moore.com>,
Eric Paris <eparis@...hat.com>
Cc: Elvira Khabirova <lineprinter@...linux.org>,
linux-c6x-dev@...ux-c6x.org, linux-audit@...hat.com,
linux-kernel@...r.kernel.org
Subject: [PATCH 07/13] c6x: define syscall_get_arch()
syscall_get_arch() is required to be implemented on all architectures
that use tracehook_report_syscall_entry() in order to extend
the generic ptrace API with PTRACE_GET_SYSCALL_INFO request.
Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
---
arch/c6x/include/asm/syscall.h | 6 ++++++
include/uapi/linux/audit.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/arch/c6x/include/asm/syscall.h b/arch/c6x/include/asm/syscall.h
index ae2be315ee9c..235c1353a44b 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,9 @@ static inline void syscall_set_arguments(struct task_struct *task,
}
}
+static inline int syscall_get_arch(void)
+{
+ return AUDIT_ARCH_C6X;
+}
+
#endif /* __ASM_C6X_SYSCALLS_H */
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index a7149ceb5b98..3eb1397c2b8f 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -378,6 +378,7 @@ enum {
#define AUDIT_ARCH_ARC (EM_ARC)
#define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_ARMEB (EM_ARM)
+#define AUDIT_ARCH_C6X (EM_TI_C6000)
#define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_FRV (EM_FRV)
#define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE)
--
ldv
Powered by blists - more mailing lists