2019-01-07 02:56:07

by Dmitry V. Levin

[permalink] [raw]
Subject: [PATCH v7 15/22] 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.

Cc: James E.J. Bottomley <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Elvira Khabirova <[email protected]>
Cc: Eugene Syromyatnikov <[email protected]>
Cc: [email protected]
Signed-off-by: Dmitry V. Levin <[email protected]>
---

Notes:
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 8bff1a58c97f..477511ff7546 100644
--- a/arch/parisc/include/asm/syscall.h
+++ b/arch/parisc/include/asm/syscall.h
@@ -43,6 +43,13 @@ static inline void syscall_get_arguments(struct task_struct *tsk,
}
}

+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


2019-02-28 21:35:01

by Dmitry V. Levin

[permalink] [raw]
Subject: [PATCH v7 15/22] 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.

Cc: Helge Deller <[email protected]>
Cc: James E.J. Bottomley <[email protected]>
Cc: Oleg Nesterov <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Elvira Khabirova <[email protected]>
Cc: Eugene Syromyatnikov <[email protected]>
Cc: [email protected]
Signed-off-by: Dmitry V. Levin <[email protected]>
---

This is just a gentle ping, the patch is unchanged.

Notes:
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 8bff1a58c97f..477511ff7546 100644
--- a/arch/parisc/include/asm/syscall.h
+++ b/arch/parisc/include/asm/syscall.h
@@ -43,6 +43,13 @@ static inline void syscall_get_arguments(struct task_struct *tsk,
}
}

+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

2019-02-28 22:16:05

by Helge Deller

[permalink] [raw]
Subject: Re: [PATCH v7 15/22] parisc: define syscall_get_error()

On 28.02.19 20:38, Dmitry V. Levin wrote:
> 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.
>
> Cc: Helge Deller <[email protected]>
> Cc: James E.J. Bottomley <[email protected]>
> Cc: Oleg Nesterov <[email protected]>
> Cc: Andy Lutomirski <[email protected]>
> Cc: Elvira Khabirova <[email protected]>
> Cc: Eugene Syromyatnikov <[email protected]>
> Cc: [email protected]
> Signed-off-by: Dmitry V. Levin <[email protected]>

Acked-by: Helge Deller <[email protected]> # parisc

Helge


> ---
>
> This is just a gentle ping, the patch is unchanged.
>
> Notes:
> 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 8bff1a58c97f..477511ff7546 100644
> --- a/arch/parisc/include/asm/syscall.h
> +++ b/arch/parisc/include/asm/syscall.h
> @@ -43,6 +43,13 @@ static inline void syscall_get_arguments(struct task_struct *tsk,
> }
> }
>
> +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)
> {
>