From: Andreas Schwab Date: Sun, 29 Jun 2025 10:09:25 +0000 (+0200) Subject: testsuite/init_module: Handle __NR_riscv_hwprobe in syscall wrapper X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=84db2f930f866e70b040000acb276d5621c6bd51;p=thirdparty%2Fkmod.git testsuite/init_module: Handle __NR_riscv_hwprobe in syscall wrapper The libcrypto library constructor calls the riscv_hwprobe syscall through the syscall wrapper. Return an error with ENOSYS. Signed-off-by: Andreas Schwab Link: https://github.com/kmod-project/kmod/pull/387 Signed-off-by: Lucas De Marchi Reviewed-by: Emil Velikov --- diff --git a/testsuite/init_module.c b/testsuite/init_module.c index 8ff26999..c419aa3e 100644 --- a/testsuite/init_module.c +++ b/testsuite/init_module.c @@ -370,6 +370,13 @@ TS_EXPORT long int syscall(long int __sysno, ...) return nextlib_syscall(__NR_gettid); } +#ifdef __NR_riscv_hwprobe + if (__sysno == __NR_riscv_hwprobe) { + errno = ENOSYS; + return -1; + } +#endif + /* * FIXME: no way to call the libc function due since this is a * variadic argument function and we don't have a vsyscall() variant