[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250203070003.GC14120@strace.io>
Date: Mon, 3 Feb 2025 09:00:03 +0200
From: "Dmitry V. Levin" <ldv@...ace.io>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Brian Cain <bcain@...cinc.com>, Oleg Nesterov <oleg@...hat.com>,
Alexey Gladkov <legion@...nel.org>,
Eugene Syromyatnikov <evgsyr@...il.com>,
Mike Frysinger <vapier@...too.org>,
Renzo Davoli <renzo@...unibo.it>,
Davide Berardi <berardi.dav@...il.com>,
strace-devel@...ts.strace.io, linux-hexagon@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v4 2/7] hexagon: add syscall_set_return_value()
hexagon is the only architecture that provides HAVE_ARCH_TRACEHOOK but
doesn't define syscall_set_return_value(). Since this function is going
to be needed on all HAVE_ARCH_TRACEHOOK architectures to implement
PTRACE_SET_SYSCALL_INFO API, add it on hexagon, too.
Signed-off-by: Dmitry V. Levin <ldv@...ace.io>
---
arch/hexagon/include/asm/syscall.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/hexagon/include/asm/syscall.h b/arch/hexagon/include/asm/syscall.h
index f6e454f18038..951ca0ed8376 100644
--- a/arch/hexagon/include/asm/syscall.h
+++ b/arch/hexagon/include/asm/syscall.h
@@ -45,6 +45,13 @@ static inline long syscall_get_return_value(struct task_struct *task,
return regs->r00;
}
+static inline void syscall_set_return_value(struct task_struct *task,
+ struct pt_regs *regs,
+ int error, long val)
+{
+ regs->r00 = (long) error ?: val;
+}
+
static inline int syscall_get_arch(struct task_struct *task)
{
return AUDIT_ARCH_HEXAGON;
--
ldv
Powered by blists - more mailing lists