summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2024-03-11 20:31:44 +0100
committerPalmer Dabbelt <palmer@rivosinc.com>2024-03-20 19:37:51 +0100
commita9ad73295cc1e3af0253eee7d08943b2419444c4 (patch)
tree3a1d9966c8241e594f7f08a7e97da99f85bf0409 /include
parentMerge patch series "riscv: mm: Extend mappable memory up to hint address" (diff)
downloadlinux-a9ad73295cc1e3af0253eee7d08943b2419444c4.tar.xz
linux-a9ad73295cc1e3af0253eee7d08943b2419444c4.zip
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 <raj.khem@gmail.com> Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Link: https://lore.kernel.org/r/20240311193143.2981310-2-samitolvanen@google.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions