freebsd-dev/lib/libc/gen
Kyle Evans c34a5f16fa posix_spawn(3): handle potential signal issues with vfork
Described in [1], signal handlers running in a vfork child have
opportunities to corrupt the parent's state. Address this by adding a new
rfork(2) flag, RFSPAWN, that has vfork(2) semantics but also resets signal
handlers in the child during creation.

x86 uses rfork_thread(3) instead of a direct rfork(2) because rfork with
RFMEM/RFSPAWN cannot work when the return address is stored on the stack --
further information about this problem is described under RFMEM in the
rfork(2) man page.

Addressing this has been identified as a prerequisite to using posix_spawn
in subprocess on FreeBSD [2].

[1] https://ewontfix.com/7/
[2] https://bugs.python.org/issue35823

Reviewed by:	jilles, kib
Differential Revision:	https://reviews.freebsd.org/D19058
2019-09-25 19:22:03 +00:00
..
__getosreldate.c
__pthread_mutex_init_calloc_cb_stub.c
__xuname.c
_once_stub.c
_pthread_stubs.c Add libc stub for pthread_getthreadid_np(3). 2019-06-23 10:50:26 +00:00
_rand48.c
_spinlock_stub.c
_thread_init.c
alarm.3
alarm.c
arc4random_uniform.c Revert r346410 and r346411 2019-04-19 22:08:17 +00:00
arc4random-compat.c
arc4random.3 arc4random: Adjust example code to use uniform() API 2019-03-21 14:45:08 +00:00
arc4random.c
arc4random.h
assert.c
auxv.3 Add a manpage for elf_aux_info(3) 2019-04-26 15:43:14 +00:00
auxv.c
basename_compat.c
basename.3
basename.c
cap_rights_get.3
cap_sandboxed.3
cap_sandboxed.c
check_utility_compat.3
check_utility_compat.c
clock_getcpuclockid.3
clock_getcpuclockid.c
clock.3
clock.c
closedir.c
confstr.3
confstr.c
crypt.c
ctermid.3
ctermid.c
daemon.3 Fix formatting. 2019-08-01 18:51:06 +00:00
daemon.c
devname-compat11.c
devname.3
devname.c
directory.3 directory.3: add a STANDARDS section 2019-05-02 19:59:37 +00:00
dirfd.c
dirname_compat.c
dirname.3
dirname.c
disklabel.c
dl_iterate_phdr.3
dladdr.3
dlfcn.c
dlinfo.3
dllockinit.3
dlopen.3 Revert r343093 until I can address the issues raised by kib@. 2019-01-17 16:50:50 +00:00
drand48.c
dup3.3
dup3.c
elf_utils.c Remove redundent decleration of __elf_phdr_match_addr(). 2019-07-17 23:46:47 +00:00
erand48.c
err.3
err.c
errlst.c Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
errno.c
exec.3
exec.c
exect.c
fdevname.c
feature_present.3
feature_present.c
fmtcheck.3
fmtcheck.c
fmtmsg.3
fmtmsg.c
fnmatch.3
fnmatch.c
fpclassify.3
fpclassify.c
frexp.3
frexp.c
fstab.c
ftok.3
ftok.c
fts-compat11.c DTF_REWIND does nothing (since r247236) so retire its use 2019-03-26 19:35:41 +00:00
fts-compat11.h
fts-compat.c DTF_REWIND does nothing (since r247236) so retire its use 2019-03-26 19:35:41 +00:00
fts-compat.h
fts.3
fts.c DTF_REWIND does nothing (since r247236) so retire its use 2019-03-26 19:35:41 +00:00
ftw-compat11.c
ftw.3
ftw.c
gen-compat.h
gen-private.h Reduce size of rtld by 22% by pulling in less code from libc 2019-06-30 11:49:58 +00:00
getbootfile.3
getbootfile.c
getbsize.3
getbsize.c
getcap.3
getcap.c
getcontext.3
getcwd.3
getcwd.c
getdiskbyname.3
getdomainname.3
getdomainname.c
getentropy.3
getentropy.c
getfsent.3
getgrent.3
getgrent.c
getgrouplist.3
getgrouplist.c
gethostname.3
gethostname.c
getloadavg.3
getloadavg.c
getlogin.c
getmntinfo-compat11.c
getmntinfo.3
getmntinfo.c
getnetgrent.3
getnetgrent.c
getosreldate.3
getosreldate.c
getpagesize.3
getpagesize.c
getpagesizes.3
getpagesizes.c
getpass.3
getpeereid.3
getpeereid.c
getprogname.3
getprogname.c
getpwent.3
getpwent.c
getttyent.3
getttyent.c
getusershell.3
getusershell.c
getutxent.3
getutxent.c
getvfsbyname.3
getvfsbyname.c style changes to getvfsbyname 2019-07-17 19:41:44 +00:00
glob-compat11.c
glob-compat11.h
glob.3
glob.c
initgroups.3
initgroups.c
isatty.c
isgreater.3
isinf.c
isnan.c
jrand48.c
lcong48.c
ldexp.3
ldexp.c
libc_dlopen.c Remove redundand 'else' and 'return'. 2019-06-23 10:45:50 +00:00
lockf.3
lockf.c
lrand48.c
makecontext.3
Makefile.inc pkgbase: Tag passwd related file to be in FreeBSD-runtime package. 2019-09-05 14:09:33 +00:00
modf.3
modf.c
mrand48.c
nftw-compat11.c
nftw.c
nice.3
nice.c
nlist.3
nlist.c
nrand48.c
opendir.c Fix two WARNS=6 warnings in opendir.c and telldir.c 2019-06-23 10:47:07 +00:00
pause.3
pause.c
pmadvise.c
popen.3
popen.c
posix_spawn_file_actions_addopen.3
posix_spawn_file_actions_init.3
posix_spawn.3
posix_spawn.c posix_spawn(3): handle potential signal issues with vfork 2019-09-25 19:22:03 +00:00
posix_spawnattr_getflags.3
posix_spawnattr_getpgroup.3
posix_spawnattr_getschedparam.3
posix_spawnattr_getschedpolicy.3
posix_spawnattr_getsigdefault.3
posix_spawnattr_getsigmask.3
posix_spawnattr_init.3
psignal.3
psignal.c
pututxline.c
pw_scan.c
pw_scan.h
raise.3
raise.c
rand48.3
rand48.h
readdir-compat11.c
readdir.c
readpassphrase.3 Note that readpassphrase() came into FreeBSD's libc at 4.6. 2019-02-13 04:52:01 +00:00
readpassphrase.c
recvmmsg.c
rewinddir.c
rfork_thread.3
scandir_b.c
scandir-compat11.c
scandir.3
scandir.c
seed48.c
seekdir.c
sem_destroy.3
sem_getvalue.3
sem_init.3
sem_new.c
sem_open.3
sem_post.3
sem_timedwait.3
sem_wait.3
sem.c
semctl.c
sendmmsg.c
setdomainname.c
sethostname.c
setjmp.3
setjmperr.c
setmode.3 Document that setmode(3) is not thread safe. 2019-07-18 21:33:55 +00:00
setmode.c
setproctitle.3
setproctitle.c
setprogname.c
siginterrupt.3
siginterrupt.c
siglist.c
signal.3
signal.c
sigsetops.3
sigsetops.c
sleep.3
sleep.c
srand48.c
statvfs.3
statvfs.c
stringlist.3
stringlist.c
strtofflags.3
strtofflags.c
Symbol.map Add libc stub for pthread_getthreadid_np(3). 2019-06-23 10:50:26 +00:00
sysconf.3
sysconf.c
sysctl.3 Add descriptions for sysctls in kern_mib.c and sysctl.3 which lack them. 2019-03-23 19:53:15 +00:00
sysctl.c
sysctlbyname.c Add sysctlbyname system call 2019-09-03 04:16:30 +00:00
sysctlnametomib.c sysctl: use names instead of magic numbers. 2019-09-18 16:13:10 +00:00
syslog.3 syslog(3): stdarg.h is needed only for vsyslog() 2018-12-06 18:03:18 +00:00
syslog.c
tcgetpgrp.3
tcgetsid.3
tcsendbreak.3
tcsetattr.3
tcsetpgrp.3
tcsetsid.3
telldir.c Fix two WARNS=6 warnings in opendir.c and telldir.c 2019-06-23 10:47:07 +00:00
telldir.h
termios.c
time.3
time.c
times.3
times.c
timespec_get.3
timespec_get.c
timezone.3
timezone.c
tls.c
trivial-getcontextx.c
ttyname.3
ttyname.c
ttyslot.c
tzset.3
ualarm.3
ualarm.c
ucontext.3
ulimit.3
ulimit.c
uname.3
uname.c
unvis-compat.c
usleep.3
usleep.c
utime.3
utime.c
utxdb.c
utxdb.h
valloc.3
valloc.c
wait3.c
wait.c
waitid.c
waitpid.c
wordexp.3
wordexp.c