path: root/arch/s390/include/asm/syscall.h
diff options
authorDmitry V. Levin <>2019-03-18 02:30:18 +0300
committerPaul Moore <>2019-03-20 21:12:36 -0400
commit16add411645cff83360086e102daa67b25f1e39a (patch)
tree89ef69d7e25691a0808fe90a8d3580297dd44ac8 /arch/s390/include/asm/syscall.h
parentb15fe94acece954feda32706e3ca7cc024999aee (diff)
syscall_get_arch: add "struct task_struct *" argument
This argument is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request: syscall_get_arch() is going to be called from ptrace_request() along with syscall_get_nr(), syscall_get_arguments(), syscall_get_error(), and syscall_get_return_value() functions with a tracee as their argument. The primary intent is that the triple (audit_arch, syscall_nr, arg1..arg6) should describe what system call is being called and what its arguments are. Reverts: 5e937a9ae913 ("syscall_get_arch: remove useless function arguments") Reverts: 1002d94d3076 ("syscall.h: fix doc text for syscall_get_arch()") Reviewed-by: Andy Lutomirski <> # for x86 Reviewed-by: Palmer Dabbelt <> Acked-by: Paul Moore <> Acked-by: Paul Burton <> # MIPS parts Acked-by: Michael Ellerman <> (powerpc) Acked-by: Kees Cook <> # seccomp parts Acked-by: Mark Salter <> # for the c6x bit Cc: Elvira Khabirova <> Cc: Eugene Syromyatnikov <> Cc: Oleg Nesterov <> Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: Signed-off-by: Dmitry V. Levin <> Signed-off-by: Paul Moore <>
Diffstat (limited to 'arch/s390/include/asm/syscall.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h
index 96f9a9151fde..5a40ea8b90ea 100644
--- a/arch/s390/include/asm/syscall.h
+++ b/arch/s390/include/asm/syscall.h
@@ -92,10 +92,10 @@ static inline void syscall_set_arguments(struct task_struct *task,
regs->orig_gpr2 = args[0];
-static inline int syscall_get_arch(void)
+static inline int syscall_get_arch(struct task_struct *task)
- if (test_tsk_thread_flag(current, TIF_31BIT))
+ if (test_tsk_thread_flag(task, TIF_31BIT))
return AUDIT_ARCH_S390;
return AUDIT_ARCH_S390X;