#
1123986d |
| 27-Mar-2025 |
John Baldwin <jhb@FreeBSD.org> |
device_pager: Add cdev_pager_get_path to retrieve the "path" for an object
This wraps a new optional cdev_pg_path method in struct cdev_pager_ops. If the method pointer is NULL, the function does n
device_pager: Add cdev_pager_get_path to retrieve the "path" for an object
This wraps a new optional cdev_pg_path method in struct cdev_pager_ops. If the method pointer is NULL, the function does nothing. The old device pager reads the pathname of the cdev stored in the object handle to match the existing code.
Retire the OBJ_CDEVH flag as it is no longer needed.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49335
show more ...
|
Revision tags: 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 |
|
#
6e55ba5b |
| 13-Dec-2024 |
joyu liao <joyul@juniper.net> |
Export the kernel API pgrp_calc_jobc
Summary: Export the kernel API pgrp_calc_jobc for use by other modules or functions.
Reviewed By: kib Obtained from: Juniper Networks, Inc. Differential Revisio
Export the kernel API pgrp_calc_jobc
Summary: Export the kernel API pgrp_calc_jobc for use by other modules or functions.
Reviewed By: kib Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D47539
show more ...
|
#
509300e1 |
| 06-Dec-2024 |
Yan-Hao Wang <bses30074@gmail.com> |
pfind: Fix coments
PR: 283093 Reviewed by: imp
|
#
17e624ca |
| 04-Dec-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
sys/vm: remove support for growing-up stacks
Reviewed by: alc, dougm, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D47892
|
Revision tags: release/14.2.0 |
|
#
580340db |
| 04-Nov-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
vm_object: do not assume that un_pager.devp.dev is cdev
It is subtype-specific handle. Mark OBJT_DEVICE that do fill cdev into the handle, with a new object flag OBJ_CDEVH.
PR: 282533 Reviewed by:
vm_object: do not assume that un_pager.devp.dev is cdev
It is subtype-specific handle. Mark OBJT_DEVICE that do fill cdev into the handle, with a new object flag OBJ_CDEVH.
PR: 282533 Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47443
show more ...
|
#
f0c07fe3 |
| 04-Nov-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
device_pager: rename the un_pager.devp.dev field to handle
because it is not neccessary struct cdev *.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revisio
device_pager: rename the un_pager.devp.dev field to handle
because it is not neccessary struct cdev *.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47443
show more ...
|
#
ac9b565b |
| 10-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kinfo_vmentry: report cdev name for device mappings
Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D47038
|
#
a8c641bb |
| 07-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
sys/user.h: report posix shm mappings
Add flag KVME_FLAG_POSIXSHM. Fill kve_path with the path of the segment.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differentia
sys/user.h: report posix shm mappings
Add flag KVME_FLAG_POSIXSHM. Fill kve_path with the path of the segment.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46970
show more ...
|
#
71a66883 |
| 07-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kinfo_{vmobject,vmentry}: move copy of pathes into the vnode handling scope
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.o
kinfo_{vmobject,vmentry}: move copy of pathes into the vnode handling scope
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46970
show more ...
|
#
409c2fa3 |
| 07-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kinfo_vmentry: report max protection
Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46971
|
#
d3dd6bd4 |
| 05-Oct-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
kinfo_vmentry: report mappings of the SysV shm segments
Mark such mappings with the new flag KVME_FLAG_SYSVSHM. Provide segment key in kve_vn_fileid, vnode never can back shm mapping. Provide sequen
kinfo_vmentry: report mappings of the SysV shm segments
Mark such mappings with the new flag KVME_FLAG_SYSVSHM. Provide segment key in kve_vn_fileid, vnode never can back shm mapping. Provide sequence number in kve_vn_fsid_freebsd11.
Reviewed by: markj (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46959
show more ...
|
Revision tags: release/13.4.0 |
|
#
47288801 |
| 29-Jul-2024 |
Mark Johnston <markj@FreeBSD.org> |
proc: Remove kernel stack swapping support, part 6
- Remove most checks of the P_INMEM flag. - Some uses remain since a few userspace tools, e.g., ps(1) and top(1) expect the flag to be set. Thes
proc: Remove kernel stack swapping support, part 6
- Remove most checks of the P_INMEM flag. - Some uses remain since a few userspace tools, e.g., ps(1) and top(1) expect the flag to be set. These can be cleaned up but the code has most likely been copy-pasted elsewhere and while linger for a long time.
Tested by: pho Reviewed by: alc, imp, kib Differential Revision: https://reviews.freebsd.org/D46117
show more ...
|
#
e24a6552 |
| 29-Jul-2024 |
Mark Johnston <markj@FreeBSD.org> |
thread: Remove kernel stack swapping support, part 4
- Remove the IS_SWAPPED thread inhibitor state. - Remove all uses of TD_IS_SWAPPED() in the kernel. - Remove the TDF_CANSWAP flag. - Remove the P
thread: Remove kernel stack swapping support, part 4
- Remove the IS_SWAPPED thread inhibitor state. - Remove all uses of TD_IS_SWAPPED() in the kernel. - Remove the TDF_CANSWAP flag. - Remove the P_SWAPPINGOUT and P_SWAPPINGIN flags.
Tested by: pho Reviewed by: alc, imp, kib Differential Revision: https://reviews.freebsd.org/D46115
show more ...
|
#
3e00c11a |
| 12-Jul-2024 |
Alan Cox <alc@FreeBSD.org> |
arm64: Support the L3 ATTR_CONTIGUOUS page size in pagesizes[]
Update pagesizes[] to include the L3 ATTR_CONTIGUOUS (L3C) page size, which is 64KB when the base page size is 4KB and 2MB when the bas
arm64: Support the L3 ATTR_CONTIGUOUS page size in pagesizes[]
Update pagesizes[] to include the L3 ATTR_CONTIGUOUS (L3C) page size, which is 64KB when the base page size is 4KB and 2MB when the base page size is 16KB.
Add support for L3C pages to shm_create_largepage().
Add support for creating L3C page mappings to pmap_enter(psind=1).
Add support for reporting L3C page mappings to mincore(2) and procstat(8).
Update vm_fault_soft_fast() and vm_fault_populate() to handle multiple superpage sizes.
Declare arm64 as supporting two superpage reservation sizes, and simulate two superpage reservation sizes, updating the vm_page's psind field to reflect the correct page size from pagesizes[]. (The next patch in this series will replace this simulation. This patch is already big enough.)
Co-authored-by: Eliot Solomon <ehs3@rice.edu> Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45766
show more ...
|
Revision tags: release/14.1.0 |
|
#
235436d6 |
| 04-Apr-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
stop_all_proc(): skip traced or signal-stoped processes
Since thread_single(SINGLE_ALLPROC) ignores them since 9241ebc796c, and there is not much we can do for the debugger-controlled process.
Note
stop_all_proc(): skip traced or signal-stoped processes
Since thread_single(SINGLE_ALLPROC) ignores them since 9241ebc796c, and there is not much we can do for the debugger-controlled process.
Noted by: olce Reviewed by: markj, olce Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44638
show more ...
|
Revision tags: release/13.3.0 |
|
#
171f0832 |
| 28-Nov-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
EVFILT_TIMER: intialize stop timer list in type-stable proc init, instead of fork
Since kqueue timer may exist after the process that created it exited (same scenario with rfork(2) as in PR 275286),
EVFILT_TIMER: intialize stop timer list in type-stable proc init, instead of fork
Since kqueue timer may exist after the process that created it exited (same scenario with rfork(2) as in PR 275286), make the tailq p_kqtim_stop accessed by filt_timerdetach() type-stable.
Noted and reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42777
show more ...
|
#
29363fb4 |
| 23-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl s
sys: Remove ancient SCCS tags.
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script.
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
35b3be81 |
| 09-Oct-2023 |
Zhenlei Huang <zlei@FreeBSD.org> |
proc: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'kern.kstack_pages' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correct
proc: Add sysctl flag CTLFLAG_TUN to loader tunable
The sysctl variable 'kern.kstack_pages' is actually a loader tunable. Add sysctl flag CTLFLAG_TUN to it so that `sysctl -T` will report it correctly.
No functional change intended.
Note that on arm64 the thread0 stack size can not be controlled with it, kib@ suggested that arm64 maintainers can fix it eventually so let's enable it also on arm64 right now.
Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113
show more ...
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
7a70f17a |
| 07-Jul-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
killpg(): more carefully avoid LoR
otherwise we could end up with the livelock. When pg_killsx trylock failed, ensure that we do wait for lock availability before retry.
Reported and tested by: ph
killpg(): more carefully avoid LoR
otherwise we could end up with the livelock. When pg_killsx trylock failed, ensure that we do wait for lock availability before retry.
Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
show more ...
|
#
be30fd3a |
| 07-Jul-2023 |
Mike Karels <karels@FreeBSD.org> |
KERN_PROC_VM_LAYOUT sysctl: fix bug in 32-bit-compatible path
vmspace_free() is called redundantly in the 32-bit-compatible path in sysctl_kern_proc_vm_layout(), causing a premature free (possibly f
KERN_PROC_VM_LAYOUT sysctl: fix bug in 32-bit-compatible path
vmspace_free() is called redundantly in the 32-bit-compatible path in sysctl_kern_proc_vm_layout(), causing a premature free (possibly for the current address space). Remove the extra call.
PR: 272401 Reported by: marklmi at yahoo.com Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D40908
show more ...
|
#
3360b485 |
| 12-Jun-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
killpg(2): close a race with fork(2), part1
If the process group member performs fork(), the child could escape signalling from killpg(). Prevent it by introducing an sx process group lock pg_killsx
killpg(2): close a race with fork(2), part1
If the process group member performs fork(), the child could escape signalling from killpg(). Prevent it by introducing an sx process group lock pg_killsx which is taken interruptibly shared around fork. If there is a pending signal, do the trip through userspace with ERESTART to handle signal ASTs. The lock is taken exclusively during killpg().
The lock is also locked exclusive when the process changes group membership, to avoid escaping a signal by this means, by ensuring that the process group is stable during fork.
Note that the new lock is before proctree lock, so in some situations we could only do trylocking to obtain it.
This relatively simple approach cannot work for REAP_KILL, because process potentially belongs to more than one reaper tree by having sub-reapers.
Reported by: dchagin Tested by: dchagin, pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D40493
show more ...
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
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 ...
|
#
c84c5e00 |
| 18-Jul-2022 |
Mitchell Horne <mhorne@FreeBSD.org> |
ddb: annotate some commands with DB_CMD_MEMSAFE
This is not completely exhaustive, but covers a large majority of commands in the tree.
Reviewed by: markj Sponsored by: Juniper Networks, Inc. Spons
ddb: annotate some commands with DB_CMD_MEMSAFE
This is not completely exhaustive, but covers a large majority of commands in the tree.
Reviewed by: markj Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35583
show more ...
|
Revision tags: release/13.1.0 |
|
#
939f0b63 |
| 10-May-2022 |
Kornel Dulęba <kd@FreeBSD.org> |
Implement shared page address randomization
It used to be mapped at the top of the UVA. If the randomization is enabled any address above .data section will be randomly chosen and a guard page will
Implement shared page address randomization
It used to be mapped at the top of the UVA. If the randomization is enabled any address above .data section will be randomly chosen and a guard page will be inserted in the shared page default location. The shared page is now mapped in exec_map_stack, instead of exec_new_vmspace. The latter function is called before image activator has a chance to parse ASLR related flags. The KERN_PROC_VM_LAYOUT sysctl was extended to provide shared page address. The feature is enabled by default for 64 bit applications on all architectures. It can be toggled kern.elf64.aslr.shared_page sysctl.
Approved by: mw(mentor) Sponsored by: Stormshield Obtained from: Semihalf Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D35349
show more ...
|