summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid generate SIGTTOU when restoring the terminal mode. If we getmillert2016-10-181-1/+5
| | | | | | | | | SIGTTOU it means the process is not in the foreground process group which, in most cases, means that the shell has taken control of the tty. Requiring the user the fg the process in this case doesn't make sense and can result in both SIGTSTP and SIGTTOU being sent which can lead to the process being suspended again immediately after being brought into the foreground.
* Roll back uintptr_t cast changes after discussions with tedu, otto anddtucker2016-10-163-24/+7
| | | | | | | | | | | | | others. C11 6.5.6.9 says: When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of the subscripts of the two array elements. In these cases the objects are arrays of char so the result is defined, and we believe that the report is based on a compiler incorrectly trapping on defined behaviour.
* Wrap _malloc_init() so internal calls go directlyguenther2016-10-152-2/+6
| | | | | prodded by otto@ ok kettenis@ otto@
* Cast pointers to uintptr_t to avoid potential signedness errors.dtucker2016-10-143-7/+24
| | | | | Based on patch from yuanjie.huang at windriver.com via OpenSSH bz#2608, with & ok millert, ok deraadt.
* 0xd0 -> 0xdb; ok deraadt@ millert@ tedu@otto2016-10-141-3/+3
|
* optimize canary code a bit by storing offset of sizes table instead ofotto2016-10-121-5/+7
| | | | recomputing it all the time
* make clear the length printed is the requested lengthotto2016-10-081-3/+3
|
* sort;jmc2016-10-071-5/+5
|
* introduce a sysctl to hijack dns sockets. when set to a port number,tedu2016-10-071-2/+6
| | | | | | | all dns socket connections will be redirected to localhost:port. this could be a sockopt on the listening socket, but sysctl is an easier interface to work with right now. ok deraadt
* rss limit is no longer enforced. noticed by Raimo Niskanentedu2016-10-071-5/+3
|
* grammar fix previous;jmc2016-10-071-2/+2
|
* document "chunk canary corrupted" errorotto2016-10-071-2/+7
|
* stray tabotto2016-10-071-2/+2
|
* Beter implementation of chunk canaries: store size in chunk meta dataotto2016-10-071-61/+63
| | | | instead of chunk itself; does not change actual allocated size; ok tedu@
* Use the userspace-visible thread register directly in __cerror insteadguenther2016-10-041-6/+8
| | | | | | | of indirecting through __errno(). Register naming tweaks and clang testing by patrick@ and jsg@ ok kettenis@
* Make read(2) return EISDIR on directories.jca2016-09-301-4/+6
| | | | | | | | | | | Years ago Theo made read(2) return 0 on directories, instead of dumping the directory content. Another behavior is allowed as an extension by POSIX, returning an EISDIR error, as used on a few other systems. This behavior is deemed more useful as it helps spotting errors. This implies that it might break some setups. Ports bulk builds by ajacoutot@ and naddy@, ok millert@ bluhm@ naddy@ deraadt@
* use the same template for describing securelevel interaction;jmc2016-09-281-11/+15
|
* document kern.allowkmem; ok deraadtjmc2016-09-281-2/+10
|
* sigsetmask() and sigblock() are no longer used by any setjmp implementationguenther2016-09-262-5/+3
| | | | | so the internal hidden names are unused; switch to PROTO_DEPRECATED() and drop the DEF_WEAK()s
* Fix matching when all of user, host and domain are specified.millert2016-09-241-10/+8
| | | | OK guenther@
* s/alloctaed/allocated/ in commentguenther2016-09-231-2/+2
|
* Switch from calling obsolete sig{block,setmask} to directly using theguenther2016-09-223-76/+42
| | | | | | | | sigprocmask syscall. abort() can't return, so simplify the call, and use the internal name to avoid the PLT. no-return observation by Miod Vallat, testing by aoyama@
* m88k switched to RELROguenther2016-09-221-6/+0
|
* Simplify __cerror now that %r27 is always the TCB pointer.guenther2016-09-223-54/+40
| | | | | | | Don't need a PLT relocation for __cerror. Move macros for doing internal aliases in ASM from SYS.h to DEFS.h __cerror tweaks by Miod Vallat, testing by aoyama@
* no more KERN_ARND; ok deraadtjmc2016-09-211-10/+2
|
* Delete casts to off_t and size_t that are implied by assignmentsguenther2016-09-2135-114/+106
| | | | | | | or prototypes. Ditto for some of the char* and void* casts too. verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@
* gmtime_r() should return NULL on failure, not the struct tm * resultmillert2016-09-191-3/+2
| | | | parameter that was passed in. From Carlin Bingham.
* move page junking tp unmap(), right before we stick the region in the cache;otto2016-09-181-6/+6
| | | | ok tedu@
* Use unified syntax such that this compiles with both gcc and clang.kettenis2016-09-181-2/+4
| | | | ok jsg@
* unbreak the build by including stddef.h for the definition of NULLjsg2016-09-181-1/+2
| | | | fix suggested by and ok guenther@
* Add an interface to find the ARM.exidx table for use by the ARM EHABI unwinder.kettenis2016-09-175-2/+88
| | | | | | Makes exceptions work in C++ code work again om armv7. ok guenther@
* Restore warnings about multiple process waiting on same fdguenther2016-09-172-4/+16
| | | | | requested by mpf@ ok deraadt tedu@
* spelling; from Frank Schoepderaadt2016-09-131-4/+4
|
* Don't declare select() in <unistd.h>guenther2016-09-121-2/+1
| | | | ok deraadt@ millert@
* document that running a W^X violating binary from file system mountedschwarze2016-09-121-2/+11
| | | | without wxallowed causes EACCES
* Clang ignores a .weak directive before a function is actually defined. Sokettenis2016-09-102-4/+4
| | | | | | | move it from before ENTRY() to after END(). Keeps brk(2) and sbrk(2) weak when comping libc with clang. ok guenther@
* Remove usermount remnants. ok tedunatano2016-09-071-5/+2
|
* Trivial cleanup: Pass pointers of the correct types to the privateschwarze2016-09-071-9/+7
| | | | | | functions and delete a macro that is used in only one place; no functional change. This completes the audit of the citrus directory (only 3 files left).
* trivial cleanup: delete inline attribute on static function,schwarze2016-09-071-3/+3
| | | | leave that decision to the compiler; no functional change
* trivial cleanup:schwarze2016-09-072-79/+70
| | | | | | | | | | - delete unused headers - add missing function prototype - delete needless casts of return values - KNF: return is not a function - KNF: do not use a pointer as a boolean - consistent wording in comments: s/octets/bytes/ OK gcc: no object change after strip -g
* Make sure attributes are applied to function declarations before they'reguenther2016-09-064-18/+58
| | | | | | | | used or defined, as clang isn't as forgiving as gcc. Also, declare __flt_rounds() so that libc can build it despire clang providing its own <float.h> ok stefan@ kettenis@
* Implement dl_iterate_phdr() for static PIE executables using info extractedguenther2016-09-063-4/+74
| | | | | | from the aux vector. ok patrick@ kettenis@
* Remove branch prediction hints from conditional branch instructions. Thesekettenis2016-09-061-3/+3
| | | | | | | hints are not recognized by clang's builtin assembler and the opcode prefixes they generate have been no-ops for all CPUs after the Pentium 4. ok guenther@
* correct wording; from rob@2keys.caderaadt2016-09-051-3/+3
|
* Delete some abstraction that we don't and won't need.schwarze2016-09-0515-405/+67
| | | | | | | | | | | | | | | | Declare functions rather than generating declarations with macros. Just call functions rather than mainting function pointer tables. Purge unused arguments. Simplify mbstate_t casting. Garbage collect one empty and one unused function. As a bonus, make mbsinit(3) work at all, it returned garbage in the past due to a missing cast when passing mbstate_t. Apart from that, no functional change. No libc bump needed; only private functions are removed and change prototype and only private structs change size. OK stsp@ mpi@; deraadt@ likes the general direction.
* fix Dt;jmc2016-09-041-2/+2
|
* Set errno more consistently, and fix a warning, ok tedunicm2016-09-041-21/+29
|
* rmtedu2016-09-041-68/+0
|
* oops, name file after main functiontedu2016-09-041-0/+68
|
* it doesn't say anything yet, but start adding a man pagetedu2016-09-041-0/+68
|