diff options
author | Sami Tolvanen <[email protected]> | 2024-03-11 19:31:44 +0000 |
---|---|---|
committer | Palmer Dabbelt <[email protected]> | 2024-03-20 11:37:51 -0700 |
commit | a9ad73295cc1e3af0253eee7d08943b2419444c4 (patch) | |
tree | 3a1d9966c8241e594f7f08a7e97da99f85bf0409 /arch/riscv/kernel/smpboot.c | |
parent | eeb7a8933e71f98354536c3d849a26978539b09f (diff) |
riscv: Fix syscall wrapper for >word-size arguments
The current syscall wrapper macros break 64-bit arguments on
rv32 because they only guarantee the first N input registers are
passed to syscalls that accept N arguments. According to the
calling convention, values twice the word size reside in register
pairs and as a result, syscall arguments don't always have a
direct register mapping on rv32.
Instead of using `__MAP(x,__SC_LONG,__VA_ARGS__)` to declare the
type of the `__se(_compat)_sys_*` functions on rv32, change the
function declarations to accept `ulong` arguments and alias them
to the actual syscall implementations, similarly to the existing
macros in include/linux/syscalls.h. This matches previous
behavior and ensures registers are passed to syscalls as-is, no
matter which argument types they expect.
Fixes: 08d0ce30e0e4 ("riscv: Implement syscall wrappers")
Reported-by: Khem Raj <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Palmer Dabbelt <[email protected]>
Diffstat (limited to 'arch/riscv/kernel/smpboot.c')
0 files changed, 0 insertions, 0 deletions