* [PATCH v2 10/13] nios2: define syscall_get_arch()
@ 2019-03-17 23:30 Dmitry V. Levin
2019-03-21 1:21 ` Paul Moore
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry V. Levin @ 2019-03-17 23:30 UTC (permalink / raw)
To: Paul Moore
Cc: Ley Foon Tan, Elvira Khabirova, Eugene Syromyatnikov,
Ley Foon Tan, Oleg Nesterov, Andy Lutomirski, nios2-dev,
linux-audit, linux-kernel
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: Ley Foon Tan <ley.foon.tan@intel.com>
Cc: Elvira Khabirova <lineprinter@altlinux.org>
Cc: Eugene Syromyatnikov <esyr@redhat.com>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: nios2-dev@lists.rocketboards.org
Cc: linux-audit@redhat.com
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
Notes:
v2: added Acked-by
arch/nios2/include/asm/syscall.h | 6 ++++++
include/uapi/linux/audit.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/arch/nios2/include/asm/syscall.h b/arch/nios2/include/asm/syscall.h
index 9de220854c4a..cf35e210fc4d 100644
--- a/arch/nios2/include/asm/syscall.h
+++ b/arch/nios2/include/asm/syscall.h
@@ -17,6 +17,7 @@
#ifndef __ASM_NIOS2_SYSCALL_H__
#define __ASM_NIOS2_SYSCALL_H__
+#include <uapi/linux/audit.h>
#include <linux/err.h>
#include <linux/sched.h>
@@ -135,4 +136,9 @@ static inline void syscall_set_arguments(struct task_struct *task,
}
}
+static inline int syscall_get_arch(void)
+{
+ return AUDIT_ARCH_NIOS2;
+}
+
#endif
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index fb0529da4d49..bcc0619b046f 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -403,6 +403,7 @@ enum {
__AUDIT_ARCH_CONVENTION_MIPS64_N32)
#define AUDIT_ARCH_NDS32 (EM_NDS32|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_NDS32BE (EM_NDS32)
+#define AUDIT_ARCH_NIOS2 (EM_ALTERA_NIOS2|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_OPENRISC (EM_OPENRISC)
#define AUDIT_ARCH_PARISC (EM_PARISC)
#define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT)
--
ldv
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH v2 10/13] nios2: define syscall_get_arch()
2019-03-17 23:30 [PATCH v2 10/13] nios2: define syscall_get_arch() Dmitry V. Levin
@ 2019-03-21 1:21 ` Paul Moore
0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2019-03-21 1:21 UTC (permalink / raw)
To: Dmitry V. Levin
Cc: Ley Foon Tan, Elvira Khabirova, Eugene Syromyatnikov,
Ley Foon Tan, Oleg Nesterov, Andy Lutomirski, nios2-dev,
linux-audit, linux-kernel
On Sun, Mar 17, 2019 at 7:30 PM Dmitry V. Levin <ldv@altlinux.org> wrote:
>
> 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: Ley Foon Tan <ley.foon.tan@intel.com>
> Cc: Elvira Khabirova <lineprinter@altlinux.org>
> Cc: Eugene Syromyatnikov <esyr@redhat.com>
> Cc: Ley Foon Tan <lftan@altera.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: nios2-dev@lists.rocketboards.org
> Cc: linux-audit@redhat.com
> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> ---
>
> Notes:
> v2: added Acked-by
>
> arch/nios2/include/asm/syscall.h | 6 ++++++
> include/uapi/linux/audit.h | 1 +
> 2 files changed, 7 insertions(+)
Merged into audit/next, thanks everyone.
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-21 1:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-17 23:30 [PATCH v2 10/13] nios2: define syscall_get_arch() Dmitry V. Levin
2019-03-21 1:21 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox