summaryrefslogtreecommitdiff
path: root/drivers/platform/surface/aggregator/controller.c
diff options
context:
space:
mode:
authorCeleste Liu <coelacanthushex@gmail.com>2024-06-27 22:23:39 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-29 17:33:42 +0200
commit84557cd61182edf7c776bd7d3284df5cacb22f7e (patch)
tree748edfd6590c4d8aa83ed41a554d273e795547dc /drivers/platform/surface/aggregator/controller.c
parente84f4400bf8caaa06ffce9a97e8f2a4bd91246fe (diff)
riscv: entry: always initialize regs->a0 to -ENOSYS
[ Upstream commit 61119394631f219e23ce98bcc3eb993a64a8ea64 ] 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") Reported-by: "Dmitry V. Levin" <ldv@strace.io> Reviewed-by: Björn Töpel <bjorn@rivosinc.com> Cc: stable@vger.kernel.org Signed-off-by: Celeste Liu <CoelacanthusHex@gmail.com> Link: https://lore.kernel.org/r/20240627142338.5114-2-CoelacanthusHex@gmail.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/platform/surface/aggregator/controller.c')
0 files changed, 0 insertions, 0 deletions