Re: [PATCH v5] LoongArch: vDSO: Wire up getrandom() vDSO implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Huacai & Ruoyao,

On Thu, Aug 29, 2024 at 08:56:55PM +0800, Xi Ruoyao wrote:
> 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 enable the vDSO getrandom tests for LoongArch: create the symlink
> to the arch/loongarch/vdso directory, and correctly set the ARCH
> variable for LoongArch.
> 
> Signed-off-by: Xi Ruoyao <xry111@xxxxxxxxxxx>
> ---
>
> Passed vdso_test_getrandom and vdso_test_chacha tests.  Benchmark
> results:
> 
> vdso_test_getrandom bench-single:
> 
>        vdso: 25000000 times in 0.499490289 seconds
>        libc: 25000000 times in 6.963829873 seconds
>     syscall: 25000000 times in 6.983413486 seconds
> 
> vdso_test_getrandom bench-multi:
>        vdso: 25000000 x 256 times in 28.703710823 seconds
>        libc: 25000000 x 256 times in 356.835801784 seconds
>        syscall: 25000000 x 256 times in 338.525837197 seconds
 
Thanks for including the test results. I've also verified the
vdso_test_chacha and can confirm that passes:

zx2c4@thinkpad ~/Projects/random-linux/tools/testing/selftests/vDSO $  /home/zx2c4/Downloads/Chrome/cross-tools/bin/loongarch64-unknown-linux-gnu-gcc -std=gnu99 -D_GNU_SOURCE= -idirafter /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../tools/include -idirafter /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../arch/loongarch/include -idirafter /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../include -D__ASSEMBLY__ -Wa,--noexecstack    vdso_test_chacha.c /home/zx2c4/Projects/random-linux/tools/testing/selftests/../../../tools/arch/loongarch/vdso/vgetrandom-chacha.S  -o /home/zx2c4/Projects/random-linux/tools/testing/selftests/vDSO/vdso_test_chacha -static
zx2c4@thinkpad ~/Projects/random-linux/tools/testing/selftests/vDSO $ qemu-loongarch64 /home/zx2c4/Projects/random-linux/tools/testing/selftests/vDSO/vdso_test_chacha
TAP version 13
1..1
ok 1 chacha: PASS

So, with the asm-offsets.c snippet removed as you instructed, this is
fine for me. I'll happily queue this up for 6.12, but I'd like Huacai's
Acked-by first.

Huacai, does this look okay to you?

Thanks,
Jason




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux