| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sorry for the mess.
Revert "sys/vnode.h: remove stale comment"
This reverts commit f193f5a749b696e6c05fa2c47c24522b1624b1a7.
Revert "vfs: convert VFS_OPs from macros to static inlines"
This reverts commit 48bf024f2ef5afeba3500bd92a04283370479edf.
Revert "vnode: add VIRF_KNOTE flag"
This reverts commit 7fe74a02764e5899b10cdc45ab34182b961d5d19.
Revert "vfs: convert vfs_op_thread_* macros to static inlines"
This reverts commit a61a696e78a967b149a6e39b1f98ada26217a6bb.
Revert "struct vnode: assign v_rl.resv1 as v_vrflag"
This reverts commit d990e8f0e9478194569ba28c366b0c0c0f414e7b.
Revert "sys/rangelock.h: explicitly enumerate padding at the end of the structure"
This reverts commit a770638ecf16515d8922111c3fdd417aba6c045e.
Revert "bufspace_wait(): only try to help bufdaemon if there is a chance to help"
This reverts commit 067cfac2e7bd9dc857fb6cc504c01b0249bcd1b7.
Revert "Add O_SYMLINK emulation"
This reverts commit f9458655e78f6532e962a13d28d6a6086b4156de.
Revert "libc: add freadlink(3)"
This reverts commit ae6a13deb8e33a52188643e09171207e1d7171e8.
Revert "Add O_SYMLINK emulation"
This reverts commit 2213820b6f4cd22bbfdc0f45741c3e7d17ae82c0.
|
| |
|
|
|
|
|
|
|
|
|
| |
for MacOSX partial compatibility, defined as O_PATH | O_SYNC | O_DIRECT.
libc openat() wrapper is modified to fstat() the descriptor and re-open
in the normal mode if the type is not symlink.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D56365
|
| |
|
|
|
|
|
|
|
|
| |
Explain how SIGTHR is used and that it should be not touched by user
code. Note about SIGLIBRT.
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D56384
|
| |
|
|
|
|
|
| |
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D56384
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54766
|
| |
|
|
|
|
|
|
|
| |
Similar to the same glibc function.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54766
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54766
|
| |
|
|
|
|
| |
Reviewed by: jhb, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D52528
|
| |
|
|
|
|
|
| |
There are no consumers and it isn't a public symbol.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51670
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
|
| |
|
|
|
|
|
| |
This private API is no longer used by rtld-elf so can be removed.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D50921
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
used AMD64_SET_TLSBASE
It is up to the code that organizes the runtime to properly set the
signal handler, and to set %fsbase if libthr signal handler is to be
called. The change should leave the CPU state on the signal handler
entry identical to what it was before introduction of TLSBASE, for code
that provides its own startup and thread pointer, but still calls into
libthr as a hack.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide a clock through clock_gettime() that returns the current TAI
time (UTC without leap seconds) as a complement to CLOCK_REALTIME. This
provides compatibility with Linux, which also provides a CLOCK_TAI since
kernel 2.6.26, and this seems to be becoming the standard way to acquire
TAI time. Unlike Linux, this code will return EINVAL if the TAI offset
(set by ntpd, ptpd, etc.) is not known since it seems pathological for
CLOCK_TAI to silently give the wrong (UTC) time if the offset is not
known as it does on Linux.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D46268
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This allows userspace to run on a (somewhat) out of date kernel.
Avoid a __FreeBSD_version bump and use the bump from a02180cf60a6 which
has occured since exterrctl was added.
Reviewed by: kevans
Fixes: b9c8a07d4dd9 ("C runtime: enable extended error reporting from kernel")
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D50687
|
| |
|
|
|
|
|
| |
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
|
| |
|
|
|
|
|
| |
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_libc_get_static_tls_base() is just _tcb_get() followed by adding (for
Variant I) or subtracting (for Variant II) the offset, so just inline
that as the implementation (like we do in rtld-elf) rather than having
another copy (or equivalent) of _tcb_get()'s assembly.
_get_static_tls_base() doesn't even have any MD assembly as it's
reading thr->tcb, the only difference is whether to add or subtract, so
again just inline that.
Whilst here add some missing blank lines to comply with style(9) for
elf_utils.c's includes, and use a pointer type rather than uintptr_t to
reduce the need to cast, as is done in rtld-elf.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D50592
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50377
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The interface is not functional with libthr and returns not supported
error always. There is no point in providing it to userspace or document.
The symbols are kept for ABI compatibility, of course.
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50376
|
| |
|
|
|
|
|
| |
PR: 286537
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50133
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
some test support libraries had escaped confinement and were found
wandering around the utilities package:
/usr/tests/lib/csu/dynamiclib/libh_csu.so
/usr/tests/lib/libthr/dlopen/h_pthread_dlopen.so
/usr/tests/lib/libthr/dlopen/h_pthread_dlopen.so.1
/usr/tests/sys/vm/stack/libsoxstack.so
these aren't built using bsd.test.mk, so they don't get the default
PACKAGE=tests option; set this by hand in their Makefiles to put them
back where they belong.
Reviewed by: manu, des, emaste
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50147
|
| |
|
|
|
|
|
|
| |
PR: 286505
Reviewed by: olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50117
|
| |
|
|
|
|
|
|
|
|
| |
For instance, the structure contains the struct _Unwind_Exception, and
it seems that libgcc requires specific alignment for it.
PR: 285711
Tested by: Oleg Sidorkin <osidorkin@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
| |
Use NULL instead of 0 for null pointer.
Use != 0 for non-bool, as in the rest of the function.
Remove unneeded ().
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Otherwise libthr::_get_curthread() returns a garbage kept there from
allocate_initial_tls(), until libthr initialization proceeds enough to
set initial pcb->pcb_thread. The garbage pcb_thread was dereferenced
as struct pthread and some memory read as TID. Since the read might not
be consistent between reads, thr_malloc_umtx unlock sometimes returned
EPERM instead of clearing the lock word.
Reported by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
There are more complex interactions between malloc and libthr
initialization that can happen if libthr functions are called from ELF
object' constructors, before libthr is initialized. Break the
dependencies loop by using the private allocator with controlled init.
Reported by: yuri
Reviewed by: markj, olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48454
|
| |
|
|
|
|
|
|
| |
Reported by: yuri
Reviewed by: markj, olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48454
|
| |
|
|
|
|
|
|
|
| |
the return value is ignored.
Reviewed by: markj, olce
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48454
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
not only when check_cancel is called from the signal handler.
_thr_wake() is not enough to get the sigsuspend(2) syscall out of the
loop, since it only terminates sleep when an unblocked signal is
delivered.
PR: 283101
In collaboration with: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48200
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
by setting new cancel state and reading old cancel state from the
curthread structure atomic.
Note that this does not play well with async cancellation, since if
cancellation is enabled from a signal handler and cancellation request
is pending, the thread is cancelled immediately, calling user-defined
destructors, which all must be async-signal-safe (but this is a general
requirement for async cancellation anyway).
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48200
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48200
|
| |
|
|
|
|
|
|
|
|
| |
struct thread reuse might cause stalled rtld error message to propagate
to the new thread.
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48200
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48200
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D48200
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LSan wants to be able to register atfork handlers at __lsan_init time,
which can happen either at the first intercepted function call or in a
.preinit_array function. Both of these end up being very early in rtld
and executed with the bind lock held, which ends up causing problems
when we go to _libpthread_init().
Instead of requiring libpthread to be initialized, just insert the new
atfork handler straight into the list if it's not ready yet. The
critical section and locking should not be necessary if we're really
executing this early, as there won't be any threads to contend with.
Reviewed by: kib (earlier version), markj
Differential Revision: https://reviews.freebsd.org/D47349
|
| |
|
|
|
|
|
|
|
| |
Test that it generally functions, and also that registering multiple
times calls each handler in the order that it's documented to call them
in.
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D47348
|
| |
|
|
|
|
|
|
|
|
| |
It was disabled by default in fe52b7f60ef4. We planned to (but did not)
remove the option before FreeBSD 14. Remove it now, for FreeBSD 15.
Relnotes: Yes
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31558
|
| |
|
|
|
| |
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
| |
These were reported by `mandoc -T lint ...` as warnings.
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1467
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These were reported by `mandoc -T lint ...` as warnings:
- unusual Xr order
- unusual Xr punctuation
Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1464
|
| |
|
|
|
|
|
| |
After building packages we have a number of new
and updated Makefile.depend files
Reviewed by: stevek
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Officially since C11 (and in reality FreeBSD since 3.0 with commit
1b46cb523df3) errno has been defined to be a macro. Rename the symbol
to __libsys_errno and move it to FBSDprivate_1.0 and confine it entierly
to libsys for use by libthr. Add a FBSD_1.0 compat symbol for existing
binaries that were incorrectly linked to the errno symbol during
libc.so.7's lifetime.
This deliberately breaks linking software that directly links to errno.
Such software is broken and will fail in surprising ways if it becomes
threaded (e.g., if it triggers loading of a pam or nss module that
uses threads.)
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D46780
|
| |
|
|
| |
Sponsored by: Juniper Networks, Inc.
|
| |
|
|
|
|
|
| |
These ones were unambiguous cases where the Foundation was the only
listed copyright holder.
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function is called by rtld with the rtld bind lock write-locked,
when fixing the stack permission during dso load. Not every ARMv7 CPU
supports the div, which causes the recursive entry into rtld to resolve
the __aeabi_uidiv symbol, causing self-lock.
Workaround the problem by using roundup2() instead of open-coding less
efficient formula.
Diagnosed by: mmel
Based on submission by: John F Carr <jfc@mit.edu>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
| |
|
|
|
|
| |
This reverts commit 2b229739e7ca43b36e53f47147ac05a91333f7b9.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1343
|