History log of /freebsd-14.2/sys/compat/linux/linux_fork.c (Results 1 – 25 of 54)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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
# 3460fab5 18-Aug-2023 Dmitry Chagin <[email protected]>

linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743


# 685dc743 16-Aug-2023 Warner Losh <[email protected]>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <[email protected]>

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 ...


Revision tags: release/13.2.0
# d8e53d94 14-Feb-2023 Dmitry Chagin <[email protected]>

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 <[email protected]>

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


Revision tags: release/12.4.0
# 1b0a4974 07-Aug-2022 Konstantin Belousov <[email protected]>

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 <[email protected]>

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 ...


Revision tags: release/13.1.0, release/12.3.0
# a089c17d 29-Nov-2021 Edward Tomasz Napierala <[email protected]>

linux(4): Fix "set but not used" warnings

No functional changes.

Sponsored By: EPSRC


# 1af0780b 12-Aug-2021 Dmitry Chagin <[email protected]>

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 <[email protected]>

linux(4): Verify that higher 32bits of exit_signal in clone3 are unset.

MFC after: 2 weeks


# 43851475 12-Aug-2021 Dmitry Chagin <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

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 <[email protected]>

linux(4): Implement pi futexes using umtx.

Differential Revision: https://reviews.freebsd.org/D31240
MFC after: 2 weeks


# 0dc38e33 29-Jul-2021 Dmitry Chagin <[email protected]>

linux(4): Reimplement futexes using umtx.

Differential Revision: https://reviews.freebsd.org/D31236
MFC after: 2 weeks


# 747a6b7a 01-Jul-2021 Konstantin Belousov <[email protected]>

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 ...


Revision tags: release/13.0.0
# 3b57ddb0 18-Mar-2021 John Baldwin <[email protected]>

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 <[email protected]>

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 ...


Revision tags: release/12.2.0
# 1a180032 01-Sep-2020 Mateusz Guzik <[email protected]>

compat: clean up empty lines in .c and .h files


# d9565182 17-Aug-2020 Mark Johnston <[email protected]>

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


Revision tags: release/11.4.0
# 61a74c5c 15-Dec-2019 Jeff Roberson <[email protected]>

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 ...


Revision tags: release/12.1.0, release/11.3.0
# c5156c77 13-May-2019 Dmitry Chagin <[email protected]>

Linuxulator depends on a fundamental kernel settings such as SMP. Many
of them listed in opt_global.h which is not generated while building
modules outside of a kernel and such modules never match re

Linuxulator depends on a fundamental kernel settings such as SMP. Many
of them listed in opt_global.h which is not generated while building
modules outside of a kernel and such modules never match real cofigured
kernel.

So, we should prevent our users from building obviously defective modules.

Therefore, remove the root cause of the building of modules outside of a
kernel - the possibility of building modules with DEBUG or KTR flags.
And remove all of DEBUG printfs as it is incomplete and in threaded
programms not informative, also a half of system call does not have DEBUG
printf. For debuging Linux programms we have dtrace, ktr and ktrace ability.

PR: 222861
Reviewed by: trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20178

show more ...


# 803fff90 24-Mar-2019 Dmitry Chagin <[email protected]>

Whitespace cleanup (annoying).

MFC after: 1 month


123