[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o77mpjgd.fsf@all.your.base.are.belong.to.us>
Date: Thu, 27 Jun 2024 16:08:02 +0200
From: Björn Töpel <bjorn@...nel.org>
To: Celeste Liu <coelacanthushex@...il.com>,
linux-riscv@...ts.infradead.org, Björn Töpel
<bjorn@...osinc.com>, "Dmitry
V . Levin" <ldv@...ace.io>
Cc: linux-kernel@...r.kernel.org, Guo Ren <guoren@...nel.org>, Palmer
Dabbelt <palmer@...osinc.com>, Emil Renner Berthing
<emil.renner.berthing@...onical.com>, Felix Yan
<felixonmars@...hlinux.org>, Ruizhe Pan <c141028@...il.com>, Celeste Liu
<CoelacanthusHex@...il.com>, stable@...r.kernel.org
Subject: Re: [PATCH] riscv: entry: always initialize regs->a0 to -ENOSYS
Celeste Liu <coelacanthushex@...il.com> writes:
> Otherwise when the tracer changes syscall number to -1, the kernel fails
> to initialize a0 with -ENOSYS and subsequently fails to return the error
> code of the failed syscall to userspace. For example, it will break
> strace syscall tampering.
>
> Fixes: 52449c17bdd1 ("riscv: entry: set a0 = -ENOSYS only when syscall != -1")
> Cc: stable@...r.kernel.org
> Signed-off-by: Celeste Liu <CoelacanthusHex@...il.com>
Reported-by: "Dmitry V. Levin" <ldv@...ace.io>
Reviewed-by: Björn Töpel <bjorn@...osinc.com>
Powered by blists - more mailing lists