From: Yiqi Sun <sunyiqixm@gmail.com>
To: linux-m68k@lists.linux-m68k.org, geert@linux-m68k.org
Cc: linux-kernel@vger.kernel.org, Yiqi Sun <sunyiqixm@gmail.com>
Subject: [PATCH] m68k: syscall: fix syscall_get_arguments() argument mapping
Date: Fri, 29 May 2026 17:40:23 +0800 [thread overview]
Message-ID: <20260529094023.1428008-1-sunyiqixm@gmail.com> (raw)
On m68k, syscall_get_arguments() currently returns orig_d0 as args[0],
followed by d1-d5 as args[1..5].
However, syscall arguments are passed in d1-d5 and a0, so args[0]
should reflect d1, and the full argument set should include a0.
Fix the mapping by copying all six arguments from the saved register
block starting at d1.
Fixes: 6baaade15594 ("m68k: Add kernel seccomp support")
Signed-off-by: Yiqi Sun <sunyiqixm@gmail.com>
---
arch/m68k/include/asm/syscall.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/m68k/include/asm/syscall.h b/arch/m68k/include/asm/syscall.h
index bf84b160c2eb..2e268eeedad3 100644
--- a/arch/m68k/include/asm/syscall.h
+++ b/arch/m68k/include/asm/syscall.h
@@ -52,10 +52,7 @@ static inline void syscall_get_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned long *args)
{
- args[0] = regs->orig_d0;
- args++;
-
- memcpy(args, ®s->d1, 5 * sizeof(args[0]));
+ memcpy(args, ®s->d1, 6 * sizeof(args[0]));
}
static inline void syscall_set_arguments(struct task_struct *task,
--
2.34.1
next reply other threads:[~2026-05-29 9:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 9:40 Yiqi Sun [this message]
2026-05-29 22:52 ` Michael Schmitz
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=20260529094023.1428008-1-sunyiqixm@gmail.com \
--to=sunyiqixm@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®