[PATCH] Linux/x86: Support shadow stack pointer in setjmp/longjmp

Joseph Myers joseph@codesourcery.com
Mon Dec 18 17:44:00 GMT 2017


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 
support?

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list