[PATCH v10] linux: Add support for getrandom vDSO
Florian Weimer
fweimer@redhat.com
Tue Nov 5 15:58:13 GMT 2024
* Adhemerval Zanella:
> diff --git a/NEWS b/NEWS
> index 2fe0396b2d..0d3107ed68 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -42,7 +42,9 @@ Deprecated and removed features, and other changes affecting compatibility:
>
> Changes to build and runtime requirements:
>
> - [Add changes to build and runtime requirements here]
> +* On recent Linux kernels with vDSO getrandom support, getrandom does not
> + act as a shall occur cancellation point. It this case, the getrandom may
> + not issue any syscall, nor trigger a deferred cancellation event.
Maybe a native speaker could make some suggestions here? I would at
least add quotation marks around “shall occur”, to make the attributive
use clearer, or add a hyphen.
> diff --git a/sysdeps/unix/sysv/linux/getrandom-internal.h b/sysdeps/unix/sysv/linux/getrandom-internal.h
> new file mode 100644
> index 0000000000..37e6c9bc15
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/getrandom-internal.h
> +static bool
> +vgetrandom_get_state_alloc (void)
> +{
> + for (size_t i = 0; i < states_per_page; ++i)
> + {
> + /* There is no need to handle states that stranddle a page becuase
Typos: stra[]ddle, bec[au]se
I think the allocation logic is now correct.
Thanks,
Florian
More information about the Libc-alpha
mailing list