| #
2d555ec8
|
| 08-Jan-2026 |
Konstantin Belousov <kib@FreeBSD.org> |
lib/libsys, lib/libc: export pdwait
Make pdwait(2) cancellable, same as all other wait*(2) syscalls wrappers.
Reviewed by: asomers, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC aft
lib/libsys, lib/libc: export pdwait
Make pdwait(2) cancellable, same as all other wait*(2) syscalls wrappers.
Reviewed by: asomers, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54592
show more ...
|
| #
2c444fdb
|
| 10-Jul-2025 |
Jessica Clarke <jrtc27@FreeBSD.org> |
libc,libthr: Remove __pthread_distribute_static_tls
This private API is no longer used by rtld-elf so can be removed.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50921
|
| #
a56fe703
|
| 23-May-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
Provide user interface to retrieve reported extended errors
Reviewed by: brooks Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D50483
|
| #
d8e841a9
|
| 02-Apr-2025 |
SHENGYI HONG <aokblast@FreeBSD.org> |
libc: treat execvpe as a week symbol
Some program intercepts the execvpe call in runtime. At the same time, the implementation of posix_spwan use execvpe. If execvpe is intercepted and then calls po
libc: treat execvpe as a week symbol
Some program intercepts the execvpe call in runtime. At the same time, the implementation of posix_spwan use execvpe. If execvpe is intercepted and then calls posix_spawn when intercepted. It wil create a infinite loop because the intercepted execvpe will spawn a posix_spwan call and will be intercepted again.
See https://github.com/rizsotto/Bear/issues/557 for reference.
Reviewed by: brooks, kib, emaste Sponsored by: FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49733
show more ...
|
| #
83aafcdc
|
| 14-Nov-2024 |
Kyle Evans <kevans@FreeBSD.org> |
libc, libthr: coordinate stubs for pthread_{suspend,resume}_all_np
If libthr isn't linked into the process, then we don't have any pthreads to worry about and our stubs can just return success -- th
libc, libthr: coordinate stubs for pthread_{suspend,resume}_all_np
If libthr isn't linked into the process, then we don't have any pthreads to worry about and our stubs can just return success -- there are none to suspend/resume.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D47350
show more ...
|
| #
07d35978
|
| 03-Jul-2024 |
Ryan Libby <rlibby@FreeBSD.org> |
libthr: avoid gcc -Wcast-function-type
The actual types of pthread_func_t and interpos_func_t are not used. Declare them as the generic void (*)(void) which suppresses warnings.
https://gcc.gnu.org
libthr: avoid gcc -Wcast-function-type
The actual types of pthread_func_t and interpos_func_t are not used. Declare them as the generic void (*)(void) which suppresses warnings.
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45830
show more ...
|
| #
92771bc0
|
| 23-Apr-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: make strerror_rl() usable for libc
Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44916
|
| #
7dd9070e
|
| 16-Apr-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: INTERPOS_SYS macro for interposed syscalls
This macro makes uses the __sys_<foo>_t typedefs from libsys.h to greatly simplify calling functions in the interposing table.
Reviewed by: kib Diff
libc: INTERPOS_SYS macro for interposed syscalls
This macro makes uses the __sys_<foo>_t typedefs from libsys.h to greatly simplify calling functions in the interposing table.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44389
show more ...
|
| #
792081a7
|
| 16-Apr-2024 |
Brooks Davis <brooks@FreeBSD.org> |
lib{c,rt}: use libsys.h for __sys_* declerations
Use the genreated source of truth for system call declerations.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44388
|
| #
d0efabdf
|
| 19-Mar-2024 |
Brooks Davis <brooks@FreeBSD.org> |
syscalls.master: make __sys_fcntl take an intptr_t
The (optional) third argument of fcntl is sometimes a pointer so change the type to intptr_t. Update the libc-internal defintion (actually used by
syscalls.master: make __sys_fcntl take an intptr_t
The (optional) third argument of fcntl is sometimes a pointer so change the type to intptr_t. Update the libc-internal defintion (actually used by libthr) to take a fixed intptr_t argument rather than pretending it's a variadic function. (That worked because all supported architectures pass variadic arguments as though the function was declared with those types. In CheriBSD that changes because variadic arguments are passed via a bounded array.)
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44381
show more ...
|
| #
ef5fddd3
|
| 13-Mar-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libsys: make __libsys_interposing static
Access __libsys_interposing with __libc_interposing_slot() in all cases to support a move of these wrappers back to libc.
Reviewed by: kib Differential Revi
libsys: make __libsys_interposing static
Access __libsys_interposing with __libc_interposing_slot() in all cases to support a move of these wrappers back to libc.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44239
show more ...
|
| #
f7dbbbd1
|
| 13-Mar-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libsys: don't expose sigwait wrapper
Long ago (e129c18a83ef) __sys_sigwait was wrapped to prevent sigwait() from returning with EINTR. Through a series of changes this wrapper become __libc_sigwait
libsys: don't expose sigwait wrapper
Long ago (e129c18a83ef) __sys_sigwait was wrapped to prevent sigwait() from returning with EINTR. Through a series of changes this wrapper become __libc_sigwait which was internal to libc and used solely in the interposing table. To support a move of sigwait back to libc, move this wrapper into libsys and rename it with an __libsys_ prefix.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44238
show more ...
|
| #
a3a4bea4
|
| 13-Mar-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: remove remnants of __fcntl_compat
Reviewed by: kib Fixes: 60b2e2d3ee82 libc: stop exposing __fcntl_compat Differential Revision: https://reviews.freebsd.org/D44326
|
| #
9cbd9658
|
| 16-Jan-2024 |
Brooks Davis <brooks@FreeBSD.org> |
libc: split libc and syscall interposing (1/2)
System calls or their wrappers are now interposed by __libsys_interposing with purely libc entries remaining in __libc_interposing.
Use __libsys_inter
libc: split libc and syscall interposing (1/2)
System calls or their wrappers are now interposed by __libsys_interposing with purely libc entries remaining in __libc_interposing.
Use __libsys_interposing_slot in libthr to update __libsys_interposing, but also make __libc_interposing_slot fall back to __libsys_interposing_slot so an out of date libc has a chance of working during updates.
Reviewed by: kib, emaste, imp Pull Request: https://github.com/freebsd/freebsd-src/pull/908
show more ...
|
| #
8ccd0b87
|
| 11-Dec-2023 |
Brooks Davis <brooks@FreeBSD.org> |
libc: expose execvpe for Linux compat
We already implemented execvpe internally with an _ prefix in libc so go ahead and expose it for compatibility with Linux.
This reverts c605eea952146348e5e1ad5
libc: expose execvpe for Linux compat
We already implemented execvpe internally with an _ prefix in libc so go ahead and expose it for compatibility with Linux.
This reverts c605eea952146348e5e1ad5cab6c127d7a1bd164.
Bump __FreeBSD_version for the addition and add definitions to supress compat shims in libzfs (zfs changes were merged from upstream).
PR: 275370 (request and exp-run (thanks antoine!)) Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42846
show more ...
|
| #
0dc52b72
|
| 14-Aug-2023 |
Minsoo Choo <minsoochoo0122@proton.me> |
libc: export pthread_getname_np stub
pthread_getname_np needs to be provided by libc in order to import jemalloc 5.3.0.
A stub implementation for libc pthread_getname_np() is added for _pthread_stu
libc: export pthread_getname_np stub
pthread_getname_np needs to be provided by libc in order to import jemalloc 5.3.0.
A stub implementation for libc pthread_getname_np() is added for _pthread_stubs.c, which always reports empty name for the main thread.
Internal _pthread_getname_np() is not exported, but provided for libc own use.
Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41461
show more ...
|
| #
b3e76948
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
0c6f0c0d
|
| 06-Nov-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: move declaration of 'char **environ' to common private header
Suggested by: imp Reviewed by: markj Tested by: markj (aarch64) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differenti
libc: move declaration of 'char **environ' to common private header
Suggested by: imp Reviewed by: markj Tested by: markj (aarch64) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D37220
show more ...
|
| #
51015e6d
|
| 30-Oct-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
csu: move common code to libc
Why? Most trivial point, it shaves around 600 bytes from the dynamic binaries on amd64. Less trivial, the removed code is no longer part of the ABI, and we can ship upd
csu: move common code to libc
Why? Most trivial point, it shaves around 600 bytes from the dynamic binaries on amd64. Less trivial, the removed code is no longer part of the ABI, and we can ship updates to it with libc updates. Right now most of the csu is linked into the binaries and require us to do somewhat tricky ABI compat when it needs to change. For instance, the init_array change would be much simpler and does not require note tagging if we have init calling code in libc.
This could be improved more, by splitting dynamic and static initialization. For instance, &_DYNAMIC tests can be removed then. Such change, nonetheless, would require building libc three times. I left this for later, after this change stabilizes, if ever.
Reviewed by: markj Discussed with: jrtc27 (some objections, see the review), imp Tested by: markj (aarch64) Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D37220
show more ...
|
| #
cbc32e4c
|
| 15-Feb-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
cpuset: Add compat shim to the sched_affinity functions
To allow to run a newer world on a pre-1400079 kernel a compat shims to the sched_affinity functions has beed added.
Reported by: antoine Te
cpuset: Add compat shim to the sched_affinity functions
To allow to run a newer world on a pre-1400079 kernel a compat shims to the sched_affinity functions has beed added.
Reported by: antoine Tested by: antoine Reviewed by: kib Differential revision: https://reviews.freebsd.org/D38555 MFC after: 3 days
show more ...
|
| #
ae67737a
|
| 09-Dec-2021 |
John Baldwin <jhb@FreeBSD.org> |
libc: Remove _get_tp() and _set_tp().
Their uses have been replaced by _tcb_get() and _tcb_set() from <machine/tls.h>.
Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc
libc: Remove _get_tp() and _set_tp().
Their uses have been replaced by _tcb_get() and _tcb_set() from <machine/tls.h>.
Reviewed by: kib, jrtc27 Sponsored by: The University of Cambridge, Google Inc. Differential Revision: https://reviews.freebsd.org/D33354
show more ...
|
| #
77b2c2f8
|
| 22-Oct-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
Add sched_getcpu()
for compatibility with Linux.
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32901
|
| #
06d8a116
|
| 05-Apr-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
libc: add _get_tp() private function
which returns pointer to tcb
Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D29623
|
| #
21f749da
|
| 10-Jan-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
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 ...
|
| #
44c5db52
|
| 23-Dec-2020 |
Konstantin Belousov <kib@FreeBSD.org> |
Add eventfd(3) wrappers to libc.
eventfd_read/write one-liners are from musl libc.
Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Diffe
Add eventfd(3) wrappers to libc.
eventfd_read/write one-liners are from musl libc.
Submitted by: greg@unrelenting.technology Reviewed by: markj (previous version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26668
show more ...
|