#
c82ed437 |
| 20-Nov-2024 |
Warner Losh <imp@FreeBSD.org> |
sys/conf.h: Make more self-contained
struct cdev has members of type struct timespec. Include sys/_timespec.h to so we don't need to rely on namespace pollution to define it.
Sponsored by: Netflix
|
Revision tags: release/13.4.0, release/14.1.0 |
|
#
2aee804c |
| 27-Mar-2024 |
Stephen J. Kiernan <stevek@FreeBSD.org> |
kerneldump: Add flag to indicate kernel core was successfully dumped
This allows for shutdown_final EVENTHANDLERs to know that a core dump successfully occurred. Embedded systems may want to record
kerneldump: Add flag to indicate kernel core was successfully dumped
This allows for shutdown_final EVENTHANDLERs to know that a core dump successfully occurred. Embedded systems may want to record this fact or act on it.
Obtained from: Juniper Networks, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44542
show more ...
|
#
d3efbe01 |
| 22-Mar-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
cdevpriv(9): add iterator
Reviewed by: christos Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44469
|
Revision tags: release/13.3.0 |
|
#
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 |
|
#
2ff63af9 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
|
Revision tags: release/13.2.0 |
|
#
c3179891 |
| 20-Mar-2023 |
Mark Johnston <markj@FreeBSD.org> |
kerneldump: Inline dump_savectx() into its callers
The callers of dump_savectx() (i.e., doadump() and livedump_start()) subsequently call dumpsys()/minidumpsys(), which dump the calling thread's sta
kerneldump: Inline dump_savectx() into its callers
The callers of dump_savectx() (i.e., doadump() and livedump_start()) subsequently call dumpsys()/minidumpsys(), which dump the calling thread's stack when writing the dump. If dump_savectx() gets its own stack frame, that frame might be clobbered when its caller later calls dumpsys()/minidumpsys(), making it difficult for debuggers to unwind the stack.
Fix this by making dump_savectx() a macro, so that savectx() is always called directly by the function which subsequently calls dumpsys()/minidumpsys().
This fixes stack unwinding for the panicking thread from arm64 minidumps. The same happened to work on amd64, but kgdb reports the dump_savectx() calls as coming from dumpsys(), so in that case it appears to work by accident.
Fixes: c9114f9f86f9 ("Add new vnode dumper to support live minidumps") Reviewed by: mhorne, jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39151
show more ...
|
Revision tags: release/12.4.0 |
|
#
497240de |
| 19-Aug-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
Retire clone_drain_lock
It is only ever xlocked in drain_dev_clone_events and the only consumer of that routine does not need it -- eventhandler code already makes sure the relevant callback is no l
Retire clone_drain_lock
It is only ever xlocked in drain_dev_clone_events and the only consumer of that routine does not need it -- eventhandler code already makes sure the relevant callback is no longer running.
Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D36268
show more ...
|
#
db71383b |
| 13-May-2022 |
Mitchell Horne <mhorne@FreeBSD.org> |
kerneldump: remove physical from dump routines
It is unused, especially now that the underlying d_dumper methods do not accept the argument.
Reviewed by: markj MFC after: 2 weeks Differential Revis
kerneldump: remove physical from dump routines
It is unused, especially now that the underlying d_dumper methods do not accept the argument.
Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35174
show more ...
|
#
489ba222 |
| 13-May-2022 |
Mitchell Horne <mhorne@FreeBSD.org> |
kerneldump: remove physical argument from d_dumper
The physical address argument is essentially ignored by every dumper method. In addition, the dump routines don't actually pass a real address; eve
kerneldump: remove physical argument from d_dumper
The physical address argument is essentially ignored by every dumper method. In addition, the dump routines don't actually pass a real address; every call to dump_append() passes a value of zero for physical.
Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35173
show more ...
|
#
0f50da2e |
| 13-May-2022 |
Mitchell Horne <mhorne@FreeBSD.org> |
Drop d_dump from struct cdevsw
It appears to be unused. These days struct disk has a d_dump member, which is what gets passed to the kernel dump framework.
Reviewed by: markj MFC after: 2 weeks Dif
Drop d_dump from struct cdevsw
It appears to be unused. These days struct disk has a d_dump member, which is what gets passed to the kernel dump framework.
Reviewed by: markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D35172
show more ...
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
c9114f9f |
| 23-Mar-2021 |
Mitchell Horne <mhorne@FreeBSD.org> |
Add new vnode dumper to support live minidumps
This dumper can instantiate and write the dump's contents to a file-backed vnode.
Unlike existing disk or network dumpers, the vnode dumper should not
Add new vnode dumper to support live minidumps
This dumper can instantiate and write the dump's contents to a file-backed vnode.
Unlike existing disk or network dumpers, the vnode dumper should not be invoked during a system panic, and therefore is not added to the global dumper_configs list. Instead, the vnode dumper is constructed ad-hoc when a live dump is requested using the new ioctl on /dev/mem. This is similar in spirit to a kgdb session against the live system via /dev/mem.
As described briefly in the mem(4) man page, live dumps are not guaranteed to result in a usuable output file, but offer some debugging value where forcefully panicing a system to dump its memory is not desirable/feasible.
A future change to savecore(8) will add an option to save a live dump.
Reviewed by: markj, Pau Amma <pauamma@gundo.com> (manpages) Discussed with: kib MFC after: 3 weeks Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D33813
show more ...
|
#
59c27ea1 |
| 09-Aug-2021 |
Mitchell Horne <mhorne@FreeBSD.org> |
Split out dumper allocation from list insertion
Add a new function, dumper_create(), to allocate a dumper. dumper_insert() will call this function and retains the existing behaviour.
This is desira
Split out dumper allocation from list insertion
Add a new function, dumper_create(), to allocate a dumper. dumper_insert() will call this function and retains the existing behaviour.
This is desirable for performing live dumps of the system. Here, there is a need to allocate and configure a dumper structure that is invoked outside of the typical debugger context. Therefore, it should be excluded from the list of panic-time dumpers.
free_single_dumper() is made public and renamed to dumper_destroy().
Reviewed by: kib, markj MFC after: 1 week Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D34068
show more ...
|
#
a9545eed |
| 10-Dec-2021 |
Florian Walpen <dev@submerge.ch> |
Add idle priority scheduling privilege group to MAC/priority
Add an idletime user group that allows non-root users to run processes with idle scheduling priority. Privileges are granted by a MAC pol
Add idle priority scheduling privilege group to MAC/priority
Add an idletime user group that allows non-root users to run processes with idle scheduling priority. Privileges are granted by a MAC policy in the mac_priority module. For this purpose, the kernel privilege PRIV_SCHED_IDPRIO was added to sys/priv.h (kernel module ABI change).
Deprecate the system wide sysctl(8) knob security.bsd.unprivileged_idprio which lets any user run idle priority processes, regardless of context. While the knob is still working, it is marked as deprecated in the description and in the man pages.
MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D33338
show more ...
|
#
bf2fa8d9 |
| 04-Dec-2021 |
Florian Walpen <dev@submerge.ch> |
MAC/priority module for realtime privilege group
This is a MAC policy module that grants scheduling privileges based on group membership. Users or processes in the group realtime (gid 47) are allow
MAC/priority module for realtime privilege group
This is a MAC policy module that grants scheduling privileges based on group membership. Users or processes in the group realtime (gid 47) are allowed to run threads and processes with realtime scheduling priority. For timing-sensitive, low-latency software like audio/jack, running with realtime priority helps to avoid stutter and gaps.
PR: 239125 MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D33191
show more ...
|
#
13a58148 |
| 06-Aug-2021 |
Eric van Gyzen <vangyzen@FreeBSD.org> |
netdump: send key before dump, in case dump fails
Previously, if an encrypted netdump failed, such as due to a timeout or network failure, the key was not saved, so a partial dump was completely use
netdump: send key before dump, in case dump fails
Previously, if an encrypted netdump failed, such as due to a timeout or network failure, the key was not saved, so a partial dump was completely useless.
Send the key first, so the partial dump can be decrypted, because even a partial dump can be useful.
Reviewed by: bdrewery, markj MFC after: 1 week Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D31453
show more ...
|
#
fbeb4cca |
| 06-Jun-2021 |
Mark Johnston <markj@FreeBSD.org> |
Suppress D_NEEDGIANT warnings for some drivers
During boot we warn that the kbd and openfirm drivers are Giant-locked and may be deleted. Generally, the warning helps signal that certain old driver
Suppress D_NEEDGIANT warnings for some drivers
During boot we warn that the kbd and openfirm drivers are Giant-locked and may be deleted. Generally, the warning helps signal that certain old drivers are not being maintained and are subject to removal, but this doesn't really apply to certain drivers which are harder to detangle from Giant.
Add a flag, D_GIANTOK, that devices can specify to suppress the misleading warning. Use it in the kbd and openfirm drivers.
Reviewed by: imp, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30649
show more ...
|
Revision tags: release/12.2.0 |
|
#
f6e54eb3 |
| 02-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
sys: clean up empty lines in .c and .h files
|
#
2ed5e423 |
| 16-Jun-2020 |
Rick Macklem <rmacklem@FreeBSD.org> |
Expose UID_xxx and GID_xxx definitions to userspace.
This patch moves the UID_xxx and GID_xxx definitions out of the #ifdef _KERNEL section, so that userspace programs like mountd can use them. Ther
Expose UID_xxx and GID_xxx definitions to userspace.
This patch moves the UID_xxx and GID_xxx definitions out of the #ifdef _KERNEL section, so that userspace programs like mountd can use them. There are a couple of userspace programs that do define UID_ROOT, but they do not include sys/conf.h. Since they are defined as the same value, maybe they should be changed to include sys/conf.h.
Reviewed by: kib Differential Revision: https:/reviews.freebsd.org/D25281
show more ...
|
Revision tags: release/11.4.0 |
|
#
5d25f943 |
| 23-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358239 through r358262.
|
#
fe20aaec |
| 23-Feb-2020 |
Ryan Libby <rlibby@FreeBSD.org> |
sys/kern: quiet -Wwrite-strings
Quiet a variety of Wwrite-strings warnings in sys/kern at low-impact sites. This patch avoids addressing certain others which would need to plumb const through struc
sys/kern: quiet -Wwrite-strings
Quiet a variety of Wwrite-strings warnings in sys/kern at low-impact sites. This patch avoids addressing certain others which would need to plumb const through structure definitions.
Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D23798
show more ...
|
#
1fccb43c |
| 20-Nov-2019 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: change si_usecount management to count used vnodes
Currently si_usecount is effectively a sum of usecounts from all associated vnodes. This is maintained by special-casing for VCHR every time u
vfs: change si_usecount management to count used vnodes
Currently si_usecount is effectively a sum of usecounts from all associated vnodes. This is maintained by special-casing for VCHR every time usecount is modified. Apart from complicating the code a little bit, it has a scalability impact since it forces a read from a cacheline shared with said count.
There are no consumers of the feature in the ports tree. In head there are only 2: revoke and devfs_close. Both can get away with a weaker requirement than the exact usecount, namely just the count of active vnodes. Changing the meaning to the latter means we only need to modify it on 0<->1 transitions, avoiding the check plenty of times (and entirely in something like vrefact).
Reviewed by: kib, jeff Tested by: pho Differential Revision: https://reviews.freebsd.org/D22202
show more ...
|
Revision tags: release/12.1.0 |
|
#
addccb8c |
| 17-Oct-2019 |
Conrad Meyer <cem@FreeBSD.org> |
Add a very limited DDB dumpon(8)-alike to MI dumper code
This allows ddb(4) commands to construct a static dumperinfo during panic/debug and invoke doadump(false) using the provided dumper configura
Add a very limited DDB dumpon(8)-alike to MI dumper code
This allows ddb(4) commands to construct a static dumperinfo during panic/debug and invoke doadump(false) using the provided dumper configuration (always inserted first in the list).
The intended usecase is a ddb(4)-time netdump(4) command.
Reviewed by: markj (earlier version) Differential Revision: https://reviews.freebsd.org/D21448
show more ...
|
#
8b3bc70a |
| 08-Oct-2019 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r352764 through r353315.
|
#
e3f35d56 |
| 05-Oct-2019 |
Kyle Evans <kevans@FreeBSD.org> |
Remove the remnants of SI_CHEAPCLONE
SI_CHEAPCLONE was introduced in r66067 for use with cloned bpfs. It was later also used in tty, tun, tap at points. The rough timeline for being removed in each
Remove the remnants of SI_CHEAPCLONE
SI_CHEAPCLONE was introduced in r66067 for use with cloned bpfs. It was later also used in tty, tun, tap at points. The rough timeline for being removed in each of these is as follows:
- r181690: bpf switched to use cdevpriv API by ed@ - r181905: ed@ rewrote the TTY later to be mpsafe - r204464: kib@ removes it from tun/tap, declaring it unused
I've not yet been able to dig up any other consumers in the intervening 9 years. It is no longer set on any devices in the tree and leaves an interesting situation in make_dev_sv where we're ok with the device already being set SI_NAMED.
show more ...
|
Revision tags: release/11.3.0 |
|
#
0269ae4c |
| 06-Jun-2019 |
Alan Somers <asomers@FreeBSD.org> |
MFHead @348740
Sponsored by: The FreeBSD Foundation
|