[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190415234430.GD9384@altlinux.org>
Date: Tue, 16 Apr 2019 02:44:30 +0300
From: "Dmitry V. Levin" <ldv@...linux.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Helge Deller <deller@....de>,
"James E.J. Bottomley" <jejb@...isc-linux.org>,
Elvira Khabirova <lineprinter@...linux.org>,
Eugene Syromyatnikov <esyr@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Andy Lutomirski <luto@...nel.org>,
linux-parisc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH linux-next v10 4/7] parisc: define syscall_get_error()
syscall_get_error() is required to be implemented on all
architectures in addition to already implemented syscall_get_nr(),
syscall_get_arguments(), syscall_get_return_value(), and
syscall_get_arch() functions in order to extend the generic
ptrace API with PTRACE_GET_SYSCALL_INFO request.
Acked-by: Helge Deller <deller@....de> # parisc
Cc: James E.J. Bottomley <jejb@...isc-linux.org>
Cc: Elvira Khabirova <lineprinter@...linux.org>
Cc: Eugene Syromyatnikov <esyr@...hat.com>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: linux-parisc@...r.kernel.org
Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
---
Notes:
v10: unchanged
v9: unchanged
v8: added Acked-by
v7: unchanged
v6: unchanged
v5: initial revision
arch/parisc/include/asm/syscall.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h
index 80757e43cf2c..00b127a5e09b 100644
--- a/arch/parisc/include/asm/syscall.h
+++ b/arch/parisc/include/asm/syscall.h
@@ -29,6 +29,13 @@ static inline void syscall_get_arguments(struct task_struct *tsk,
args[0] = regs->gr[26];
}
+static inline long syscall_get_error(struct task_struct *task,
+ struct pt_regs *regs)
+{
+ unsigned long error = regs->gr[28];
+ return IS_ERR_VALUE(error) ? error : 0;
+}
+
static inline long syscall_get_return_value(struct task_struct *task,
struct pt_regs *regs)
{
--
ldv
Powered by blists - more mailing lists