From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Xi Ruoyao <xry111@xry111.site>, Huacai Chen <chenhuacai@kernel.org>
Cc: Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
linux-crypto@vger.kernel.org, loongarch@lists.linux.dev,
linux-kernel@vger.kernel.org, Jinyang He <hejinyang@loongson.cn>,
Tiezhu Yang <yangtiezhu@loongson.cn>,
Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
Christophe Leroy <christophe.leroy@csgroup.eu>
Subject: Re: [PATCH v5] LoongArch: vDSO: Wire up getrandom() vDSO implementation
Date: Thu, 29 Aug 2024 15:13:06 +0200 [thread overview]
Message-ID: <ZtBz4l--dxkNt7yG@zx2c4.com> (raw)
In-Reply-To: <20240829125656.19017-1-xry111@xry111.site>
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@xry111.site>
> ---
>
> 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
next prev parent reply other threads:[~2024-08-29 13:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 12:56 [PATCH v5] LoongArch: vDSO: Wire up getrandom() vDSO implementation Xi Ruoyao
2024-08-29 13:01 ` Xi Ruoyao
2024-08-29 13:05 ` Jason A. Donenfeld
2024-08-29 13:13 ` Jason A. Donenfeld [this message]
2024-08-29 13:18 ` Huacai Chen
2024-08-31 6:40 ` Xi Ruoyao
2024-08-31 7:10 ` Huacai Chen
2024-08-31 8:54 ` Christophe Leroy
2024-08-29 13:27 ` Jason A. Donenfeld
2024-08-29 13:37 ` Jason A. Donenfeld
2024-08-29 14:06 ` Xi Ruoyao
2024-08-29 14:44 ` Jason A. Donenfeld
2024-08-30 9:05 ` Xi Ruoyao
2024-08-30 12:24 ` Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZtBz4l--dxkNt7yG@zx2c4.com \
--to=jason@zx2c4.com \
--cc=arnd@arndb.de \
--cc=chenhuacai@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=hejinyang@loongson.cn \
--cc=kernel@xen0n.name \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=tglx@linutronix.de \
--cc=xry111@xry111.site \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox