1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-04 12:52:15 +00:00
freebsd/sys/sys
Konstantin Belousov 55a1911ef2 The getcontext() from the __fillcontextx() call in the
check_deferred_signal() returns twice, since handle_signal() emulates
the return from the normal signal handler by sigreturn(2)ing the
passed context.  Second return is performed on the destroyed stack
frame, because __fillcontextx() has already returned.  This causes
undefined and bad behaviour, usually the victim thread gets SIGSEGV.

Avoid nested frame and the need to return from it by doing direct call
to getcontext() in the check_deferred_signal() and using a new private
libc helper __fillcontextx2() to complement the context with the
extended CPU state if the deferred signal is still present.

The __fillcontextx() is now unused, but is kept to allow older
libthr.so to be used with the new libc.

Mark __fillcontextx() as returning twice [1].

Reported by:	pgj
Pointy hat to:	kib
Discussed with:	dim
Tested by:	pgj, dim
Suggested by:	jilles [1]
MFC after:	1 week
2013-05-28 04:54:16 +00:00
..
_bitset.h Generalize the bitset operations, present in cpuset and offer a KPI to 2013-05-09 00:04:59 +00:00
_bus_dma.h
_callout.h - Make callout(9) tickless, relying on eventtimers(4) as backend for 2013-03-04 11:09:56 +00:00
_cpuset.h Generalize the bitset operations, present in cpuset and offer a KPI to 2013-05-09 00:04:59 +00:00
_ffcounter.h
_iovec.h
_kstack_cache.h
_lock.h
_lockmgr.h
_mutex.h Tweak comments. 2012-11-11 23:25:47 +00:00
_null.h
_pctrie.h - Add a new general purpose path-compressed radix trie which can be used 2013-05-12 04:05:01 +00:00
_pthreadtypes.h
_rmlock.h Remove namespace pollution in _rmlock.h by defining rm_queue structure 2012-09-18 00:43:15 +00:00
_rwlock.h Tweak comments. 2012-11-11 23:25:47 +00:00
_semaphore.h
_sigset.h
_sockaddr_storage.h
_stack.h
_stdint.h
_sx.h
_task.h
_termios.h
_timespec.h
_timeval.h
_types.h Fix <uchar.h> in for C++11. 2013-05-25 16:58:12 +00:00
_umtx.h
aac_ioctl.h
acct.h
acl.h
agpio.h A rewrite of the i810 bits of the agp(4) driver. New driver supports 2012-05-22 10:59:26 +00:00
aio.h
alq.h
apm.h Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
assym.h
ata.h Added Dataset Management defines to be used by TRIM in cam ata and scsi to 2013-04-26 15:46:09 +00:00
bio.h Be more explicit about what each bio_cmd & bio_flags value means. 2013-03-23 16:55:07 +00:00
bitset.h Generalize the bitset operations, present in cpuset and offer a KPI to 2013-05-09 00:04:59 +00:00
bitstring.h
blist.h
buf_ring.h This fixes a out-of-order problem with several 2013-02-07 15:20:54 +00:00
buf.h - Add a new general purpose path-compressed radix trie which can be used 2013-05-12 04:05:01 +00:00
bufobj.h - Add a new general purpose path-compressed radix trie which can be used 2013-05-12 04:05:01 +00:00
bus_dma.h Add bus_dmamap_load_bio for non-CAM disk drivers that wish to enable 2013-03-29 16:26:25 +00:00
bus.h Remove a comment about devices being able to specify multiple interrupt 2013-04-04 15:40:19 +00:00
busdma_bufalloc.h Create an architecture-agnostic buffer pool manager that uses uma(9) to 2012-12-20 00:34:54 +00:00
callout.h Move the auto-sizing of the callout array from init_param2() to 2013-03-08 10:14:58 +00:00
capability.h Implement chflagsat(2) system call, similar to fchmodat(2), but operates on 2013-03-21 22:59:01 +00:00
cdefs.h Remove lint case for _Thread_local. 2013-05-19 07:44:01 +00:00
cdio.h
cdrio.h
cfictl.h
chio.h Update chio(1) and ch(4) to support reporting element designators. 2013-04-19 20:03:51 +00:00
clock.h
condvar.h MFcalloutng: 2013-03-04 12:20:48 +00:00
conf.h Add dev_strategy_csw() function, which is similar to dev_strategy() 2013-03-27 11:34:27 +00:00
cons.h
consio.h
copyright.h Happy New Year 2013! 2012-12-31 11:22:55 +00:00
counter.h Merge from projects/counters: counter(9). 2013-04-08 19:40:53 +00:00
cpu.h
cpuctl.h
cpuset.h Generalize the bitset operations, present in cpuset and offer a KPI to 2013-05-09 00:04:59 +00:00
ctype.h
dataacq.h
devicestat.h
digiio.h
dir.h
dirent.h
disk.h
disklabel.h Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
diskmbr.h Support the FAT16 partition type in gpart(8) 2013-03-07 22:32:41 +00:00
diskpc98.h
dkstat.h
domain.h Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC. 2013-03-19 20:58:17 +00:00
dtrace_bsd.h Initial commit of an I/O provider for DTrace on FreeBSD. 2012-07-11 16:27:02 +00:00
dvdio.h
elf32.h
elf64.h
elf_common.h Add a new set of notes to a process core dump to store procstat data. 2013-04-16 19:19:14 +00:00
elf_generic.h
elf.h
endian.h
errno.h POSIX 1003.1-2008: add ENOTRECOVERABLE, EOWNERDEAD errnos. 2013-05-04 19:07:22 +00:00
eui64.h
event.h
eventhandler.h Base the mbuf related limits on the available physical memory or 2012-11-27 21:19:58 +00:00
eventvar.h
exec.h
extattr.h Fix return type of extattr_set_* and fix rmextattr(8) utility. 2013-04-02 05:30:41 +00:00
fail.h
fbio.h
fcntl.h Add F_DUP2FD_CLOEXEC. Apparently Solaris 11 already did this. 2012-07-27 10:41:10 +00:00
fdcio.h
file.h Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00
filedesc.h Add fdallocn function and use it when passing fds over unix socket. 2013-04-14 17:08:34 +00:00
filio.h
firmware.h
fnv_hash.h Add an #include guard to the sys/fnv_hash.h. 2012-12-14 12:37:35 +00:00
gmon.h
gpio.h
gpt.h Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
hash.h - Move jenkins.h to jenkins_hash.c 2012-09-04 12:07:33 +00:00
hhook.h
iconv.h Fix improper handling of variadic args with ICDEBUG 2012-05-21 02:30:22 +00:00
imgact_aout.h Turns out the emulators still need/want a_magic, so put it back here. 2012-06-28 07:37:46 +00:00
imgact_elf.h
imgact.h
inflate.h
interrupt.h
ioccom.h
ioctl_compat.h
ioctl.h
ipc.h Fix build if COMPAT_43 is defined without one of 2012-10-22 02:59:55 +00:00
ipmi.h
jail.h
joystick.h
kbio.h
kdb.h Add constant missed in r244099 2012-12-10 23:12:51 +00:00
kenv.h
kernel.h Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the 2013-01-28 19:38:13 +00:00
kerneldump.h
khelp.h
kobj.h
ksem.h Similar to 233760 and 236717, export some more useful info about the 2013-05-03 21:11:57 +00:00
ksyms.h
kthread.h
ktr.h - Add new machine parsable KTR macros for timing events. 2012-12-19 20:10:00 +00:00
ktrace.h
libkern.h Attempt to mitigate poor initialization of arc4 by one-shot 2013-04-19 00:30:52 +00:00
limits.h
link_aout.h
link_elf.h
linker_set.h
linker.h
lock_profile.h
lock.h Add option WITNESS_NO_VNODE to suppress printing LORs between VNODE 2013-05-09 16:28:18 +00:00
lockf.h
lockmgr.h Add option WITNESS_NO_VNODE to suppress printing LORs between VNODE 2013-05-09 16:28:18 +00:00
lockstat.h
loginclass.h
mac.h
malloc.h
mbpool.h
mbuf.h Remove accidentally included line.. 2013-05-20 20:14:12 +00:00
mchain.h
md4.h
md5.h
mdioctl.h Make it possible to resize md(4) devices. 2012-07-07 20:32:21 +00:00
memdesc.h Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
memrange.h
mman.h
module_khelp.h
module.h
mount.h - Fix nullfs vnode reference leak in nullfs_reclaim_lowervp(). The 2013-05-11 11:17:44 +00:00
mouse.h Add preliminary support for IBM/Lenovo TrackPoint. 2013-03-18 23:22:47 +00:00
mpt_ioctl.h
mqueue.h
msg.h
msgbuf.h
mtio.h
mutex.h MFcalloutng: 2013-03-04 12:48:41 +00:00
namei.h Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00
nlist_aout.h
osd.h
param.h Connect flex 2.5.37 to the build and bump __FreeBSD_version. 2013-05-21 19:32:35 +00:00
pciio.h
pcpu.h Merge from projects/counters: 2013-04-08 19:19:10 +00:00
pctrie.h - pctrie really only requires two byte alignment so that there is a single 2013-05-12 20:44:28 +00:00
pioctl.h
pipe.h I am comparing current pipe code with the one in 8.3-STABLE r236165, 2012-07-31 05:48:35 +00:00
pmc.h Update hwpmc to support Haswell class processors. 2013-03-28 19:15:54 +00:00
pmckern.h Add a generic way to call per event allocate / release function. 2013-03-05 10:18:48 +00:00
pmclog.h
poll.h
posix4.h
power.h
priority.h
priv.h
proc.h o Add accessor functions to add and remove pages from a specific 2013-05-13 15:40:51 +00:00
procdesc.h
procfs.h
protosw.h - Implement two new system calls: 2013-03-02 21:11:30 +00:00
ptio.h
ptrace.h
queue.h Fixes to QUEUE_MACRO_DEBUG support: 2013-02-06 07:27:25 +00:00
racct.h Add CPU percentage limit enforcement to RCTL. The resouce name is "pcpu". 2012-10-26 16:01:08 +00:00
random.h
rangelock.h Add a rangelock implementation, intended to be used to range-locking 2012-05-30 16:06:38 +00:00
rctl.h Add CPU percentage limit enforcement to RCTL. The resouce name is "pcpu". 2012-10-26 16:01:08 +00:00
reboot.h
refcount.h Add assertion for refcount overflow. 2012-07-27 09:16:48 +00:00
regression.h
resource.h Add the wait6(2) system call. It takes POSIX waitid()-like process 2012-11-13 12:52:31 +00:00
resourcevar.h
rman.h
rmlock.h Replace the TDP_NOSLEEPING flag with a counter so that the 2013-03-01 22:03:31 +00:00
rtprio.h
runq.h
rwlock.h MFcalloutng: 2013-03-04 12:48:41 +00:00
sbuf.h Add sbuf_start_section() and sbuf_end_section() functions, which can 2013-04-11 19:49:18 +00:00
sched.h Compiler have a precise knowledge of the content of sched_pin() and 2012-10-29 01:35:17 +00:00
sdt.h Protect SDT_PROBE() with do { } while (0) loop. 2013-05-19 23:28:28 +00:00
select.h
selinfo.h
sem.h
sema.h
serial.h
sf_buf.h
sglist.h
shm.h
sigio.h
signal.h
signalvar.h Partially revert r195702. Deferring stops is now implemented via a set of 2013-03-18 17:23:58 +00:00
sleepqueue.h Partially revert r195702. Deferring stops is now implemented via a set of 2013-03-18 17:23:58 +00:00
slicer.h Add a new geom class which allows to divide NAND Flash chip 2012-05-22 08:33:14 +00:00
smp.h - Implement run-time expansion of the KTR buffer via sysctl. 2012-11-15 00:51:57 +00:00
snoop.h
sockbuf.h
socket.h Add accept4() system call. 2013-05-01 20:10:21 +00:00
socketvar.h Back out r249318, r249320 and r249327 due to a heisenbug most 2013-05-06 16:42:18 +00:00
sockio.h
sockopt.h
sockstate.h
soundcard.h
stack.h
stat.h Implement chflagsat(2) system call, similar to fchmodat(2), but operates on 2013-03-21 22:59:01 +00:00
statvfs.h
stddef.h
stdint.h Make the wchar_t type machine dependent. 2012-06-24 04:15:58 +00:00
sun_disklabel.h
sx.h MFcalloutng: 2013-03-04 12:48:41 +00:00
syscall.h Regenerate. 2013-05-21 11:41:08 +00:00
syscall.mk Regenerate. 2013-05-21 11:41:08 +00:00
syscallsubr.h Add accept4() system call. 2013-05-01 20:10:21 +00:00
sysctl.h Merge from projects/counters: counter(9). 2013-04-08 19:40:53 +00:00
sysent.h Remove no longer needed forward declaration for struct sf_buf. 2012-06-23 10:14:51 +00:00
syslimits.h
syslog.h Add static/const keywords to the arrays. 2013-04-09 16:16:34 +00:00
sysproto.h Regenerate. 2013-05-21 11:41:08 +00:00
systm.h Move CRITICAL_ASSERT() macro to systm.h, where the critical(9) 2013-04-06 08:23:38 +00:00
taskqueue.h Extend taskqueue(9) to enable per-taskqueue callbacks. 2013-03-23 15:11:53 +00:00
termios.h
thr.h
tiio.h
time.h - Make callout(9) tickless, relying on eventtimers(4) as backend for 2013-03-04 11:09:56 +00:00
timeb.h
timeet.h MFcalloutng: 2013-02-28 13:46:03 +00:00
timeffc.h
timepps.h
timers.h
times.h
timespec.h
timetc.h
timex.h Add proper prerequisites for even two more headers. 2013-05-21 21:50:11 +00:00
tree.h
tty.h Add tty_set_winsize(). 2012-11-03 22:21:37 +00:00
ttycom.h
ttydefaults.h Add static/const keywords to the arrays. 2013-04-09 16:16:34 +00:00
ttydevsw.h
ttydisc.h
ttyhook.h
ttyqueue.h
turnstile.h
types.h Move the definition of sbintime_t type from <sys/time.h> to <sys/types.h>. 2013-02-28 17:10:30 +00:00
ucontext.h The getcontext() from the __fillcontextx() call in the 2013-05-28 04:54:16 +00:00
ucred.h
uio.h Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
umtx.h
un.h Add placeholder constants to reserve a portion of the socket option 2013-02-01 15:32:20 +00:00
unistd.h Implement syscall clock_getcpuclockid2, so we can get a clock id 2012-08-17 02:26:31 +00:00
unpcb.h
user.h Similar to 233760 and 236717, export some more useful info about the 2013-05-03 21:11:57 +00:00
utsname.h
uuid.h
vdso.h Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
vmmeter.h - Add system wide page faults requiring I/O counter. 2013-01-28 12:54:53 +00:00
vnode.h When renaming a directory from one parent directory to another, 2013-03-20 17:57:00 +00:00
vtoc.h Add a partition type for nandfs to the apm, bsd, gpt and vtoc8 schemes. 2012-05-25 20:33:34 +00:00
wait.h Move the definition of the idtype_t from sys/types.h to sys/wait.h. 2012-11-16 06:29:52 +00:00
watchdog.h watchdogd(8) and watchdog(4) enhancements. 2013-02-27 19:03:31 +00:00