summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* mmap() no longer needs to be used. Without providing too many details,deraadt2018-04-221-12/+14
| | | | | | describe how an inner-region is found for applying MAP_STACK, and that currently MAP_STACK remains set when the sigaltstack is disabled. ok kettenis guenther schwarze
* Actually describe the parameters rather than calling facts BUGSschwarze2018-04-081-19/+21
| | | | | that aren't even small bugs. And stop talking about AF_LOCAL. Feedback and OK guenther@, OK jmc@.
* sys/uio.h is not used anymoreotto2018-04-071-3/+2
|
* mention which locale categories this is related to, and add SEE ALSOschwarze2018-04-041-1/+11
|
* add SEE ALSOschwarze2018-04-041-1/+6
|
* Split the useless localeconv(3) function out of the importantschwarze2018-04-043-145/+195
| | | | | setlocale(3) manual page, such that the latter becomes easier to read. No text change.
* Mark pthread_equal() as unused inside libcguenther2018-03-311-1/+2
|
* fix MALLOC_STATS; spotted by and ok semarie@otto2018-03-301-1/+5
|
* Resolve some code duplication.schwarze2018-03-291-11/+3
| | | | | Minus eight lines of code, no functional change. OK martijn@.
* Fix three bugs in setlocale(3):schwarze2018-03-291-5/+7
| | | | | | | | | | | 1. setlocale(LC_ALL, "A"); setlocale(LC_CTYPE, "T"); setlocale(LC_ALL, NULL); must return "A/T/A/A/A/A", not "A". Fix this by always initializing the LC_ALL entry of newgl to "" in dupgl(). Reported by Karl Williamson <public at khwilliamson dot com> on bugs@, thanks! 2. Do not leak newgl when strdup(3) fails in setlocale(3). 3. For setlocale(LC_ALL, "C/C/fr_FR.UTF-8/C/C/C"); correctly set _GlobalRuneLocale; i found 2. and 3. while looking at the code. Feedback on a buggy earlier version and OK martijn@.
* Rewrite, since Karl Williamson <public at khwilliamson dot com>schwarze2018-03-221-153/+142
| | | | | | | | | | | | | noticed that this was no good. * More relevant one line description. * Generally more precision, less handwaving. * Delete details regarding features we deliberate do not support. * Write a real RETURN VALUES section. * Delete pointless SEE ALSO section. * Add two useful EXAMPLES. * Do not talk about BUGS we don't have because we avoid the facilities. Using several suggestions from martijn@ and one from stsp@, OK jmc@ stsp@ martijn@ on earlier versions.
* on failure, mmap() returns MAP_FAILEDgsoares2018-03-211-3/+3
| | | | OK deraadt
* improve markup quality in the cases found by the new "--" style messageschwarze2018-03-162-14/+10
|
* Since most (if not all) ARMv8 hardware doesn't actually support trapping ofkettenis2018-03-162-73/+26
| | | | | | | floating-point exceptions, simplify the functions that control the exception masks just like we did on armv7. ok tom@
* anton points out that my previous commit completely messed with thejmc2018-03-161-293/+293
| | | | | | | (unknown to me) relevant ordering of the various promises; restore them now to their original order; partial revert requested by deraadt too
* Fix commentsjca2018-03-131-6/+5
| | | | ok eric@ a while ago
* use _ALIGN() which is uhm a bit OpenBSD-specific, but it means wederaadt2018-03-061-3/+2
| | | | | | don't need to use sys/param.h at all, guess which one i believe is greater namespace polution ok otto
* typo in kern.maxlocksperuidotto2018-03-051-3/+3
|
* Use _MAX_PAGE_SHIFT, rather than #ifdef mips64deraadt2018-03-051-6/+2
| | | | ok guenther kettenis
* various tweaks, in part to try and clean up the amount of verticaljmc2018-03-041-361/+351
| | | | | | whitespace in this page; ok deraadt
* Return monotonically increasing values.cheloha2018-03-022-27/+32
| | | | | | | | | | | | | | | | | | | | | The latest POSIX description of times(3) (and all others I can find) suggests that times(3) should return monotonically increasing values and that these values are only useful for real time interval measurement. All extant uses of times(3) confirm that this expectation is shared by application programmers. So, change gettimeofday(2) to clock_gettime(2)/CLOCK_MONOTONIC to ensure the return value increases monotonically, even if the system clock is changed by the superuser. Then update the manpage accordingly. While we're updating the manpage, move the information about the return values to a new RETURN VALUES section to bring times.3 up to speed with other library man pages. Manpage changes kicked around on tech@ with millert@ and jmc@. times.3 ok millert@ tb@ jmc@ times.c ok millert@ tb@
* Change floating-point mode/environment control functions to operate onkettenis2018-02-287-1/+215
| | | | | | | | | | both the hardfloat (FPU registers) and softfloat (software) state. This makes these functions work correctly when mixing hardfloat and softfloat code. Disable trapping for softfloat since most (if not all) ARMv7 and ARMv8 hardware that is on the market doesn't support trapping of floating-point exceptions. ok patrick@
* improve lining up of tabs inside .Fd macros for terminal output;schwarze2018-02-271-3/+3
| | | | from <Edgar at Pettijohn dash web dot com> on tech@
* macro fix;jmc2018-02-111-2/+3
|
* Document how MAP_STACK will be used. All stacks must be mmap'd withderaadt2018-02-112-5/+20
| | | | | | | | | this attribute. The kernel does so for main-process stacks at execve() time, pthread stack functions do so for new stacks, and stacks provided to sigaltstack() and other user-provided stacks will need to be allocated in that way. Not required yet, but paving the way. Work done with stefan
* zap trailing whitespace;jmc2018-02-101-2/+2
|
* add support for binary sysctl payloads by handling them as hexflorian2018-02-101-2/+8
| | | | | | | | | | | | | | | | strings. this was part of a demo showing how to implement the kernel side of sysctl(3) for setting Semantically Opaque Interface Identifier key material (for RFC 7217), but it seems to be the most straightforward path toward integrating soiikey handling and rc. Originally written by dlg, who commited it some time ago on my request. I then backed it out again, now it's time to put it back in. ok florian@ sthen@ naddy@ tb@ Man page bits tweaked & OK jmc
* use consistent style for for loop in unmap(), no functional changeotto2018-02-071-4/+2
|
* make sure that all error paths are correctly handled in asr_run_sync()eric2018-02-061-18/+33
| | | | | | | and that the result is always properly set when the functions returns. fix issues spotted by claudio@. ok claudio@
* keep in sync with ld.so malloc.cotto2018-01-301-2/+3
|
* word fix; from edgar pettijohnjmc2018-01-301-3/+3
|
* - An error in the multithreaded case could print the wrong function nameotto2018-01-281-12/+23
| | | | | | | - Start with a full page of struct region_info's - Save an mprotect in the init code: allocate 3 pages with none and make the middle page r/w instead of a r/w allocation and two calls to make the guard pages none
* - do not junk pages returned by free_bytes(), all freed chunks are alreadyotto2018-01-261-19/+19
| | | | | junked - freezero(): only clear requested size
* use END_STRONG. Yes, everything in the sh ecosystem is different..deraadt2018-01-231-2/+2
|
* Implement ffs(3) using the CLZ instructions which has been available everkettenis2018-01-211-43/+6
| | | | | | | | | since ARMv5. Should be much faster but more importantly it removes the data table from .text which could introduce unwanted ROP gadgets. Based on changes in Android/Bionic by Elliott Hughes. ok patrick@
* Use static inline such that the functions are guaranteed to be present whenkettenis2018-01-191-18/+19
| | | | | | compiled with clang. ok visa@
* Partial revert of rev. 1.7, fixes build with clangjca2018-01-191-2/+1
| | | | | | | | | | | The error was: --8<-- ffs.S:57:2: error: unsupported relocation on symbol adrne r2, .L_ffs_table ^ -->8-- Minimal workaround suggested by deraadt@, ok guenther@ kettenis@
* Wow, it cannot even be in .data...deraadt2018-01-181-2/+1
|
* Zap the rotor, it was a wrong idea. Cluebat applied by kshe whootto2018-01-181-6/+3
| | | | | came also up with this diff. Simple, no bias and benchmarks show the extra random calls disappear in te measurement noise.
* Sorry, the PIC macros cannot reach to .rodata....deraadt2018-01-181-2/+2
|
* Move to ffs(3) for bitmask scanning. I played with this earlier,otto2018-01-181-21/+11
| | | | | | | but at that time ffs function calls were generated instead of the compiler inlining the code. Now that ffs is marked protected in libc this is handled better. Thanks to kshe who prompted me to look at this again.
* Instead of trying to handle ffs() with the normal rename-mark-hidden-and-aliasguenther2018-01-1810-21/+32
| | | | | | | dance, mark it protected. This works better for both gcc and clang: gcc blocks overriding of internal calls, while clang permits inlining again. ok otto@
* Add two more ARM EABI aliases that I missed in the previous libc minorkettenis2018-01-142-1/+3
| | | | | | bump. "just go ahead -- crank" deraadt@
* tweak previous;jmc2018-01-131-5/+6
|
* introduce a filter called EVFILT_DEVICE that can be used to notifyrobert2018-01-131-2/+15
| | | | | | | listeners of device state changes. currently only supports NOTE_CHANGE that will be used by drm(4) ok kettenis@
* Adjust references for sysctl(3) to sysctl(2)deraadt2018-01-1214-49/+49
|
* sysctl(3) can now be renamed to sysctl(2)deraadt2018-01-123-8/+8
|
* Move SC_* defines into <machine/setjmp.h>, and rename them,visa2018-01-082-158/+158
| | | | | | so that <machine/signal.h> is not needed in setjmp.S. Suggested by kettenis@ long ago, OK deraadt@
* optimization and some cleanup; mostly from kshe (except the unmap() part)otto2018-01-081-67/+51
|
* TIOCUCNTL is now allowed by promise "tty".mpi2018-01-081-4/+5
| | | | Reminded by jmc@