glibc/misc
H.J. Lu e27f41ba2b Add <bits/indirect-return.h>
Add <bits/indirect-return.h> and include it in <ucontext.h>.
__INDIRECT_RETURN defined in <bits/indirect-return.h> indicates if
swapcontext requires special compiler treatment.  The default
__INDIRECT_RETURN is empty.

On x86, when shadow stack is enabled, __INDIRECT_RETURN is defined
with indirect_return attribute, which has been added to GCC 9, to
indicate that swapcontext returns via indirect branch.  Otherwise
__INDIRECT_RETURN is defined with returns_twice attribute.

When shadow stack is enabled, remove always_inline attribute from
prepare_test_buffer in string/tst-xbzero-opt.c to avoid:

tst-xbzero-opt.c: In function ‘prepare_test_buffer’:
tst-xbzero-opt.c:105:1: error: function ‘prepare_test_buffer’ can never be inlined because it uses setjmp
 prepare_test_buffer (unsigned char *buf)

when indirect_return attribute isn't available.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

	* bits/indirect-return.h: New file.
	* misc/sys/cdefs.h (__glibc_has_attribute): New.
	* sysdeps/x86/bits/indirect-return.h: Likewise.
	* stdlib/Makefile (headers): Add bits/indirect-return.h.
	* stdlib/ucontext.h: Include <bits/indirect-return.h>.
	(swapcontext): Add __INDIRECT_RETURN.
	* string/tst-xbzero-opt.c (ALWAYS_INLINE): New.
	(prepare_test_buffer): Use it.
2018-07-24 07:55:47 -07:00
..
bits
sys Add <bits/indirect-return.h> 2018-07-24 07:55:47 -07:00
Makefile Implement allocate_once for atomic initialization with allocation 2018-05-23 15:27:01 +02:00
Versions Implement allocate_once for atomic initialization with allocation 2018-05-23 15:27:01 +02:00
acct.c
allocate_once.c Implement allocate_once for atomic initialization with allocation 2018-05-23 15:27:01 +02:00
ar.h
brk.c
bug-hsearch1.c
bug18240.c
chflags.c
chroot.c
daemon.c
dirname.c
efgcvt.c
efgcvt_r.c
err.c
err.h
error.c
error.h
fchflags.c
fdatasync.c
fgetxattr.c
flistxattr.c
fremovexattr.c
fsetxattr.c
fstab.c
fstab.h
fsync.c
ftruncate.c
ftruncate64.c
futimes.c
futimesat.c Add missing start-of-file descriptive comment. 2018-03-06 09:21:04 +01:00
getauxval.c
getclktck.c
getdomain.c
getdtsz.c
gethostid.c
gethostname.c
getloadavg.c
getpagesize.c
getpass.c
getsysstats.c
getttyent.c Fix -Os getc_unlocked linknamespace, localplt issues (bug 15105, bug 19463). 2018-02-21 18:01:11 +00:00
getusershell.c
getxattr.c
gtty.c
hsearch.c
hsearch_r.c
ifunc-impl-list.c
init-misc.c
insremque.c
ioctl.c
lgetxattr.c
libgen.h
listxattr.c
llistxattr.c
lremovexattr.c
lsearch.c
lsetxattr.c
lutimes.c
madvise.c
makedev.c Fix -Os gnu_dev_* linknamespace, localplt issues (bug 15105, bug 19463). 2018-02-07 14:57:31 +00:00
mincore.c
mkdtemp.c
mkostemp.c
mkostemp64.c
mkostemps.c
mkostemps64.c
mkstemp.c
mkstemp64.c
mkstemps.c
mkstemps64.c
mktemp.c
mlock.c
mlockall.c
mmap.c
mmap64.c
mntent.c
mntent.h
mntent_r.c
mprotect.c
msync.c
munlock.c
munlockall.c
munmap.c
preadv.c
preadv2.c
preadv64.c
preadv64v2.c
pselect.c
ptrace.c
pwritev.c
pwritev2.c
pwritev64.c
pwritev64v2.c
qefgcvt.c
qefgcvt_r.c
readv.c
reboot.c
regexp.c
regexp.h
remap_file_pages.c
removexattr.c
revoke.c
sbrk.c
search.h
select.c
setdomain.c
setegid.c
seteuid.c
sethostid.c
sethostname.c
setregid.c
setreuid.c
setxattr.c
sgtty.h
sstk.c
stab.h
stty.c
swapoff.c
swapon.c
sync.c
syncfs.c
syscall.c
syscall.h
sysexits.h
syslog.c Fix -Os putc_unlocked, fputc_unlocked linknamespace, localplt issues (bug 15105, bug 19463). 2018-02-21 18:02:24 +00:00
syslog.h
truncate.c
truncate64.c
tsearch.c
tst-allocate_once.c Implement allocate_once for atomic initialization with allocation 2018-05-23 15:27:01 +02:00
tst-atomic-long.c
tst-atomic.c
tst-dirname.c
tst-efgcvt.c
tst-empty.c
tst-error1.c
tst-fdset.c
tst-hsearch.c
tst-insremque.c
tst-makedev.c
tst-mntent-blank-corrupt.c
tst-mntent-blank-passno.c
tst-mntent.c
tst-mntent2.c
tst-preadvwritev-common.c
tst-preadvwritev.c
tst-preadvwritev2-common.c Update RWF_SUPPORTED for Linux kernel 4.16 [BZ #22947] 2018-04-03 12:19:29 -07:00
tst-preadvwritev2.c
tst-preadvwritev64.c
tst-preadvwritev64v2.c
tst-pselect.c
tst-tsearch.c
ttyent.h
ttyslot.c
ualarm.c
usleep.c
ustat.c Deprecate ustat syscall interface 2018-05-02 08:43:31 -03:00
utimes.c Add missing start-of-file descriptive comment. 2018-03-06 09:21:04 +01:00
vhangup.c
writev.c