1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00
freebsd/lib/libc/gen
Konstantin Belousov 066d836b02 Current pselect(3) is implemented in usermode and thus vulnerable to
well-known race condition, which elimination was the reason for the
function appearance in first place. If sigmask supplied as argument to
pselect() enables a signal, the signal might be delivered before thread
called select(2), causing lost wakeup. Reimplement pselect() in kernel,
making change of sigmask and sleep atomic.

Since signal shall be delivered to the usermode, but sigmask restored,
set TDP_OLDMASK and save old mask in td_oldsigmask. The TDP_OLDMASK
should be cleared by ast() in case signal was not gelivered during
syscall execution.

Reviewed by:	davidxu
Tested by:	pho
MFC after:	1 month
2009-10-27 10:55:34 +00:00
..
__getosreldate.c Change the C wrappers for mmap/lseek/pread/pwrite/truncate/ftruncate to 2007-07-04 23:27:38 +00:00
__xuname.c Fix a typo. q is already a pointer. 2008-10-22 21:56:57 +00:00
_pthread_stubs.c Correct the pthread stub prototype for pthread_mutexattr_settype to allow for 2009-10-01 18:23:50 +00:00
_rand48.c
_spinlock_stub.c Remove 3rd clause, renumber, ok per email 2007-01-12 07:31:30 +00:00
_thread_init.c
alarm.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
alarm.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
arc4random.3 Add arc4random_uniform() function (to avoid "modulo bias") 2008-07-22 11:33:49 +00:00
arc4random.c Return two fixes from previous backout which does not require 2008-09-09 09:46:36 +00:00
assert.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
basename.3 Add basename_r(3) to complement basename(3). basename_r(3) which accepts 2009-10-06 14:05:57 +00:00
basename.c Add basename_r(3) to complement basename(3). basename_r(3) which accepts 2009-10-06 14:05:57 +00:00
check_utility_compat.3
check_utility_compat.c
clock.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
clock.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
closedir.c Since jb@ fixed the type of dd_lock in <dirent.h>, these casts are no 2007-12-03 14:33:51 +00:00
confstr.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
confstr.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
crypt.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ctermid.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ctermid.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
daemon.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
daemon.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
devname.3 Add two new routines: fdevname() and fdevname_r(). 2009-02-11 20:24:59 +00:00
devname.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
directory.3 Implement fdopendir(3) by splitting __opendir2() into two parts, the upper part 2008-04-16 18:59:36 +00:00
dirname.3 Sync with OpenBSD's dirname(3) - license change, avoid strcpy() over 2008-11-03 05:19:45 +00:00
dirname.c Sync with OpenBSD's dirname(3) - license change, avoid strcpy() over 2008-11-03 05:19:45 +00:00
disklabel.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
dladdr.3
dlfcn.c Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3). 2009-04-03 19:17:23 +00:00
dlinfo.3
dllockinit.3
dlopen.3 Implement RTLD_NOLOAD flag for dlopen(3). 2009-07-17 19:45:42 +00:00
drand48.c
erand48.c
err.3 In example use of err(3) and errx(3), use sysexits(3) constants. 2008-10-31 15:14:40 +00:00
err.c Minor style(9) nit: move to using ANSI definition of functions. 2008-04-03 20:36:44 +00:00
errlst.c Add a new errno, ENOTCAPABLE, to be returned when a process requests an 2009-10-07 20:20:51 +00:00
errno.c
exec.3 Turn execvpe() into an internal libc routine. 2008-06-23 05:22:06 +00:00
exec.c Turn execvpe() into an internal libc routine. 2008-06-23 05:22:06 +00:00
fdevname.c Add two new routines: fdevname() and fdevname_r(). 2009-02-11 20:24:59 +00:00
feature_present.3 Add a feature_present(3) function which checks to see if a named kernel 2008-01-10 22:11:21 +00:00
feature_present.c Add a feature_present(3) function which checks to see if a named kernel 2008-01-10 22:11:21 +00:00
fmtcheck.3 Teach fmtcheck() about wint_t, intmax_t, char *, intmax_t *, and 2008-08-02 06:02:42 +00:00
fmtcheck.c Use const instead of __const, and merge the license change from NetBSD. 2009-06-23 23:52:12 +00:00
fmtmsg.3
fmtmsg.c
fnmatch.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fnmatch.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
fpclassify.3
fpclassify.c
frexp.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
frexp.c
fstab.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ftok.3 Move msg{snd,recv,get,ctl} manual pages from section 3 to 2. 2009-07-13 12:53:43 +00:00
ftok.c
fts-compat.c Our fts(3) API, as inherited from 4.4BSD, suffers from integer 2008-01-26 17:09:40 +00:00
fts-compat.h Our fts(3) API, as inherited from 4.4BSD, suffers from integer 2008-01-26 17:09:40 +00:00
fts.3 fts_open() requires that the list passed as argument to contain at least 2009-10-05 21:11:04 +00:00
fts.c fts_open() requires that the list passed as argument to contain at least 2009-10-05 21:11:04 +00:00
ftw.3
ftw.c
getbootfile.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getbootfile.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getbsize.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getbsize.c Set "max" to a reasonable value if BLOCKSIZE has a bogus unit. Prior 2008-08-04 06:53:13 +00:00
getcap.3 o s/cgetseq/cgetset/ 2007-02-11 18:14:49 +00:00
getcap.c As the comment says, close() frees the variable, record. So we obtain 2009-05-14 23:09:33 +00:00
getcontext.3
getcwd.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getcwd.c Make getcwd(3) faster, simpler and more compliant using *at syscalls. 2009-10-13 20:58:22 +00:00
getdiskbyname.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getdomainname.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getdomainname.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getfsent.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getgrent.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getgrent.c Implementing 'fallback' nsswitch source. 'fallback' source is used 2007-12-12 10:08:03 +00:00
getgrouplist.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getgrouplist.c Implementing 'fallback' nsswitch source. 'fallback' source is used 2007-12-12 10:08:03 +00:00
gethostname.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
gethostname.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getloadavg.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getloadavg.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getlogin.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getmntinfo.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getmntinfo.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getnetgrent.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getnetgrent.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getosreldate.3 Add unistd.h to the getosreldate(3) manpage. 2008-09-30 11:25:55 +00:00
getosreldate.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpagesize.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpagesize.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpagesizes.3 Correct a section name; specifically, "AUTHOR" should be "AUTHORS". [1] 2009-09-21 18:02:02 +00:00
getpagesizes.c Add getpagesizes(3). This functions either the number of supported page 2009-09-19 18:01:32 +00:00
getpass.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpeereid.3
getpeereid.c
getprogname.3
getprogname.c
getpwent.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getpwent.c
getttyent.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getttyent.c Properly invalidate highest pts number when calling setttyent(). 2009-02-12 19:32:52 +00:00
getusershell.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getusershell.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
getvfsbyname.3 Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes. 2008-11-17 20:49:29 +00:00
getvfsbyname.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
glob.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
glob.c Gcc barfs in glob.c when run with -O3. To fix this make g_strchr() work on 2008-06-26 07:12:35 +00:00
initgroups.3 In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
initgroups.c In preparation for raising NGROUPS and NGROUPS_MAX, change base 2009-06-19 15:58:24 +00:00
isatty.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
isgreater.3
isinf.c
isnan.c
jrand48.c
lcong48.c
ldexp.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ldexp.c
lockf.3 Sync license changes. 2009-03-04 01:01:26 +00:00
lockf.c Sync license changes. 2009-03-04 01:01:26 +00:00
lrand48.c
makecontext.3
Makefile.inc Add basename_r(3) to complement basename(3). basename_r(3) which accepts 2009-10-06 14:05:57 +00:00
modf.3 Document modff() and modfl(). Technically, modff() and modfl() 2008-03-29 16:19:35 +00:00
mrand48.c
nftw.c
nice.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
nice.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
nlist.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
nlist.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
nrand48.c
opendir.c Implement fdopendir(3) by splitting __opendir2() into two parts, the upper part 2008-04-16 18:59:36 +00:00
pause.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
pause.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
pmadvise.c
popen.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
popen.c Rename the queue macros I introduced last year. 2009-05-27 19:28:04 +00:00
posix_spawn_file_actions_addopen.3 Fix the email address formats in some posix_spawn(3) manpages. 2008-07-28 09:36:56 +00:00
posix_spawn_file_actions_init.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
posix_spawn.3 Fix the email address formats in some posix_spawn(3) manpages. 2008-07-28 09:36:56 +00:00
posix_spawn.c Fix a typo. 2008-10-23 15:32:06 +00:00
posix_spawnattr_getflags.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
posix_spawnattr_getpgroup.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
posix_spawnattr_getschedparam.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
posix_spawnattr_getschedpolicy.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
posix_spawnattr_getsigdefault.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
posix_spawnattr_getsigmask.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
posix_spawnattr_init.3 Add manual pages for posix_spawn() functions. 2008-07-28 02:22:19 +00:00
pselect.3
psignal.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
psignal.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
pw_scan.c It is believed the last subsystem that limited ID sizes to something 2009-07-22 20:46:17 +00:00
pw_scan.h Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
pwcache.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
pwcache.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
raise.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
raise.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rand48.3
rand48.h
readdir.c Do not read away the target directory entry when encountering deleted 2008-05-05 14:05:23 +00:00
readpassphrase.3
readpassphrase.c
rewinddir.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
rfork_thread.3
scandir.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
scandir.c scandir(3) previously used st_size to obtain an initial estimate 2008-03-16 19:08:53 +00:00
seed48.c
seekdir.c Since jb@ fixed the type of dd_lock in <dirent.h>, these casts are no 2007-12-03 14:33:51 +00:00
sem_destroy.3
sem_getvalue.3
sem_init.3
sem_open.3 Fix a typo in regards to the ENOENT error. 2007-12-27 21:55:49 +00:00
sem_post.3
sem_timedwait.3 Remove trailing whitespace. 2008-03-13 10:26:17 +00:00
sem_wait.3 Add missing section number. 2008-03-13 10:25:30 +00:00
sem.c
semctl.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
setdomainname.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sethostname.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setjmp.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setjmperr.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setmode.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setmode.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
setproctitle.3
setproctitle.c
setprogname.c
siginterrupt.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
siginterrupt.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
siglist.c o Remove duplicate includes. 2007-01-20 08:24:02 +00:00
signal.3 Make it more clear what it means that SA_RESTART is set for signal 2008-07-17 21:54:23 +00:00
signal.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigsetops.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sigsetops.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sleep.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sleep.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
srand48.c
statvfs.3
statvfs.c
stringlist.3
stringlist.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtofflags.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
strtofflags.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
swapcontext.c
Symbol.map Add basename_r(3) to complement basename(3). basename_r(3) which accepts 2009-10-06 14:05:57 +00:00
sysconf.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sysconf.c stdio is currently limited to file descriptors not greater than 2008-02-27 05:56:57 +00:00
sysctl.3 Update the description of KERN_PROC. 2009-01-28 15:21:38 +00:00
sysctl.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
sysctlbyname.c
sysctlnametomib.c
syslog.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
syslog.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tcgetpgrp.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tcgetsid.3 Add tcsetsid(3). 2009-05-07 13:49:48 +00:00
tcsendbreak.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tcsetattr.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tcsetpgrp.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tcsetsid.3 Add tcsetsid(3). 2009-05-07 13:49:48 +00:00
telldir.c Do not read away the target directory entry when encountering deleted 2008-05-05 14:05:23 +00:00
telldir.h Do not read away the target directory entry when encountering deleted 2008-05-05 14:05:23 +00:00
termios.c Add tcsetsid(3). 2009-05-07 13:49:48 +00:00
time.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
time.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
times.3 The times(3) function returns the number of CLK_TCKs since the 2008-12-01 15:27:00 +00:00
times.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
timezone.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
timezone.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
tls.c o Add MIPS to the list of architectures with defined TLS_TCB_ALIGN 2008-04-29 23:15:23 +00:00
ttyname.3 TTYs don't necessarily use /dev/ttyxx. 2009-05-09 16:42:57 +00:00
ttyname.c Add two new routines: fdevname() and fdevname_r(). 2009-02-11 20:24:59 +00:00
ttyslot.c Make ttyslot(3) work with pts(4) devices. 2009-02-12 19:00:13 +00:00
tzset.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ualarm.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ualarm.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
ucontext.3
ulimit.3
ulimit.c
uname.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
uname.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
unvis.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
unvis.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
usleep.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
usleep.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
utime.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
utime.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
valloc.3 Remove extraneous .Ef request. 2007-10-30 15:26:20 +00:00
valloc.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
vis.3 Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
vis.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
wait3.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
wait.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
waitpid.c Per Regents of the University of Calfornia letter, remove advertising 2007-01-09 00:28:16 +00:00
wordexp.3
wordexp.c wordexp(3): fix some bugs with signals and long outputs 2009-10-23 14:50:11 +00:00