All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Helge Deller <deller@gmx.de>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	Elvira Khabirova <lineprinter@altlinux.org>,
	Eugene Syromyatnikov <esyr@redhat.com>,
	Oleg Nesterov <oleg@redhat.com>,
	Andy Lutomirski <luto@kernel.org>,
	linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH linux-next v10 4/7] parisc: define syscall_get_error()
Date: Tue, 16 Apr 2019 02:44:30 +0300	[thread overview]
Message-ID: <20190415234430.GD9384@altlinux.org> (raw)
In-Reply-To: <20190415234307.GA9364@altlinux.org>

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@gmx.de> # parisc
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: Elvira Khabirova <lineprinter@altlinux.org>
Cc: Eugene Syromyatnikov <esyr@redhat.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Dmitry V. Levin <ldv@altlinux.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

  parent reply	other threads:[~2019-04-15 23:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 23:43 [PATCH linux-next v10 0/7] ptrace: add PTRACE_GET_SYSCALL_INFO request Dmitry V. Levin
2019-04-15 23:43 ` Dmitry V. Levin
2019-04-15 23:43 ` Dmitry V. Levin
2019-04-15 23:43 ` Dmitry V. Levin
2019-04-15 23:43 ` ldv
2019-04-15 23:44 ` [PATCH linux-next v10 1/7] nds32: fix asm/syscall.h Dmitry V. Levin
2019-04-15 23:44 ` [PATCH linux-next v10 2/7] hexagon: define syscall_get_error() and syscall_get_return_value() Dmitry V. Levin
2019-04-15 23:44 ` [PATCH linux-next v10 3/7] mips: define syscall_get_error() Dmitry V. Levin
2019-04-15 23:44 ` Dmitry V. Levin [this message]
2019-04-15 23:44 ` [PATCH linux-next v10 5/7] powerpc: " Dmitry V. Levin
2019-04-15 23:44   ` Dmitry V. Levin
2019-05-06 13:17   ` Michael Ellerman
2019-05-06 13:17     ` Michael Ellerman
2019-04-15 23:44 ` [PATCH linux-next v10 6/7] ptrace: add PTRACE_GET_SYSCALL_INFO request Dmitry V. Levin
2019-04-15 23:44   ` Dmitry V. Levin
2019-04-15 23:45 ` [PATCH linux-next v10 7/7] selftests/ptrace: add a test case for PTRACE_GET_SYSCALL_INFO Dmitry V. Levin
2019-04-15 23:45   ` Dmitry V. Levin
2019-04-15 23:45   ` ldv
2019-05-09 16:14 ` [PATCH linux-next v10 0/7] ptrace: add PTRACE_GET_SYSCALL_INFO request Oleg Nesterov
2019-05-09 16:14   ` Oleg Nesterov
2019-05-09 16:14   ` Oleg Nesterov
2019-05-09 16:14   ` Oleg Nesterov
2019-05-09 16:14   ` oleg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190415234430.GD9384@altlinux.org \
    --to=ldv@altlinux.org \
    --cc=akpm@linux-foundation.org \
    --cc=deller@gmx.de \
    --cc=esyr@redhat.com \
    --cc=jejb@parisc-linux.org \
    --cc=lineprinter@altlinux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=oleg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.