| #
0e742cc7
|
| 03-Jan-2025 |
John Baldwin <jhb@FreeBSD.org> |
cpu_set_upcall / linux_clone_thread: Remove calls to cpu_thread_clean
This is intended to clean state of a thread at the end of its lifecycle during wait(), not the beginning of its life cycle.
Rev
cpu_set_upcall / linux_clone_thread: Remove calls to cpu_thread_clean
This is intended to clean state of a thread at the end of its lifecycle during wait(), not the beginning of its life cycle.
Reviewed by: kib Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D48023
show more ...
|
| #
3460fab5
|
| 18-Aug-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
d8e53d94
|
| 14-Feb-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Cleanup includes under compat/linux
Cleanup unneeded includes, sort the rest according to style(9). No functional changes.
MFC after: 2 weeks
|
| #
10d16789
|
| 12-Feb-2023 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Get rid of the opt_compat.h include.
Since e013e369 COMPAT_LINUX, COMPAT_LINUX32 build options are removed, so include of opt_compat.h is no more needed.
MFC after: 2 weeks
|
| #
1b0a4974
|
| 07-Aug-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
thread_create(): call cpu_copy_thread() after td_pflags is zeroed
By calling the function too early we might still have the td_pflags value cached from the previous struct thread use. cpu_copy_threa
thread_create(): call cpu_copy_thread() after td_pflags is zeroed
By calling the function too early we might still have the td_pflags value cached from the previous struct thread use. cpu_copy_thread() depends on correct value for TDP_KTHREAD at least on x86.
Reported, bisected, and tested by: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36069
show more ...
|
| #
c6d31b83
|
| 18-Jul-2022 |
Konstantin Belousov <kib@FreeBSD.org> |
AST: rework
Make most AST handlers dynamically registered. This allows to have subsystem-specific handler source located in the subsystem files, instead of making subr_trap.c aware of it. For inst
AST: rework
Make most AST handlers dynamically registered. This allows to have subsystem-specific handler source located in the subsystem files, instead of making subr_trap.c aware of it. For instance, signal delivery code on return to userspace is now moved to kern_sig.c.
Also, it allows to have some handlers designated as the cleanup (kclear) type, which are called both at AST and on thread/process exit. For instance, ast(), exit1(), and NFS server no longer need to be aware about UFS softdep processing.
The dynamic registration also allows third-party modules to register AST handlers if needed. There is one caveat with loadable modules: the code does not make any effort to ensure that the module is not unloaded before all threads processed through AST handler in it. In fact, this is already present behavior for hwpmc.ko and ufs.ko. I do not think it is worth the efforts and the runtime overhead to try to fix it.
Reviewed by: markj Tested by: emaste (arm64), pho Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35888
show more ...
|
| #
a089c17d
|
| 29-Nov-2021 |
Edward Tomasz Napierala <trasz@FreeBSD.org> |
linux(4): Fix "set but not used" warnings
No functional changes.
Sponsored By: EPSRC
|
| #
1af0780b
|
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Move ff variable initialization from declaration.
Modern style(9) allows variables initialization where they are declared, but in this case initialization obfuscate the code.
MFC after:
linux(4): Move ff variable initialization from declaration.
Modern style(9) allows variables initialization where they are declared, but in this case initialization obfuscate the code.
MFC after: 2 weeks
show more ...
|
| #
c2cc5345
|
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Verify that higher 32bits of exit_signal in clone3 are unset.
MFC after: 2 weeks
|
| #
43851475
|
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Return ENOSYS for unsupported clone3 option bits.
Differential Revision: https://reviews.freebsd.org/D31483 MFC after: 2 weeks
|
| #
c5fc9fe7
|
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Implement CLONE_CLEAR_SIGHAND option bit.
CLONE_CLEAR_SIGHAND is designed to reset all signal handlers of the child not set to SIG_IGN to SIG_DFL.
Reviewed by: kib Differential revision:
linux(4): Implement CLONE_CLEAR_SIGHAND option bit.
CLONE_CLEAR_SIGHAND is designed to reset all signal handlers of the child not set to SIG_IGN to SIG_DFL.
Reviewed by: kib Differential revision: https://reviews.freebsd.org/D31481 MFC after: 2 weeks
show more ...
|
| #
17913b0b
|
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Implement clone3 system call.
clone3 system call is used by glibc-2.34.
Differential revision: https://reviews.freebsd.org/D31475 MFC after: 2 weeks
|
| #
0a4b664a
|
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Add struct clone_args for future clone3 system call.
In preparation for clone3 system call add struct clone_args and use it in clone implementation. Move all of clone related bits to the n
linux(4): Add struct clone_args for future clone3 system call.
In preparation for clone3 system call add struct clone_args and use it in clone implementation. Move all of clone related bits to the newly created linux_fork.h header.
Differential revision: https://reviews.freebsd.org/D31474 MFC after: 2 weeks
show more ...
|
| #
f1c45049
|
| 12-Aug-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Change clone syscall definition to match Linux actual one.
Differential revision: https://reviews.freebsd.org/D31473 MFC after: 2 weeks
|
| #
7a718f29
|
| 29-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Implement pi futexes using umtx.
Differential Revision: https://reviews.freebsd.org/D31240 MFC after: 2 weeks
|
| #
0dc38e33
|
| 29-Jul-2021 |
Dmitry Chagin <dchagin@FreeBSD.org> |
linux(4): Reimplement futexes using umtx.
Differential Revision: https://reviews.freebsd.org/D31236 MFC after: 2 weeks
|
| #
747a6b7a
|
| 01-Jul-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
cloudabi and linux ABIs: do not call umtx_thread_cleanup() from thr_exit syscall
These ABIs do not use umtx at all, so there is nothing to clean. Cloudabi references to umtx keys do not require any
cloudabi and linux ABIs: do not call umtx_thread_cleanup() from thr_exit syscall
These ABIs do not use umtx at all, so there is nothing to clean. Cloudabi references to umtx keys do not require any cleanups anyway.
Requested by: dchagin Reviewed by: dchagin, markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30987
show more ...
|
| #
3b57ddb0
|
| 18-Mar-2021 |
John Baldwin <jhb@FreeBSD.org> |
Rename linux_set_upcall_kse() to linux_set_upcall().
This matches the rename of cpu_set_upcall_kse() in 5c2cf818454375536fda522ba83cf67c50929e6b.
Reviewed by: kib, emaste MFC after: 1 week Sponsore
Rename linux_set_upcall_kse() to linux_set_upcall().
This matches the rename of cpu_set_upcall_kse() in 5c2cf818454375536fda522ba83cf67c50929e6b.
Reviewed by: kib, emaste MFC after: 1 week Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D29295
show more ...
|
| #
f8f74aaa
|
| 17-Nov-2020 |
Conrad Meyer <cem@FreeBSD.org> |
linux(4) clone(2): Correctly handle CLONE_FS and CLONE_FILES
The two flags are distinct and it is impossible to correctly handle clone(2) without the assistance of fork1(). This change depends on t
linux(4) clone(2): Correctly handle CLONE_FS and CLONE_FILES
The two flags are distinct and it is impossible to correctly handle clone(2) without the assistance of fork1(). This change depends on the pwddesc split introduced in r367777.
I've added a fork_req flag, FR2_SHARE_PATHS, which indicates that p_pd should be treated the opposite way p_fd is (based on RFFDG flag). This is a little ugly, but the benefit is that existing RFFDG API is preserved. Holding FR2_SHARE_PATHS disabled, RFFDG indicates both p_fd and p_pd are copied, while !RFFDG indicates both should be cloned.
In Chrome, clone(2) is used with CLONE_FS, without CLONE_FILES, and expects independent fd tables.
The previous conflation of CLONE_FS and CLONE_FILES was introduced in r163371 (2006).
Discussed with: markj, trasz (earlier version) Differential Revision: https://reviews.freebsd.org/D27016
show more ...
|
| #
1a180032
|
| 01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
compat: clean up empty lines in .c and .h files
|
| #
e2515283
|
| 27-Aug-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
| #
d9565182
|
| 17-Aug-2020 |
Mark Johnston <markj@FreeBSD.org> |
Remove "emulation" of clone(CLONE_PARENT | CLONE_THREAD).
On Linux this is supposed to result in EINVAL.
Reported by: syzkaller MFC after: 1 week Sponsored by: The FreeBSD Foundation
|
| #
61a74c5c
|
| 15-Dec-2019 |
Jeff Roberson <jeff@FreeBSD.org> |
schedlock 1/4
Eliminate recursion from most thread_lock consumers. Return from sched_add() without the thread_lock held. This eliminates unnecessary atomics and lock word loads as well as reducing
schedlock 1/4
Eliminate recursion from most thread_lock consumers. Return from sched_add() without the thread_lock held. This eliminates unnecessary atomics and lock word loads as well as reducing the hold time for scheduler locks. This will eventually allow for lockless remote adds.
Discussed with: kib Reviewed by: jhb Tested by: pho Differential Revision: https://reviews.freebsd.org/D22626
show more ...
|