This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 03/15] Do not stack-protect ifunc resolvers.
On 21 Dec 2016, Florian Weimer outgrape:
> On 12/19/2016 12:15 PM, Nix wrote:
>> diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
>> index 16c00d7..46608ee 100644
>> --- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
>> +++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
>> @@ -33,6 +33,7 @@
>> # undef __gettimeofday
>>
>> int
>> +inhibit_stack_protector
>> __gettimeofday_vsyscall (struct timeval *tv, struct timezone *tz)
>> {
>> return INLINE_VSYSCALL (gettimeofday, 2, tv, tz);
>> diff --git a/sysdeps/unix/sysv/linux/x86/gettimeofday.c b/sysdeps/unix/sysv/linux/x86/gettimeofday.c
>> index c82452f..a419c4d 100644
>> --- a/sysdeps/unix/sysv/linux/x86/gettimeofday.c
>> +++ b/sysdeps/unix/sysv/linux/x86/gettimeofday.c
>> @@ -24,6 +24,7 @@
>> # include <errno.h>
>>
>> static int
>> +inhibit_stack_protector
>> __gettimeofday_syscall (struct timeval *tv, struct timezone *tz)
>> {
>> return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
>
> These are functions *returned* by IFUNC resolvers, and therefore can
> be compiled with stack protector enabled. I will drop those.
I think I was a bit gettimeofday-trigger-happy when I wrote this.
If it still works on x86-32 with -fstack-protector-all, you're clearly
right :)
--
NULL && (void)