From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Harald Freudenberger <freude@linux.ibm.com>,
Stefan Liebler <stli@linux.ibm.com>,
linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: Re: [PATCH 7/7] s390/vdso: Wire up getrandom() vdso implementation
Date: Fri, 13 Sep 2024 15:53:43 +0200 [thread overview]
Message-ID: <ZuRD58DrEzzcXKZg@zx2c4.com> (raw)
In-Reply-To: <20240913130544.2398678-8-hca@linux.ibm.com>
On Fri, Sep 13, 2024 at 03:05:43PM +0200, Heiko Carstens wrote:
> Provide the s390 specific vdso getrandom() architecture backend.
>
> _vdso_rng_data required data is placed within the _vdso_data vvar page, by
> using a hardcoded offset larger than vdso_data.
>
> As required the chacha20 implementation does not write to the stack.
>
> The implementation follows more or less the arm64 implementations and
> makes use of vector instructions. It has a fallback to the getrandom()
> system call for machines where the vector facility is not
> installed.
> The check if the vector facility is installed, as well as an
> optimization for machines with the vector-enhancements facility 2,
> is implemented with alternatives, avoiding runtime checks.
>
> Note that __kernel_getrandom() is implemented without the vdso user wrapper
> which would setup a stack frame for odd cases (aka very old glibc variants)
> where the caller has not done that. All callers of __kernel_getrandom() are
> required to setup a stack frame, like the C ABI requires it.
>
> The vdso testcases vdso_test_getrandom and vdso_test_chacha pass.
I'd be curious to see the results of ./vdso_test_getrandom bench-single
and such.
Jason
next prev parent reply other threads:[~2024-09-13 13:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 13:05 [PATCH 0/7] s390/vdso: getrandom() vdso implementation Heiko Carstens
2024-09-13 13:05 ` [PATCH 1/7] s390/facility: Disable compile time optimization for decompressor code Heiko Carstens
2024-09-13 13:05 ` [PATCH 2/7] s390/alternatives: Remove ALT_FACILITY_EARLY Heiko Carstens
2024-09-13 13:05 ` [PATCH 3/7] s390/facility: Let test_facility() generate static branch if possible Heiko Carstens
2024-09-13 13:05 ` [PATCH 4/7] s390/module: Provide find_section() helper Heiko Carstens
2024-09-13 13:05 ` [PATCH 5/7] s390/vdso: Allow alternatives in vdso code Heiko Carstens
2024-09-13 13:05 ` [PATCH 6/7] s390/vdso: Move vdso symbol handling to separate header file Heiko Carstens
2024-09-13 13:05 ` [PATCH 7/7] s390/vdso: Wire up getrandom() vdso implementation Heiko Carstens
2024-09-13 13:53 ` Jason A. Donenfeld [this message]
2024-09-13 14:16 ` Heiko Carstens
2024-09-13 14:57 ` Jason A. Donenfeld
2024-09-13 17:37 ` Heiko Carstens
2024-09-13 14:13 ` Harald Freudenberger
2024-09-13 15:13 ` Jason A. Donenfeld
2024-09-13 15:22 ` Jason A. Donenfeld
2024-09-13 15:24 ` Jason A. Donenfeld
2024-09-13 17:32 ` Heiko Carstens
2024-09-13 19:23 ` Jason A. Donenfeld
2024-09-14 17:42 ` Heiko Carstens
2024-09-16 9:08 ` Jason A. Donenfeld
2024-09-16 11:01 ` Heiko Carstens
2024-09-16 11:23 ` Jason A. Donenfeld
2024-09-13 13:52 ` [PATCH 0/7] s390/vdso: " Jason A. Donenfeld
2024-09-13 13:56 ` Jason A. Donenfeld
2024-09-13 14:29 ` Heiko Carstens
2024-09-13 14:57 ` 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=ZuRD58DrEzzcXKZg@zx2c4.com \
--to=jason@zx2c4.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=freude@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=stli@linux.ibm.com \
--cc=svens@linux.ibm.com \
/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