summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2018-11-09Remove ethers(5) YP support bits from libc as it makes it difficult toBryan Steele
effectively use pledge(2) in some programs. approval from many, thanks! idea by & ok deraadt@
2018-11-08zap last remains of malloc.conf; prompted by and ok jmc@Otto Moerbeek
2018-11-06typo on fs.posix.setuid; from Piotr DurlejOtto Moerbeek
2018-11-06rm FILES section; prompted by Janne JohanssonOtto Moerbeek
2018-11-06Use the new vm.malloc_conf sysctl; ok millert@ deraadt@Otto Moerbeek
2018-11-06vm.malloc_conf, userland sysctl parts; ok millert@ deraadt@Otto Moerbeek
2018-11-05Mention aligned_alloc(), prompted by Brad; ok jmc@Otto Moerbeek
2018-11-05aligned_alloc bumpOtto Moerbeek
2018-11-05Implement C11's aligned_alloc(3). ok guenther@Otto Moerbeek
2018-11-04add missing NET_RT_TABLEdenis
OK benno@
2018-11-03For correctness, do not read struct servent if getservbyname_r() failed.Eric Faurot
Also simplify code.
2018-10-31typo; fix from hiltjo posthumaTheo de Raadt
2018-10-30use Mdocdate;Jason McIntyre
2018-10-30Add C11's timespec_get(3); minor bump for libc.Philip Guenther
Tweaked diff from brad@ manpage tweaks florian@ and jmc@ ok deraadt@ millert@
2018-10-28Correctly deal with upper level unveil's by keeping track of the coveringBob Beck
unveil for each unveil in the process at unveil() time, and refactoring the handling of current directory and ISDOTDOT to be much more sensible. Worked out at ns2k18 with guenther@. ok deraadt@
2018-10-22More "explicitely" -> "explicitly" in various comments.Kenneth R Westerback
ok guenther@ tb@ deraadt@
2018-10-21Switch alpha to futex(2) based condvars, mutexes and semaphores.Visa Hankala
From Brad, tested by Miod, OK kettenis@
2018-10-15Switch powerpc to futex(2) based condvars, mutexes and semaphores.Visa Hankala
From Brad, OK mpi@ kettenis@
2018-10-09Fix a "copy-and-paste" error that Coverity picked up in the augment codeDavid Gwynne
This brings it back in line with the macros. via Paco A. and the FRRouting project. ok deraadt@ visa@ guenther@ tb@
2018-10-02document that uuid_create generates v4 uuids; from william orrJason McIntyre
verified/ok tb
2018-10-01Add retguard to arm64 libc syscalls and setjmp / longjmp.mortimer
ok kettenis@
2018-10-01As per POSIX, when str{,r}chr is comparing it should convert c to a char.Martijn van Duren
The C implementation of str{,r}chr are not linked to the build, because assembly implementations are used, but change to code for easier reference. At least the i386 and amd64 are checked and seem to do the correct thing. Found thanks to the csh any/strchr change. minor pointers and OK millert@
2018-09-30add spin lock in KERN_CPTIME cpu statessolene
ok mpi@ jca@
2018-09-30Make the HISTORY sections of the "intro" manuals less confusing andIngo Schwarze
more uniform; potential for confusion noticed by aalm@; OK jmc@.
2018-09-26typo; ok jmc@miko
2018-09-26align RETURN VALUES section with pledge manual; ok deraadt@miko
2018-09-24enable futex(2) based mutexes on armv7 and use futex based semaphores inJonathan Gray
librthread on armv7 as well from brad ok visa@ kettenis@ mpi@
2018-09-22Correct the uid_from_user() and gid_from_group() comments.Todd C. Miller
2018-09-13missing comma in previous;Jason McIntyre
2018-09-13Add uid_from_user() and gid_from_group(), derived from pax's cache.c.Todd C. Miller
It replaces the existing pwcache.c functions user_from_uid(3) and group_from_gid(3) with the pax equivalents. Adapted from NetBSD (mycroft) changes from our own pax's cache.c. OK guenther@
2018-08-21Use an mmap()'d buffer instead of a static buffer for the contentsTodd C. Miller
of the pointer returned by getpw{ent,nam,uid}(). We unmap the buffer each time to catch callers using a stale passwd struct pointer. As a special case, we do not unmap the buffer if the previous lookup was for the same name or uid. This special case may be removed in the future. OK deraadt@
2018-08-18Don't mention using poll(2) as a timeout.cheloha
Not a strictly portable use of the interface and there are more suitable interfaces for timeouts anyway. ok schwarze millert
2018-08-12Add retguard macros for arm64 asm and apply them in the straightforwardmortimer
cases in kernel and libc. ok deraadt@
2018-07-30Some cleanups and clarification, especially regarding locking (observed by rob)Theo de Raadt
ok beck jmc
2018-07-30tweak previous;Jason McIntyre
2018-07-30document the current limitation (we don't yet find an above coveringBob Beck
unveil for relative operations) that I am working on in BUGS
2018-07-28re-ordering for sensibility, by semarie; ok jmcTheo de Raadt
2018-07-27Full stop.rob
2018-07-18tidy up the flags section a little: supply a little more indent, and reduceJason McIntyre
the amount of modal verbs going on;
2018-07-16fix thinkoMarc Espie
okay mestre@
2018-07-13Correct some typos and also ran it through mandoc -TlintRicardo Mestre
OK millert@ deraadt@ and jmc@ who also gave me a cluebat stick
2018-07-13Crank minor for unveilBob Beck
ok deraadt@
2018-07-13Unveiling unveil(2).Bob Beck
This brings unveil into the tree, disabled by default - Currently this will return EPERM on all attempts to use it until we are fully certain it is ready for people to start using, but this now allows for others to do more tweaking and experimentation. Still needs to send the unveil's across forks and execs before fully enabling. Many thanks to robert@ and deraadt@ for extensive testing. ok deraadt@
2018-07-12Add hw.ncpuonline to count the number of online CPUs.cheloha
The introduction of hw.smt means that logical CPUs can be disabled after boot and prior to suspend/resume. If hw.smt=0 (the default), there needs to be a way to count the number of hardware threads available on the system at any given time. So, import HW_NCPUONLINE/hw.ncpuonline from NetBSD and document it. hw.ncpu becomes equal to the number of CPUs given to sched_init_cpu() during boot, while hw.ncpuonline is equal to the number of CPUs available to the scheduler in the cpuset "sched_all_cpus". Set_SC_NPROCESSORS_ONLN equal to this new sysctl and keep _SC_NPROCESSORS_CONF equal to hw.ncpu. This is preferable to adding a new sysctl to count the number of configured CPUs and keeping hw.ncpu equal to the number of online CPUs because such a change would break software in the ecosystem that relies on HW_NCPU/hw.ncpu to measure CPU usage and the like. Such software in base includes top(1), systat(1), and snmpd(8), and perhaps others. We don't need additional locking to count the cardinality of a cpuset in this case because the only interfaces that can modify said cardinality are sysctl(2) and ioctl(2), both of which are under the KERNEL_LOCK. Software using HW_NCPU/hw.ncpu to determine optimal parallism will need to be updated to use HW_NCPUONLINE/hw.ncpuonline. Until then, such software may perform suboptimally. However, most changes will be similar to the change included here for libcxx's std::thread:hardware_concurrency(): using HW_NCPUONLINE in lieu of HW_NCPU should be sufficient for determining optimal parallelism for most software if the change to _SC_NPROCESSORS_ONLN is insufficient. Prompted by deraadt. Discussed at length with kettenis, deraadt, and sthen. Lots of patch tweaks from kettenis. ok kettenis, "proceed" deraadt
2018-07-11Drop a const-bomb on regexec. It's probably not a good idea to remove aMartijn van Duren
const promise when processing it in the regex engine. Minor tweak and OK schwarze@
2018-07-10In asm.h ensure NENTRY uses the old-school nop-sled align, but change standardTheo de Raadt
ENTRY is a trapsled. Fix a few functions which fall-through into an ENTRY macro. amd64 binaries now are free of double+-nop sequences (except for one assember nit in aes-586.pl). Previous changes by guenther got us here. ok mortimer kettenis
2018-07-03Add retguard macros for libc.mortimer
ok deraadt
2018-06-25During open(2), release the fdp lock before calling vn_open(9).Visa Hankala
This lets other threads of the process modify the file descriptor table even if the vn_open(9) call blocks. The change has an effect on dup2(2) and dup3(2). If the new descriptor is the same as the one reserved by an unfinished open(2), the system call will fail with error EBUSY. The accept(2) system call already behaves like this. Issue pointed out by art@ via mpi@ Tested in a bulk build by ajacoutot@ OK mpi@
2018-06-22Save and restore the relevant FPU state on armv7.Mark Kettenis
ok deraadt@
2018-06-21sort SEE ALSO;Jason McIntyre