summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add XOR cookies for rp and sp. Switch from calling obsoleteguenther2016-05-231-77/+75
| | | | | | | | sig{block,setmask} to directly using the sigprocmask syscall. Remove longjmperror()-if-passed-real-sigcontext checks and the filling in of sigcontext fields that longjmp ignores. in snaps; ok deraadt@
* Make _fwalk and _cleanup completely internal to libcguenther2016-05-232-6/+3
| | | | ok deraadt@
* Stop supporting longjmperror(); it's not used, not portable, and the checksguenther2016-05-2311-106/+22
| | | | | | | longjmp performs can't really be relied upon, even after we got rid of the false positives... ok millert@ deraadt@
* Remove iruserok(_sa)? and __ivaliduser(sa)?guenther2016-05-234-97/+21
| | | | ok millert@ deraadt@
* Eliminate __check_rhosts_file and __rcmd_errstr: they were only used byguenther2016-05-232-7/+1
| | | | | | rlogind and rshd (remember them?) ok deraadt@
* Stop exposing <sys/localedef.h> and various symbols internal to the libcguenther2016-05-2312-39/+129
| | | | | | | locale implementation: _{Current,Default}*Locale, __[mn]locale_changed, __mb_len_max_runtime ok millert@ schwarze@ deraadt@
* Add XOR cookies for r1 (stack) and lr. Switch from calling obsoleteguenther2016-05-222-108/+209
| | | | | | | | sig{block,setmask} to directly using the sigprocmask syscall. Rewrite sig{set,long}jmp based on {set,long}jmp to avoid the deprecated store/load-multiple instructions. in snaps; ok deraadt@
* Oh right, actually delete this now that __cerror is unusedguenther2016-05-221-61/+0
|
* Delete the _SDA_BASE and _SDA2_BASE symbols: they're unnecessary inguenther2016-05-201-5/+1
| | | | shared libraries...and I misspelled them anyway
* no more v6only;jmc2016-05-191-12/+2
|
* Add ASM_NOERR for syscalls that never fail and thus don't need the errnoguenther2016-05-191-15/+36
| | | | | | | setting logic...which can significantly reduce the size of the stub on some archs; 20 syscalls get a trim with this. in snaps for a bit and ok deraadt@
* Save and restore 'gbr' register when enter/leaving the kernel, and useguenther2016-05-188-110/+35
| | | | | | it for the TCB pointer. Eliminate __cerror. "looks good" kettenis@, testing and ok deraadt@
* Reduce quadruple negation to double negation;schwarze2016-05-181-10/+10
| | | | | | | from Edgar Pettijohn <edgar at pettijohn minus web dot com>. OK jmc@ deraadt@ While here, remove two instances of inconsistent future tense.
* Fix a one-byte buffer underflow (read access only).schwarze2016-05-171-4/+4
| | | | | | | | | | This change touches code that only runs when REG_BASIC is given and the regular expression is anchored with ^ _and_ uses backreferences. The segfault could only be triggered when the ^ anchor was inside a leading () subexpression quantified with *. OK martijn@ Patch also proofread by Pedro Giffuni <pfg at FreeBSD dot org>.
* ...and delete the GP setup. Should have been in previous commitguenther2016-05-161-4/+1
|
* Eliminate cerror: use PAL_rdunique to get the TCB address directlyguenther2016-05-163-59/+12
| | | | ok deraadt@ kettenis@
* Add END() to match ENTRY() macrosguenther2016-05-152-3/+8
| | | | ok kettenis@
* TIB conversion is complete, so set errno in the syscall stub and eliminateguenther2016-05-156-21/+33
| | | | | | __cerror ok ketternis@
* remove extra argument; from rafael nevesjmc2016-05-131-3/+3
|
* Using a 3-word buffer in the openbsd.randomdata segment, XOR swizzlederaadt2016-05-123-21/+80
| | | | | | the PC/FP/SP registers in the jmpbuf. An old idea (around 1999?) but the random segment sure makes it easy. Lots of help from kettenis ok kettenis
* remove hppa64 port, which we never got going beyond broken single users.deraadt2016-05-1129-944/+3
| | | | | | hppa reverse-stack gives us a valuable test case, but most developers don't have a 2nd one to proceed further with this. ok kettenis
* Add RETURN VALUES section and .Xr to memmem(3).schwarze2016-05-111-3/+4
| | | | | From Michal Mazurek <akfaew at jasminek dot net>. OK tedu@
* Oops: the caching of TCB address in single-threaded processes on archs withguenther2016-05-101-2/+2
| | | | slow TCB_GET (alpha, arm, mips64, sh) was broken when I switched CPP symbols.
* libc stub is gone, so update the description to cover the remaining useguenther2016-05-091-20/+19
|
* Remove sigreturn declaration and the now-unused libc syscall stubguenther2016-05-0914-491/+3
|
* Stop using sigreturn for longjmp, just set the signal mask and returnguenther2016-05-093-40/+69
| | | | | | | | | registers ala _longjmp. In setjmp, stop saving the onstack from sigaltstack as it's been unused by longjmp for years. In sig{set,long}jmp, use the internal, hidden names for setjmp/_setjmp/etc to avoid creating PLT entries. build testing deraadt@
* Don't use sigreturn(2) in longjmp(3). Instead use a similar approach as inkettenis2016-05-091-60/+39
| | | | | | _longjmp(3) but also restore the signal mask. ok deraadt@
* remove mention of dbm(3) and surrounding cruft; ok jmc@naddy2016-05-091-4/+2
|
* Implement longjmp directly and not on top of sigreturn.guenther2016-05-083-98/+125
| | | | | | Use the hidden symbols for internal calls to abort, longjmp, etc ok deraadt@
* No, sigaltstack's onstack flag shouldn't be saved. Delete commentguenther2016-05-081-2/+1
| | | | wondering about that
* Hide __fpu_* and make internal _Qp_* calls go direct.guenther2016-05-086-39/+53
| | | | ok kettenis@
* Simplify sig{set,long}jmp(): just Do The Job instead of calling othersguenther2016-05-081-52/+50
| | | | ok kettenis@
* Unexport sigreturn. Nobody should use it anymore, and it will be removedkettenis2016-05-071-2/+0
| | | | | | | from libc completely in the near future. Riding the libc bump that appeared a few moments ago. ok deraadt@
* remove more dbm piecesnaddy2016-05-072-5/+4
|
* remove ancient dbm functions (ndbm remains). nothing uses them in forever.tedu2016-05-074-323/+1
|
* stop opening the shadow database by default. only programs that request ittedu2016-05-071-5/+3
| | | | | | via the _shadow functions will open now, preventing some programs running as root from accidentally loading password hashes it into their memory. ok deraadt
* Avoid a transient PLT entry for the internal __getcwd syscall stub forguenther2016-05-071-1/+2
| | | | slightly better code on some archs
* Declare moncontrol(3) APIs in <sys/gmon.h>guenther2016-05-073-7/+11
| | | | | | | Export _gmonparam again. Make gcrt0.o use an reserved name for _monstartup() ok millert@
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-07149-1658/+2279
| | | | | | | | | | | | | | | | | This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
* Remove old cruft.zhuk2016-05-041-95/+0
| | | | okay millert@
* Remove a vax remnant (that was really a no-op anyway).millert2016-05-021-3/+1
|
* Remove old NeXT-specific cruft. From mmcc@millert2016-05-011-13/+1
|
* Don't add setjmp.S twice.kettenis2016-04-281-2/+2
|
* Don't use sigreturn(2) in longjmp(3). Instead use a similar approach as inkettenis2016-04-281-59/+22
| | | | | | _longjmp(3) but also restore the signal mask. ok deraadt@
* remove duplicate strrchr.c entry in SRCSjsg2016-04-281-2/+2
| | | | ok deraadt@
* Enable LIBREBUILD to construct libc.so.*.aderaadt2016-04-261-1/+2
|
* Allow setenv(3) and putenv(3) to operate on a NULL environ pointer.millert2016-04-251-11/+15
| | | | | | The getenv(3) and unsetenv(3) functions already support this. This will make it easier to emulate the glibc clearenv() function in ports. Based on a diff from and OK jca@
* document pledge(2); from rob piercejmc2016-04-171-2/+6
|
* Revert the recent changes to pledge.2.tb2016-04-131-74/+37
| | | | Requested by deraadt@
* tweak previous;jmc2016-04-121-2/+2
|