Re: [PATCH 1/2] powerpc: properly negate error in syscall_set_return_value() in sc case

2025-01-28 Thread Eugene Syromyatnikov
> arch/powerpc/include/asm/syscall.h | 6 +- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/arch/powerpc/include/asm/syscall.h > > b/arch/powerpc/include/asm/syscall.h > > index 3dd36c5e334a..422d7735ace6 100644 > > --- a/arch/powerpc/include/asm/syscall.h > > +++ b/arch/powerpc/include/asm/syscall.h > > @@ -82,7 +82,11 @@ static inline void syscall_set_return_value(struct > > task_struct *task, > >*/ > > if (error) { > > regs->ccr |= 0x1000L; > > - regs->gpr[3] = error; > > + /* > > + * In case of an error regs->gpr[3] contains > > + * a positive ERRORCODE. > > + */ > > + regs->gpr[3] = -error; > > } else { > > regs->ccr &= ~0x1000L; > > regs->gpr[3] = val; > -- Eugene Syromyatnikov mailto:evg...@gmail.com xmpp:esyr@jabber.{ru|org}

Re: [PATCH v2 1/7] powerpc: properly negate error in syscall_set_return_value()

2025-01-23 Thread Eugene Syromyatnikov
the lack of the v2 ABI and scv there), so I would suggest to consider any deviation from that a kernel programming error to be fixed. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arch/powerpc/syscall64-abi.rst?id=v6.13#n30 -- Eugene Syromyatnikov mailto:evg...@gmail.com xmpp:esyr@jabber.{ru|org}

Re: [PATCH v2 3/7] syscall.h: add syscall_set_arguments() and syscall_set_return_value()

2025-01-17 Thread Eugene Syromyatnikov
different bit-widths within the "same" architecture are different. > This isn't unique to this patch in any way; the only way to handle it is > by keeping track of each ABI. That's true, but this patch doesn't even try to address that. -- Eugene Syromyatnikov mailto:evg...@gmail.com xmpp:esyr@jabber.{ru|org}