[PATCH 03/15] Do not stack-protect ifunc resolvers.

Florian Weimer fweimer@redhat.com
Wed Dec 21 14:17:00 GMT 2016


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.

Thanks,
Florian



More information about the Libc-alpha mailing list