summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-09-01 14:13:11 +0800
committerJason A. Donenfeld <Jason@zx2c4.com>2024-09-13 17:28:35 +0200
commit18efd0b10e0fd77fe649a375f9f17a387b5d1609 (patch)
tree66cb8366065d0f5866f08e4cade3e2ccd968eb99 /tools
parent4d456f0c87c95efb6197a30cd76b5b6ee5fb012e (diff)
LoongArch: vDSO: Wire up getrandom() vDSO implementation
Hook up the generic vDSO implementation to the LoongArch vDSO data page by providing the required __arch_chacha20_blocks_nostack, __arch_get_k_vdso_rng_data, and getrandom_syscall implementations. Also wire up the selftests. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Acked-by: Huacai Chen <chenhuacai@kernel.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tools')
l---------tools/arch/loongarch/vdso1
-rw-r--r--tools/testing/selftests/vDSO/Makefile2
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/arch/loongarch/vdso b/tools/arch/loongarch/vdso
new file mode 120000
index 000000000000..ebda43a82db7
--- /dev/null
+++ b/tools/arch/loongarch/vdso
@@ -0,0 +1 @@
+../../../arch/loongarch/vdso \ No newline at end of file
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index bd5005a7b37a..d586d3e7a7c1 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -9,7 +9,7 @@ ifeq ($(ARCH),$(filter $(ARCH),x86 x86_64))
TEST_GEN_PROGS += vdso_standalone_test_x86
endif
TEST_GEN_PROGS += vdso_test_correctness
-ifeq ($(ARCH)$(CONFIG_X86_32),$(filter $(ARCH)$(CONFIG_X86_32),x86 x86_64))
+ifeq ($(ARCH)$(CONFIG_X86_32),$(filter $(ARCH)$(CONFIG_X86_32),x86 x86_64 loongarch))
TEST_GEN_PROGS += vdso_test_getrandom
TEST_GEN_PROGS += vdso_test_chacha
endif