[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6b8e1e79-5a2e-416c-8fee-878b3f5568a0@gmail.com>
Date: Thu, 27 Jun 2024 22:29:00 +0800
From: Celeste Liu <coelacanthushex@...il.com>
To: Björn Töpel <bjorn@...nel.org>,
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>,
stable@...r.kernel.org
Subject: Re: [PATCH] riscv: entry: always initialize regs->a0 to -ENOSYS
On 2024-06-27 22:08, Björn Töpel wrote:
> 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>
Patch v2 has been sent.
Powered by blists - more mailing lists