[PW_SID:969203] [v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper#479
[PW_SID:969203] [v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper#479linux-riscv-bot wants to merge 2 commits into
Conversation
…scall wrapper As recently pointed out by Thomas, if a register is forced for two different register variables, among them one is used as "+" (both input and output) and another is only used as input, Clang would treat the conflicting input parameters as undefined behaviour and optimize away the argument assignment. Per an example in the GCC documentation, for this purpose we can use "=" (only output) for the output, and "0" for the input for that we must reuse the same register as the output. And GCC developers have confirmed using a simple "r" (that we use for most vDSO implementations) instead of "0" is also fine. Link: https://lore.kernel.org/all/20250603-loongarch-vdso-syscall-v1-1-6d12d6dfbdd0@linutronix.de/ Link: https://gcc.gnu.org/onlinedocs/gcc-15.1.0/gcc/Local-Register-Variables.html Link: https://gcc.gnu.org/pipermail/gcc-help/2025-June/144266.html Cc: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Cc: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Xi Ruoyao <xry111@xry111.site> Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
|
Patch 1: "[v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper" |
e678629 to
7991a94
Compare
PR for series 969203 applied to workflow__riscv__for-next
Name: [v2] RISC-V: vDSO: Correct inline assembly constraints in the getrandom syscall wrapper
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=969203
Version: 2