[PATCH v3] getrandom system call wrapper [BZ #17252]
Richard Henderson
rth@twiddle.net
Thu Sep 8 18:35:00 GMT 2016
On 09/08/2016 11:32 AM, Florian Weimer wrote:
>> Using __asm__ to change the assembler name of the C-level symbol is probably
>> preferred for __GCC__.
>
> This does not work in all cases because a getrandom function definition will
> inherit the asm alias on the prototype and interpose the supposedly-protected
> symbol.
>
> But now that we have a <sys/random.h> header, maybe this isn't a problemâif an
> application includes the <sys/random.h> header, it shows that it is aware of
> getrandom, so it's less likely that it's interposing the function accidentally.
Indeed, that's what I was assuming. I hadn't read the previous patches where
this header didn't exist.
r~
More information about the Libc-alpha
mailing list