This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Linux/x86: Support shadow stack pointer in setjmp/longjmp
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Igor Tsimbalist <igor dot v dot tsimbalist at intel dot com>
- Date: Mon, 18 Dec 2017 17:44:44 +0000
- Subject: Re: [PATCH] Linux/x86: Support shadow stack pointer in setjmp/longjmp
- Authentication-results: sourceware.org; auth=none
- References: <20171218162753.GA25026@gmail.com>
On Mon, 18 Dec 2017, H.J. Lu wrote:
> * sysdeps/unix/sysv/linux/i386/__longjmp.S: New file.
> * sysdeps/unix/sysv/linux/i386/bsd-_setjmp.S: Likewise.
> * sysdeps/unix/sysv/linux/i386/bsd-setjmp.S: Likewise.
> * sysdeps/unix/sysv/linux/i386/setjmp.S: Likewise.
> * sysdeps/unix/sysv/linux/x86_64/__longjmp.S: Likewise.
> * sysdeps/unix/sysv/linux/x86_64/setjmp.S: Likewise.
Why are all these files Linux-specific? ____longjmp_chk is Linux-specific
because it does a sysaltstack syscall, but I don't see anything
OS-specific in these files. Why shouldn't shadow stack support be
available for all OSes on these architectures?
Is support for the relevant instructions available in all binutils
versions supported for building glibc? If not, does __SHSTK__ being
defined guarantee that GCC was built with a binutils version with the
required support, or do we need additional configure checks for binutils
Joseph S. Myers