|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0 |
|
| #
4025b5b5 |
| 01-Nov-2023 |
Warner Losh <[email protected]> |
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Kee
libc: Purge unneeded cdefs.h
These sys/cdefs.h are not needed. Purge them. They are mostly left-over from the $FreeBSD$ removal. A few in libc are still required for macros that cdefs.h defines. Keep those.
Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42385
(cherry picked from commit 559a218c9b257775fb249b67945fe4a05b7a6b9f)
show more ...
|
| #
1d386b48 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
Revision tags: release/13.2.0, release/12.4.0 |
|
| #
560e22c8 |
| 21-Jul-2022 |
Ed Maste <[email protected]> |
Remove "All Rights Reserved" from FreeBSD Foundation libc copyrights
As per the updated FreeBSD copyright template. These were unambiguous cases where the Foundation was the only listed copyright h
Remove "All Rights Reserved" from FreeBSD Foundation libc copyrights
As per the updated FreeBSD copyright template. These were unambiguous cases where the Foundation was the only listed copyright holder.
Sponsored by: The FreeBSD Foundation
show more ...
|
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0 |
|
| #
21f749da |
| 10-Jan-2021 |
Konstantin Belousov <[email protected]> |
libthr: wrap pdfork(2), same as fork(2).
Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child.
Reviewed by: markj MFC after: 1 week Sponsored by
libthr: wrap pdfork(2), same as fork(2).
Without wrapping, rtld services and malloc(3) are not guaranteed to operate correctly in the forked child.
Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28088
show more ...
|
|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
| #
5d00c5a6 |
| 29-Mar-2019 |
Konstantin Belousov <[email protected]> |
Fix initial exec TLS mode for dynamically loaded shared objects.
If dso uses initial exec TLS mode, rtld tries to allocate TLS in static space. If there is no space left, the dlopen(3) fails. If spa
Fix initial exec TLS mode for dynamically loaded shared objects.
If dso uses initial exec TLS mode, rtld tries to allocate TLS in static space. If there is no space left, the dlopen(3) fails. If space if allocated, initial content from PT_TLS segment is distributed to all threads' pcbs, which was missed and caused un-initialized TLS segment for such dso after dlopen(3).
The mode is auto-detected either due to the relocation used, or if the DF_STATIC_TLS dynamic flag is set. In the later case, the TLS segment is tried to allocate earlier, which increases chance of the dlopen(3) to succeed. LLD was recently fixed to properly emit the flag, ld.bdf did it always.
Initial test by: dumbbell Tested by: emaste (amd64), ian (arm) Tested by: Gerald Aryeetey <aryeeteygerald_rogers.com> (arm64) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D19072
show more ...
|
|
Revision tags: release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0 |
|
| #
3f8455b0 |
| 19-Mar-2017 |
Eric van Gyzen <[email protected]> |
Add clock_nanosleep()
Add a clock_nanosleep() syscall, as specified by POSIX. Make nanosleep() a wrapper around it.
Attach the clock_nanosleep test from NetBSD. Adjust it for the FreeBSD behavior o
Add clock_nanosleep()
Add a clock_nanosleep() syscall, as specified by POSIX. Make nanosleep() a wrapper around it.
Attach the clock_nanosleep test from NetBSD. Adjust it for the FreeBSD behavior of updating rmtp only when interrupted by a signal. I believe this to be POSIX-compliant, since POSIX mentions the rmtp parameter only in the paragraph about EINTR. This is also what Linux does. (NetBSD updates rmtp unconditionally.)
Copy the whole nanosleep.2 man page from NetBSD because it is complete and closely resembles the POSIX description. Edit, polish, and reword it a bit, being sure to keep any relevant text from the FreeBSD page.
Reviewed by: kib, ngie, jilles MFC after: 3 weeks Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D10020
show more ...
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
1c1cc895 |
| 16-Aug-2016 |
Konstantin Belousov <[email protected]> |
The fdatasync(2) call must be cancellation point.
Sponsored by: The FreeBSD Foundation MFC after: 13 days
|
|
Revision tags: release/10.3.0 |
|
| #
bd43f069 |
| 08-Feb-2016 |
Konstantin Belousov <[email protected]> |
If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols do not participate in the global symbols namespace, but rtld locks are still replaced and functions are interposed. In particula
If libthr.so is dlopened without RTLD_GLOBAL flag, the libthr symbols do not participate in the global symbols namespace, but rtld locks are still replaced and functions are interposed. In particular, __pthread_map_stacks_exec is resolved to the libc version. If a library is loaded later, which requires adjustment of the stack protection mode, rtld calls into libc __pthread_map_stacks_exec due to the symbols scope. The libc version might recurse into binder and recursively acquire rtld bind lock, causing the hang.
Make libc __pthread_map_stacks_exec() interposed, which synchronizes rtld locks and version of the stack exec hook when libthr loaded, regardless of the symbol scope control or symbol resolution order.
The __pthread_map_stacks_exec() symbol is removed from the private version in libthr since libc symbol now operates correctly in presence of libthr.
Reported and tested by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
show more ...
|
|
Revision tags: release/10.2.0 |
|
| #
0538aafc |
| 18-Apr-2015 |
Konstantin Belousov <[email protected]> |
The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), and pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x kernels which required padding before the off_t parameter. The fc
The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), and pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x kernels which required padding before the off_t parameter. The fcntl(2) contains compatibility code to handle kernels before the struct flock was changed during the 8.x CURRENT development. The shims were reasonable to allow easier revert to the older kernel at that time.
Now, two or three major releases later, shims do not serve any purpose. Such old kernels cannot handle current libc, so revert the compatibility code.
Make padded syscalls support conditional under the COMPAT6 config option. For COMPAT32, the syscalls were under COMPAT6 already.
Remove WITHOUT_SYSCALL_COMPAT build option, which only purpose was to (partially) disable the removed shims.
Reviewed by: jhb, imp (previous versions) Discussed with: peter Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
| #
3d0045bb |
| 18-Apr-2015 |
Konstantin Belousov <[email protected]> |
Make wait6(2), waitid(3) and ppoll(2) cancellation points. The waitid() function is required to be cancellable by the standard. The wait6() and ppoll() follow the other syscalls in their groups.
R
Make wait6(2), waitid(3) and ppoll(2) cancellation points. The waitid() function is required to be cancellable by the standard. The wait6() and ppoll() follow the other syscalls in their groups.
Reviewed by: jhb, jilles (previous versions) Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
| #
b072e86d |
| 29-Mar-2015 |
Konstantin Belousov <[email protected]> |
Make kevent(2) a cancellation point.
Note that to cancel blocked kevent(2) call, changelist must be empty, since we cannot cancel a call which already made changes to the process state. And in reve
Make kevent(2) a cancellation point.
Note that to cancel blocked kevent(2) call, changelist must be empty, since we cannot cancel a call which already made changes to the process state. And in reverse, call which only makes changes to the kqueue state, without waiting for an event, is not cancellable. This makes a natural usage model to migrate kqueue loop to support cancellation, where existing single kevent(2) call must be split into two: first uncancellable update of kqueue, then cancellable wait for events.
Note that this is ABI-incompatible change, but it is believed that there is no cancel-safe code that relies on kevent(2) not being a cancellation point. Option to preserve the ABI would be to keep kevent(2) as is, but add new call with flags to specify cancellation behaviour, which only value seems to add complications.
Suggested and reviewed by: jilles Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
show more ...
|
| #
45468c53 |
| 14-Feb-2015 |
Konstantin Belousov <[email protected]> |
Properly interpose libc spinlocks, was missed in r276630. In particular, stdio locking was affected.
Reported and tested by: "Matthew D. Fuller" <[email protected]> Sponsored by: The FreeBSD
Properly interpose libc spinlocks, was missed in r276630. In particular, stdio locking was affected.
Reported and tested by: "Matthew D. Fuller" <[email protected]> Sponsored by: The FreeBSD Foundation MFC after: 3 days
show more ...
|
| #
397d851d |
| 11-Jan-2015 |
Konstantin Belousov <[email protected]> |
Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. Translate some syscalls into their more generic counterpart, and remove translated syscalls from the
Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. Translate some syscalls into their more generic counterpart, and remove translated syscalls from the table.
List of the affected syscalls: creat, open -> openat raise -> thr_kill sleep, usleep -> nanosleep pause -> sigsuspend wait, wait3, waitpid -> wait4
Suggested and reviewed by: jilles (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
| #
8495e8b1 |
| 03-Jan-2015 |
Konstantin Belousov <[email protected]> |
Fix known issues which blow up the process after dlopen("libthr.so") (or loading a dso linked to libthr.so into process which was not linked against threading library).
- Remove libthr interposers o
Fix known issues which blow up the process after dlopen("libthr.so") (or loading a dso linked to libthr.so into process which was not linked against threading library).
- Remove libthr interposers of the libc functions, including __error(). Instead, functions calls are indirected through the interposing table, similar to how pthread stubs in libc are already done. Libc by default points either to syscall trampolines or to existing libc implementations. On libthr load, libthr rewrites the pointers to the cancellable implementations already in libthr. The interposition table is separate from pthreads stubs indirection table to not pull pthreads stubs into static binaries.
- Postpone the malloc(3) internal mutexes initialization until libthr is loaded. This avoids recursion between calloc(3) and static pthread_mutex_t initialization.
- Reinstall signal handlers with wrapper on libthr load. The _rtld_is_dlopened(3) is used to avoid useless calls to sigaction(2) when libthr is statically referenced from the main binary.
In the process, fix openat(2), swapcontext(2) and setcontext(2) interposing. The libc symbols were exported at different versions than libthr interposers. Export both libc and libthr versions from libc now, with default set to the higher version from libthr.
Remove unused and disconnected swapcontext(3) userspace implementation from libc/gen.
No objections from: deischen Tested by: pho, antoine (exp-run) (previous versions) Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|