2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/tools/testing/selftests/vDSO
Xi Ruoyao ee0d03053e
RISC-V: vDSO: Wire up getrandom() vDSO implementation
Hook up the generic vDSO implementation to the generic vDSO getrandom
implementation by providing the required __arch_chacha20_blocks_nostack
and getrandom_syscall implementations. Also wire up the selftests.

The benchmark result:

	vdso: 25000000 times in 2.466341333 seconds
	libc: 25000000 times in 41.447720005 seconds
	syscall: 25000000 times in 41.043926672 seconds

	vdso: 25000000 x 256 times in 162.286219353 seconds
	libc: 25000000 x 256 times in 2953.855018685 seconds
	syscall: 25000000 x 256 times in 2796.268546000 seconds

[ alex: - Fix dynamic relocation
        - Squash Nathan's fix https://lore.kernel.org/all/20250423-riscv-fix-compat_vdso-lld-v2-1-b7bbbc244501@kernel.org/
	- Add comment from Loongarch ]

Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Link: https://lore.kernel.org/r/20250411024600.16045-1-xry111@xry111.site
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
2025-06-05 14:03:09 -07:00
..
.gitignore selftests/vDSO: add tests for vgetrandom 2024-07-19 20:22:12 +02:00
Makefile selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc 2025-03-03 20:00:13 +01:00
parse_vdso.c Updates for the VDSO infrastructure: 2025-03-25 11:30:42 -07:00
parse_vdso.h selftests: vDSO: parse_vdso: Drop vdso_init_from_auxv() 2025-03-03 20:00:12 +01:00
vdso_call.h selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00
vdso_config.h selftests: vDSO: fix vdso_config for s390 2024-09-13 17:28:36 +02:00
vdso_standalone_test_x86.c selftests: vDSO: vdso_standalone_test_x86: Switch to nolibc 2025-03-03 20:00:13 +01:00
vdso_test_abi.c selftests: vDSO: use parse_vdso.h in vdso_test_abi 2024-08-30 15:48:45 +02:00
vdso_test_chacha.c selftests: vDSO: improve getrandom and chacha error messages 2024-10-08 15:21:52 -06:00
vdso_test_clock_getres.c kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined 2023-06-12 16:39:10 -06:00
vdso_test_correctness.c selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00
vdso_test_getcpu.c selftests: vDSO: fix the way vDSO functions are called for powerpc 2024-08-30 15:48:45 +02:00
vdso_test_getrandom.c selftests: vDSO: Explicitly include sched.h 2024-10-08 15:48:09 -06:00
vdso_test_gettimeofday.c selftests: vDSO: vdso_test_gettimeofday: Make compatible with nolibc 2025-03-03 20:00:13 +01:00
vgetrandom-chacha.S RISC-V: vDSO: Wire up getrandom() vDSO implementation 2025-06-05 14:03:09 -07:00