[PATCH v4] stdlib: Consolidate getentropy and adapt to POSIX 2024 semantics

Florian Weimer fweimer@redhat.com
Mon Jun 30 19:47:40 GMT 2025


* Adhemerval Zanella:

> POSIX.1-2024 added getentropy with some slight different semantics,
> where buffer larger than 256 (GETENTROPY_MAX) should return EINVAL
> insted of EIO.
>
> So a a new compat symbol is added to return EIO for large buffer, and
> if no entropy could ge obtained from __getrandom_nocancel.

Typos: “a a”, “ge”

> diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
> index a0e686afc7..c4d7a362ff 100644
> --- a/sysdeps/mach/hurd/i386/libc.abilist
> +++ b/sysdeps/mach/hurd/i386/libc.abilist
> @@ -691,7 +691,7 @@ GLIBC_2.2.6 _libc_intl_domainname D 0x5
>  GLIBC_2.2.6 _longjmp F
>  GLIBC_2.2.6 _mcleanup F
>  GLIBC_2.2.6 _mcount F
> -GLIBC_2.2.6 _nl_default_dirname D 0xe
> +GLIBC_2.2.6 _nl_default_dirname D 0x12
>  GLIBC_2.2.6 _nl_domain_bindings D 0x4
>  GLIBC_2.2.6 _nl_msg_cat_cntr D 0x4
>  GLIBC_2.2.6 _null_auth D 0xc

Unrelated change.

I'm not happy with this change.  Is POSIX conformance really worth the
effort?

Can't we tell the Austin Group we'll keep doing what we've been doing,
and they can add language to permit this historic behavior?

Thanks,
Florian



More information about the Libc-alpha mailing list