[PATCH v4] stdlib: Consolidate getentropy and adapt to POSIX 2024 semantics
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Jun 30 21:01:51 GMT 2025
On 30/06/25 16:47, Florian Weimer wrote:
> * 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?
I am not sure, although all BSD that I checked already made this change.
>
> 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?
I think we can do, although I never have done it. But it should be doable.
>
> Thanks,
> Florian
>
More information about the Libc-alpha
mailing list