Skip to contentSkip to conversation

selftests/livepatch: Add RISC-V syscall wrapper prefix

PATCH Superseded Wang Han 1 participant 1 message Jun 29

Subsystems (4)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Wang Han

author
#0 lore raw

PATCH v4 7/7 selftests/livepatch: Add RISC-V syscall wrapper prefix

The syscall livepatch selftest resolves and patches a syscall wrapper symbol. To use that test for RISC-V livepatch validation, add the RISC-V FN_PREFIX definition for ARCH_HAS_SYSCALL_WRAPPER.

Without this macro, the syscall livepatch selftest cannot resolve the RISC-V target symbol, and the syscall-related livepatch test fails on RISC-V.

---
 .../testing/selftests/livepatch/test_modules/test_klp_syscall.c | 2 ++
 1 file changed, 2 insertions(+)
tools/testing/selftests/livepatch/test_modules/test_klp_syscall.c +2 -0
index 08aacc0e14de..9baa2a5f84c9 100644
@@ -24,6 +24,8 @@
     #define FN_PREFIX __s390x_
   #elif defined(__aarch64__)
     #define FN_PREFIX __arm64_
+  #elif defined(__riscv)
+    #define FN_PREFIX __riscv_
   #elif defined(__powerpc__)
     #define FN_PREFIX
   #else
Signature · 1 line
2.43.0