From: Celeste Liu <coelacanthushex@gmail.com>
To: "Björn Töpel" <bjorn@kernel.org>,
linux-riscv@lists.infradead.org,
"Björn Töpel" <bjorn@rivosinc.com>,
"Dmitry V . Levin" <ldv@strace.io>
Cc: linux-kernel@vger.kernel.org, Guo Ren <guoren@kernel.org>,
Palmer Dabbelt <palmer@rivosinc.com>,
Emil Renner Berthing <emil.renner.berthing@canonical.com>,
Felix Yan <felixonmars@archlinux.org>,
Ruizhe Pan <c141028@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] riscv: entry: always initialize regs->a0 to -ENOSYS
Date: Thu, 27 Jun 2024 22:29:00 +0800 [thread overview]
Message-ID: <6b8e1e79-5a2e-416c-8fee-878b3f5568a0@gmail.com> (raw)
In-Reply-To: <87o77mpjgd.fsf@all.your.base.are.belong.to.us>
On 2024-06-27 22:08, Björn Töpel wrote:
> Celeste Liu <coelacanthushex@gmail.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@vger.kernel.org
>> Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com>
>
> Reported-by: "Dmitry V. Levin" <ldv@strace.io>
> Reviewed-by: Björn Töpel <bjorn@rivosinc.com>
Patch v2 has been sent.
next prev parent reply other threads:[~2024-06-27 14:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 10:32 [PATCH] riscv: entry: always initialize regs->a0 to -ENOSYS Celeste Liu
2024-06-27 14:08 ` Björn Töpel
2024-06-27 14:29 ` Celeste Liu [this message]
2024-06-27 15:48 ` Björn Töpel
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=6b8e1e79-5a2e-416c-8fee-878b3f5568a0@gmail.com \
--to=coelacanthushex@gmail.com \
--cc=bjorn@kernel.org \
--cc=bjorn@rivosinc.com \
--cc=c141028@gmail.com \
--cc=emil.renner.berthing@canonical.com \
--cc=felixonmars@archlinux.org \
--cc=guoren@kernel.org \
--cc=ldv@strace.io \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@rivosinc.com \
--cc=stable@vger.kernel.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