lkml.org 
[lkml]   [2023]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] riscv: entry: Save a0 prior syscall_enter_from_user_mode()
Date
From

On Mon, 03 Apr 2023 08:52:07 +0200, Björn Töpel wrote:
> The RISC-V calling convention passes the first argument, and the
> return value in the a0 register. For this reason, the a0 register
> needs some extra care; When handling syscalls, the a0 register is
> saved into regs->orig_a0, so a0 can be properly restored for,
> e.g. interrupted syscalls.
>
> This functionality was broken with the introduction of the generic
> entry patches. Here, a0 was saved into orig_a0 after calling
> syscall_enter_from_user_mode(), which can change regs->a0 for some
> paths, incorrectly restoring a0.
>
> [...]

Applied, thanks!

[1/1] riscv: entry: Save a0 prior syscall_enter_from_user_mode()
https://git.kernel.org/palmer/c/9c2598d43510

Best regards,
--
Palmer Dabbelt <palmer@rivosinc.com>

\
 
 \ /
  Last update: 2023-04-11 19:40    [W:0.067 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site