summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove dead gettimeofday calls and timevals.cheloha2018-01-062-6/+2
| | | | ok jca@
* some grammar fixes; from dholland@netbsd, -r1.68jmc2018-01-021-6/+6
|
* Only init chunk_info once, plus some moving of code to group related functions.otto2018-01-011-273/+267
|
* step one in avoiding unneccesary init of chunk_info;otto2017-12-271-65/+81
| | | | some cleanup; tested by sthen@ on a ports build
* Add ARM EABI runtime aliases to the GCC runtime functions that we includekettenis2017-12-2610-9/+86
| | | | | | in libc. ok patrick@, jsg@, guenther@
* memcpy from the right place. at this point, the used variable is nottedu2017-12-251-2/+2
| | | | | relevant. from Mark Karpilovskij. ok millert
* Fix one possible buffer overflow and one underflow. Also some minormillert2017-12-241-20/+36
| | | | cleanups. From Jan Kokemueller. OK deraadt@
* let's not try to document the number of items in a list...jmc2017-12-181-3/+3
|
* Add the CLOCK_BOOTTIME clockid for use with clock_gettime(2)cheloha2017-12-181-3/+16
| | | | | | | | | | | | | | | | | and put it to use in userspace in lieu of the kern.boottime sysctl. Its absolute value is the time that has elapsed since the system booted, i.e., the system uptime. Use in top(1), w(1), and snmpd(8) eliminates a race with settimeofday(2), adjtime(2), etc. inherent to deriving the system uptime via the kern.boottime sysctl. Product of a great deal of discussion/revision with jca@, tb@, and guenther@. ok tb@ jca@ guenther@ dlg@ mlarkin@ tom@
* Move __cxa_thread_atexit* to its own .c file to avoid pulling the codeguenther2017-12-164-39/+64
| | | | | | | (w/ _dlctl reference) into static executables. It's all Mark's code so put his preferred copyright on it. ok kettenis@
* Don't use _libc_ prefix when referencing "builtin" symbols with clang.kettenis2017-12-162-3/+8
| | | | Slightly tweaked diff from guenther@
* Simplify and unify timespec variables used in those event loopsjca2017-12-143-18/+14
| | | | ok millert@
* Use CLOCK_MONOTONIC for the rpc event loopsjca2017-12-143-40/+40
| | | | From Scott Cheloha, ok deraadt@ tb@
* Consistently use .Va for "errno";schwarze2017-12-121-3/+3
| | | | | patch from Jan Stary <hans at stare dot cz>; "I think it makes sense to speak about errno as a variable (.Va)" jca@.
* space required between macro arg and punctuation;jmc2017-12-121-2/+2
|
* pledge()'s 2nd argument becomes char *execpromises, which becomes thederaadt2017-12-122-44/+48
| | | | | | | | | | pledge for a new execve image immediately upon start. Also introduces "error" which makes violations return -1 ENOSYS instead of killing the program ("error" may not be handed to a setuid/setgid program, which may be missing/ignoring syscall return values and would continue with inconsistant state) Discussion with many florian has used this to improve the strictness of a daemon
* Fix the return value of fwscanf(3) when encountering an early matchingkevlo2017-12-081-2/+2
| | | | | | failure. This change brings fwscanf(3) back in line with fscanf(3). From FreeBSD; ok deraadt@, millert@
* Remove DEF_STRONG(__cxa_thread_atexit_impl). This produces an unwantedkettenis2017-12-051-2/+1
| | | | | _libc___cxa_thread_atexit_impl reference on gcc architectures that breaks the build.
* Implement __cxa_thread_atexit to support C++11 thread_local scope. Thekettenis2017-12-056-5/+63
| | | | | | | interface is also made available as __cxa_thread_atexit_impl to satisfy the needs of GNU libstdc++. ok guenther@, millert@
* Redo the calculation of the alignment and placement of static TLS data toguenther2017-12-013-45/+105
| | | | | | | | | | correctly take into account the segment p_align. Previously, anything with a size belong the natural alignment or with alignment larger than the natural one would either not be intialized correctly, be misaligned, or result in the TIB being misaligned. Problems reported by Charles Collicutt (charles (at) collicutt.co.uk) ok kettenis@
* Consistently .Xr the corresponding wide char functions from char- andschwarze2017-12-0111-26/+37
| | | | | string-handling <stdio.h> functions, like we already do it for <string.h>. Includes a smaller patch from <kshe59 at zoho dot eu>, OK jmc@.
* add missing argument name; from <kshe59 at zoho dot eu>; OK jmc@;schwarze2017-12-011-8/+32
| | | | while here, consistently use .Fo to cure execessive line lengths
* clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"guenther2017-11-2931-86/+148
| | | | | | | | | to builtins like mem{set,cpy,move} and __stack_smash_handler. So, when building with clang, instead mark those as protected visibility to get rid of the PLT relocations. We can't take the address of them then, but that's ok: it's a build-time error not a run-time error. ok kettenis@
* Add the missing STANDARDS section (kettenis@ noticed that these areschwarze2017-11-281-6/+14
| | | | | POSIX functions) and turn the weird DIAGNOSTICS section into a normal RETURN VALUES section while here.
* GNU ld has prefixed the contents of .gnu.warning.SYMBOL sectionstb2017-11-2815-31/+31
| | | | | | | | with "warning: " since 2003, so the messages themselves need not contain the prefix anymore. From Scott Cheloha ok jca, deraadt
* Delete fktrace(2). The consequences of it were not thought throughguenther2017-11-282-40/+7
| | | | | | sufficiently and at least one horrific security hole was the result. ok deraadt@ beck@
* Avoid .align 0 here as well. Also fix a .word that should be a .quad.kettenis2017-11-223-10/+7
| | | | ok patrick@
* Avoid .align 0. Clang's integrated assembler actually honors this directivekettenis2017-11-213-9/+6
| | | | | | and the resulting byte-alignment triggers unaligned access. ok patrick@, deraadt@
* Use a simple forward search to find '%' in the format string instead oftb2017-11-211-35/+12
| | | | | | | | | | | | | | | | | | | | using mbrtowc(3). Thus, we now treat the format string as a bytestring, not as a multibyte character string. We think that ANSI C made a small error when adding wide characters: The committees essentially replaced "characters" with "wide characters" in the existing printf documentation, which was written before the concept of processing was established. Doing processing on the format string would break some 8-bit format strings in the wild, and that isn't something these committees gave themselves license to do. Based on the "10x printf speedup" commit from android found by tedu: https://github.com/aosp-mirror/platform_bionic/commit/5305a4d4a723b06494b93f2df81733b83a0c46d3 Thanks to millert and schwarze for digging into the history and testing *printf behavior on other platforms. ok deraadt, millert
* Add error checking to some calls to __find_arguments(). Matches similartb2017-11-161-6/+16
| | | | | | | | changes by schwarze to vfprintf.c r1.71. Cherrypicked from android: https://github.com/aosp-mirror/platform_bionic/commit/5305a4d4a723b06494b93f2df81733b83a0c46d3 ok millert
* Fix spelling: bet -> net from Scott Bennett, thankstb2017-11-071-3/+3
|
* Revert recent changes to unbreak ports/net/sambajca2017-11-048-110/+21
| | | | | | | | While it is not clear (to me) why that ports ends up with corrupted shared libs, reverting those changes fixes the issue and should allow us to close p2k17 more smoothly. Discussed with a bunch, ok ajacoutot@ guenther@
* 's' should include 'f'; from Jacqueline Jolicoeurotto2017-11-021-2/+2
|
* Argh: put back some linker-supplied symbols to avoid triggering a bugguenther2017-10-312-1/+12
| | | | | | | | in binutils that results in uninitialized .dynsym entries in shared objects in the samba port. problem reported by naddy@ ok jca@ kettenis@
* fix oob read; form llvm via Vlad Tsyrklevich; ok millert@otto2017-10-301-3/+3
|
* Stop exporting _memcpy, an implementation detail of bcopy/memcpy/memmoveguenther2017-10-295-9/+10
| | | | ok kettenis@ deraadt@
* Remove __builtin_saveregs: gcc hasn't used it for years.guenther2017-10-283-63/+2
| | | | | suggested by miod@ ok kettenis@
* Typo: 'end' should have been '_end', which is already exported/imported.guenther2017-10-282-5/+2
| | | | | Also, '_memcpy' and '_stack' were specific to arm and should not have been copied here
* Eliminate some more linker generated symbols that aren't needed.guenther2017-10-281-5/+1
| | | | ok kettenis@
* If the init_routine used with pthread_once() is canceled, then we need toguenther2017-10-281-1/+11
| | | | | | | unlock the mutex inside the pthread_once_t. Push a cleanup wrapper for that. Diff from Scott Cheloha <scottcheloha@gmail.com> ok mpi@
* Change pthread_cleanup_{push,pop} to macros that store the cleanup infoguenther2017-10-287-19/+98
| | | | | | | | | | | | | | on the stack instead of mallocing the list and move the APIs from libpthread to libc so that they can be used inside libc. Note: the standard was explicitly written to permit/support this "macro with unmatched brace" style and it's what basically everyone else already does. We xor the info with random cookies with a random magic to detect/trip-up overwrites. Major bump to both libc and libpthread due to the API move. ok mpi@
* Stop exporting some symbols internal to the softfloat implementation,kettenis2017-10-281-27/+0
| | | | | | | | | unneeded linker-generated symbols and libgcc symbols that are accidentally re-exported. Riding the upcoming libc major bump. ok guenther@
* No need to include <sys/param.h> before <sys/sysctl.h>.mpi2017-10-281-3/+3
| | | | ok deraadt@, jca@
* consistently use .Vt for variable types and use ".Fa path" where appropriate;schwarze2017-10-281-16/+18
| | | | one of the bugs reported by <ilya dot kaliman at gmail dot com> via jmc@
* Use <elf.h> instead of <elf_abi.h>mpi2017-10-271-2/+2
| | | | ok jasper@, jca@, deraadt@
* Don't let close(2) clobber errno. Some calls were already protectedmillert2017-10-231-1/+5
| | | | but not all. From Peter J. Philipp.
* Removed duplicated line.tobias2017-10-221-3/+2
| | | | ok jmc@
* Restore a return that was inadvertently removed from freezero() in r1.234,jsing2017-10-191-1/+2
| | | | | | | which results in an internal double free when internal functions are not in use. ok otto@
* add missing HISTORY; based on CVS logs and release announcementsschwarze2017-10-174-12/+32
|
* draft-ietf-tcpm-initcwnd was published as rfc 6928mikeb2017-10-161-3/+3
|