[PATCH v7] getrandom system call wrapper [BZ #17252]
Florian Weimer
fweimer@redhat.com
Wed Nov 16 15:11:00 GMT 2016
On 11/14/2016 07:29 PM, Zack Weinberg wrote:
> On 11/14/2016 12:44 PM, Florian Weimer wrote:
>> This patch switches back to the ssize_t return time. This goes against
>> Theodore Ts'o preference, but seems to reflect the consensus from the
>> largery community.
>
> I still don't think this function should be a cancellation point.
I guess we'll have to agree to disagree on this matter.
>> I weakened the protection against accidental interposition somewhat.
>> Since the declaration is a new header file, I do not use a function-like
>> macro to prevent a definition of a function named âgetrandomâ, and
>> non-GNU compilers do not get any redirection.
>
> We don't normally do this at all.
See the âEvolution of ELF symbol managementâ thread. We do it all the
time, for the benefit of non-libc DSOs in the glibc conglomerate. I
think there is broad consensus that we need to extend this to libstdc++
at least (in addition to changes needed to enable C++ compilation
without _GNU_SOURCE). And once we are at C++, why stop there? Even
dynamic languages with a C extension framework would use this.
Thanks,
Florian
More information about the Libc-alpha
mailing list