summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Document that wait3/waitpid can receive SIGCHILD when wpid doesmillert2017-05-011-3/+26
| | | | | | | not exist or is not a child of the calling process. Document what happens when SIGCHLD is ignored or SA_NOCLDWAIT is set in sa_flags (this part from FreeBSD). OK guenther@
* Add futex(2) shim, bump minor.mpi2017-04-303-2/+5
| | | | Inputs from guenther@, ok kettenis@, visa@
* Reference the "Futexes Are Tricky" paper.mpi2017-04-281-1/+7
| | | | With schwarze@
* errant space;jmc2017-04-281-2/+2
|
* Document futex(2) with a lot of inputs from schwarze@mpi2017-04-281-0/+134
|
* ntohl() returns uint32_t so it cannot be < 0. Since we're storingmillert2017-04-271-2/+2
| | | | the result in an int check for > INT_MAX instead. OK bluhm@
* Remove "len < 0" check; len is socklen_t (uint32_t) so can't bemillert2017-04-271-2/+2
| | | | negative. Quiets a warning from clang. OK bluhm@
* Rearrange text a bit to make it clear what "discarded" means; ok jmc@ deraadt@otto2017-04-231-8/+13
|
* For small allocations (chunk) freezero only validates the givenotto2017-04-221-5/+10
| | | | | | | | size if canaries are enabled. In that case we have the exact requested size of the allocation. But we can at least check the given size against the chunk size if C is not enabled. Plus add some braces so my brain doesn't have to scan for dangling else problems when I see this code.
* Fix previous.visa2017-04-201-2/+2
|
* Get TCB address using the RDHWR instruction instead of __get_tcb().visa2017-04-201-4/+5
| | | | | | | | | | | This gives fast access to the address on systems that implement the UserLocal register. TCB caching is still used when running in the single-threaded mode in order not to penalize old systems. The kernel counterpart of this change must be in place before using this diff! With guenther@
* don't forget to fill in canary bytes for posix_memalign(3); reported byotto2017-04-181-1/+4
| | | | and ok jeremy@
* consictently use .Dv NULL and a few other tweaks; ok schwarze@otto2017-04-171-20/+17
|
* whitespace fixesotto2017-04-171-14/+14
|
* Always return nonzero from _longjmp too.kettenis2017-04-161-2/+3
| | | | ok jsg@
* Document RB_TIMEBAD; delete RB_* that are obsolete/unimplementedguenther2017-04-151-19/+5
| | | | ok visa@ deraadt@
* whitespacederaadt2017-04-141-2/+2
|
* correct path; from Klemens Nannideraadt2017-04-141-3/+3
|
* Xr sigprocmask(2) not the obsolete sigsetmask(3)millert2017-04-131-3/+3
|
* Use recallocarray in getdelim/getline to clear memory on buffer resizes,brynet2017-04-131-2/+2
| | | | | | inspired by a similar change to fgetln. ok deraadt millert
* allow clearing less than allocated and document freezero(3) betterotto2017-04-132-13/+26
|
* SipHash_Final() was assuming the digest was 64-bit aligned, resulting inderaadt2017-04-121-4/+3
| | | | | misaligned memory accesses with armv7 ramdisk -Os bsd.rd ping ok florian millert
* New strstr() implementation from musl libc by Rich Felker. Thismillert2017-04-121-44/+180
| | | | | | | | version uses the two-way string matching algorithm and is faster than the old implementation. With this change, ports that check for strstr having linear complexity time strstr will no longer replace the libc strstr with a private version. OK deraadt@ espie@
* Fix tabs in example code.jca2017-04-101-3/+3
|
* tweak previous;jmc2017-04-101-4/+4
|
* Introducing freezero(3) a version of free that guarantees the processotto2017-04-104-37/+133
| | | | | | no longer has access to the content of a memmory object. It does this by either clearing (if the object memory remains cached) or by calling munmap(2). ok millert@, deraadt@, guenther@
* monir bump for freezerootto2017-04-101-1/+1
|
* Consistentcy between nmembers and size order. From Christopher Hettrick;otto2017-04-061-8/+8
| | | | ok deraadt@
* first print size in meta-data then supplied arg size when an inconsistency isotto2017-04-061-3/+3
| | | | detected wrt recallocarray()
* Not all devices support mmap, document EINVAL in this case too.millert2017-04-051-2/+6
| | | | OK deraadt@
* tweak previous;jmc2017-04-041-4/+4
|
* Add caveat telling it's better to always read a data byte when passingotto2017-04-031-2/+14
| | | | | control messages. Problem noted by Luke Small; ok deraadt@
* rephrase more enumerations of functionsotto2017-03-291-13/+10
|
* The hppa version of as(1) requires whitespace before a .file directive,deraadt2017-03-291-2/+2
| | | | | | | it may not be in column 0. This kind of thing is very common in GNU and Linux software because the software was written from the start to be 'compatible replacements' of vendor software. ok jsing guenther
* small cleanup & optimization; ok deraadt@ millert@otto2017-03-281-2/+5
|
* Document the mcast pledge(2) as an addition to inet.bluhm2017-03-281-2/+8
| | | | OK deraadt@
* Use .file to convince 'as' to generate proper FILE symbols in the syscallguenther2017-03-261-7/+8
| | | | | | | | stubs that aren't actually in files, so that syspatch can figure out what order the syscall stub objects are in the .so. Use -P to suppress to #line directives that would override that. Tested with both gcc/gas and clang. ok deraadt@
* Stop enumeration all allocation functions, just say "allocation functions"otto2017-03-261-32/+13
| | | | ok jmc@ deraadt@
* add a helper function to print all pools #ifdef MALLOC_STATSotto2017-03-241-1/+16
| | | | from David CARLIER
* document new recallocarray diagnostic; zap a few diagnostics that shouldotto2017-03-241-8/+9
| | | | never occur
* move recallocarray to malloc.c andotto2017-03-242-19/+207
| | | | | | | - use internal meta-data to do more consistency checking (especially with option C) - use cheap free if possible ok deraadt@
* mkdir(2) and mkdirat(2) can also fail with EACCESS if write permissionmillert2017-03-231-3/+5
| | | | | is denied on the parent directory of the directory to be created. From FreeBSD. OK deraadt@ natano@
* Provide the necessary weak alias for fpgetround(). Delete the obsoleteguenther2017-03-222-10/+3
| | | | | | | __weak_alias() uses problem noted by drahn@ ok kettenis@
* Use the hidden aliases to avoid PLT entries for {,_}{set,long}jmpguenther2017-03-221-9/+8
| | | | | | | Set the size of the sig{set,long}jmp symbols testing help jsg@ ok kettenis@
* Stop setting the second register; it's unnecessary on 64bit archsguenther2017-03-191-2/+1
| | | | ok patrick@ kettenis@
* Simplify fork/vfork logic: the kernel has handled returning zero in the childkettenis2017-03-181-10/+1
| | | | | | | for a long time, so there's no need to test the second return register here in the asm stub. ok guenther@
* Use the userspace-visible thread register directly in __cerror insteadkettenis2017-03-181-10/+6
| | | | | | of indirecting through __errno(). ok patrick@
* Make brk(2) actually work and sync the brk()/sbrk() implementation with arm,kettenis2017-03-182-35/+29
| | | | | | brininging over all the symbol visibility improvements that guenther@ made. ok drahn@
* remove unneccessary macro;jmc2017-03-171-2/+2
|
* Strengthen description of recallocarray(3) behaviour, hoping that readersderaadt2017-03-171-5/+10
| | | | | make the behaviour -> use case connection. help from jmc and jsing