]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
testsuite/init_module: Handle __NR_riscv_hwprobe in syscall wrapper
authorAndreas Schwab <schwab@suse.de>
Sun, 29 Jun 2025 10:09:25 +0000 (12:09 +0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 11 Jul 2025 15:31:51 +0000 (10:31 -0500)
The libcrypto library constructor calls the riscv_hwprobe syscall through
the syscall wrapper.  Return an error with ENOSYS.

Signed-off-by: Andreas Schwab <schwab@suse.de>
Link: https://github.com/kmod-project/kmod/pull/387
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
testsuite/init_module.c

index 8ff26999624b08af119d1ea3dfd3b13e1c2249db..c419aa3e3456383b427eaaf93de973ba644577ab 100644 (file)
@@ -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