Skip to contentSkip to conversation

unicore32: define syscall_get_arch()

PATCH Applied Dmitry V. Levin 2 participants 2 messages Mar 17, 2019 – Mar 21, 2019 Audit

lore
Share & tools
lore
#0 lore raw

PATCH v2 12/13 unicore32: 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.

Cc Elvira Khabirova <[email protected]>
Cc Eugene Syromyatnikov <[email protected]>
Cc Guan Xuetao <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Andy Lutomirski <[email protected]>

---

Notes:
v2: unchanged

 arch/unicore32/include/asm/syscall.h | 12 ++++++++++++
 include/uapi/linux/audit.h           |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 arch/unicore32/include/asm/syscall.h
arch/unicore32/include/asm/syscall.h new file +12 -0
new file mode 100644
index 000000000000..3a6b885476b4
@@ -0,0 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _ASM_UNICORE_SYSCALL_H
+#define _ASM_UNICORE_SYSCALL_H
+
+#include <uapi/linux/audit.h>
+
+static inline int syscall_get_arch(void)
+{
+	return AUDIT_ARCH_UNICORE;
+}
+
+#endif	/* _ASM_UNICORE_SYSCALL_H */
include/uapi/linux/audit.h +1 -0
index bcc0619b046f..3901c51c0b93 100644
@@ -424,6 +424,7 @@ enum {
 #define AUDIT_ARCH_TILEGX	(EM_TILEGX|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
 #define AUDIT_ARCH_TILEGX32	(EM_TILEGX|__AUDIT_ARCH_LE)
 #define AUDIT_ARCH_TILEPRO	(EM_TILEPRO|__AUDIT_ARCH_LE)
+#define AUDIT_ARCH_UNICORE	(EM_UNICORE|__AUDIT_ARCH_LE)
 #define AUDIT_ARCH_X86_64	(EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
 #define AUDIT_ARCH_XTENSA	(EM_XTENSA)
 
Signature · 1 line
ldv
maintainer Applied
#1 lore raw
Quoted 17 lines · Dmitry V. Levin

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.

Cc Elvira Khabirova <[email protected]>
Cc Eugene Syromyatnikov <[email protected]>
Cc Guan Xuetao <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Andy Lutomirski <[email protected]>

---

Quoted 7 lines

Notes:
v2: unchanged

 arch/unicore32/include/asm/syscall.h | 12 ++++++++++++
 include/uapi/linux/audit.h           |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 arch/unicore32/include/asm/syscall.h

Merged into audit/next, thanks everyone.

Signature · 2 lines
paul moore
www.paul-moore.com