[PATCH v7] getrandom system call wrapper [BZ #17252]

Richard Henderson rth@twiddle.net
Tue Nov 15 20:57:00 GMT 2016


On 11/14/2016 07:29 PM, Zack Weinberg wrote:
> On 11/14/2016 12:44 PM, Florian Weimer wrote:
>> 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.  I don't understand why this function
> should be treated differently.  Can you please explain what concrete
> situations, involving real, existing code, you're trying to defend
> against here?

It has been proposed that we do this for all new non-standardized symbols.

Which does make sense from a certain point of view.  As far as I can see it 
can't hurt, and can only help when it comes to inter-operating with user 
binaries that could have legitimately used the symbols until now.


r~



More information about the Libc-alpha mailing list