[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250409155207.GA1506425@ax162>
Date: Wed, 9 Apr 2025 08:52:07 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: "Dmitry V. Levin" <ldv@...ace.io>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Oleg Nesterov <oleg@...hat.com>,
Charlie Jenkins <charlie@...osinc.com>,
Arnd Bergmann <arnd@...db.de>, strace-devel@...ts.strace.io,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org
Subject: Re: [PATCH v7 2/6] syscall.h: add syscall_set_arguments()
On Wed, Apr 09, 2025 at 09:40:18AM +0300, Dmitry V. Levin wrote:
> On Tue, Apr 08, 2025 at 05:38:03PM -0700, Nathan Chancellor wrote:
> > diff --git a/arch/riscv/include/asm/syscall.h b/arch/riscv/include/asm/syscall.h
> > index a5281cdf2b10..34313387f977 100644
> > --- a/arch/riscv/include/asm/syscall.h
> > +++ b/arch/riscv/include/asm/syscall.h
> > @@ -69,8 +69,11 @@ static inline void syscall_get_arguments(struct task_struct *task,
> > unsigned long *args)
> > {
> > args[0] = regs->orig_a0;
> > - args++;
> > - memcpy(args, ®s->a1, 5 * sizeof(args[0]));
> > + args[1] = regs->a1;
> > + args[2] = regs->a2;
> > + args[3] = regs->a3;
> > + args[4] = regs->a4;
> > + args[5] = regs->a5;
> > }
> >
> > static inline void syscall_set_arguments(struct task_struct *task,
> > @@ -78,8 +81,11 @@ static inline void syscall_set_arguments(struct task_struct *task,
> > const unsigned long *args)
> > {
> > regs->orig_a0 = args[0];
> > - args++;
> > - memcpy(®s->a1, args, 5 * sizeof(regs->a1));
> > + regs->a1 = args[1];
> > + regs->a2 = args[2];
> > + regs->a3 = args[3];
> > + regs->a4 = args[4];
> > + regs->a5 = args[5];
> > }
> >
> > static inline int syscall_get_arch(struct task_struct *task)
>
> Looks good, thanks. How do we proceed from this point?
I can send a standalone patch for syscall_get_arguments() since that is
an issue present before your series then Andrew could fold in the same
change for syscall_set_arguments() into your change that introduces it
so there is no bisect problem?
Cheers,
Nathan
Powered by blists - more mailing lists