|
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 |
|
| #
685dc743 |
| 16-Aug-2023 |
Warner Losh <[email protected]> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
Revision tags: release/13.2.0 |
|
| #
56448506 |
| 07-Jan-2023 |
Mitchell Horne <[email protected]> |
ddb: have 'reset' command use normal reboot path
This conditionally gives all registered shutdown handlers a chance to perform the reboot, with cpu_reset() being the fallback. The '\s' modifier can
ddb: have 'reset' command use normal reboot path
This conditionally gives all registered shutdown handlers a chance to perform the reboot, with cpu_reset() being the fallback. The '\s' modifier can be used with the command to get the previous behaviour.
The motivation is that some platforms may not be able do anything meaningful via cpu_reset(), due to a lack of standardized reset mechanism and/or firmware shortcomings. However, they may have a separate device driver attached that normally performs the reboot. Such is the case for some versions of the Raspberry Pi, where reset via PSCI fails, but the BCM2835 watchdog driver has a shutdown hook.
Reported by: bz Reviewed by: markj (slightly earlier version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D37981
show more ...
|
|
Revision tags: release/12.4.0 |
|
| #
c036339d |
| 02-Nov-2022 |
Mark Johnston <[email protected]> |
ddb: Don't flag breakpoint/watchpoint commands as MEMSAFE
They could potentially be abused to overwrite kernel memory, so shouldn't be accessible when mac_ddb is loaded.
Reviewed by: mhorne Fixes:
ddb: Don't flag breakpoint/watchpoint commands as MEMSAFE
They could potentially be abused to overwrite kernel memory, so shouldn't be accessible when mac_ddb is loaded.
Reviewed by: mhorne Fixes: bc4ea61d55cb ("ddb: tag core commands with DB_CMD_MEMSAFE") Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D37105
show more ...
|
| #
2449b9e5 |
| 18-Jul-2022 |
Mitchell Horne <[email protected]> |
mac: kdb/ddb framework hooks
Add three simple hooks to the debugger allowing for a loaded MAC policy to intervene if desired: 1. Before invoking the kdb backend 2. Before ddb command registration
mac: kdb/ddb framework hooks
Add three simple hooks to the debugger allowing for a loaded MAC policy to intervene if desired: 1. Before invoking the kdb backend 2. Before ddb command registration 3. Before ddb command execution
We extend struct db_command with a private pointer and two flag bits reserved for policy use.
Reviewed by: markj Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35370
show more ...
|
| #
a305b20e |
| 18-Jul-2022 |
Mitchell Horne <[email protected]> |
ddb: tag core commands with DB_CMD_MEMSAFE
Those which are statically defined in db_command.c.
Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.
ddb: tag core commands with DB_CMD_MEMSAFE
Those which are statically defined in db_command.c.
Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35584
show more ...
|
| #
c84c5e00 |
| 18-Jul-2022 |
Mitchell Horne <[email protected]> |
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 ...
|
| #
8a099482 |
| 05-Jul-2022 |
Mitchell Horne <[email protected]> |
db_command.c: use designated initializers
Provide separate helper macros for regular commands and next-level table commands as they are mutually exclusive. This ensures proper initialization of each
db_command.c: use designated initializers
Provide separate helper macros for regular commands and next-level table commands as they are mutually exclusive. This ensures proper initialization of each element and allows us to exclude some redundant fields, such as specifying .more = NULL for every regular command.
Reviewed by: markj, jhb MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35580
show more ...
|
| #
4f2ad624 |
| 05-Jul-2022 |
Mitchell Horne <[email protected]> |
db_command.c: style
Reviewed by: jhb MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35368
|
| #
4ef7db5a |
| 14-Jun-2022 |
Mitchell Horne <[email protected]> |
ddb: namespacing of struct command
'command' is too generic for something specific to the kernel debugger; change this so it is less likely to collide with local variable names. Also rename struct c
ddb: namespacing of struct command
'command' is too generic for something specific to the kernel debugger; change this so it is less likely to collide with local variable names. Also rename struct command_table to struct db_command_table.
Reviewed by: markj MFC after: 1 week Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D35367
show more ...
|
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0 |
|
| #
d85c9cef |
| 24-Feb-2021 |
Ryan Libby <[email protected]> |
ddb: reliably fail with ambiguous commands
db_cmd_match had an even/odd bug, where if a third command was partially matched (or any odd number greater than one) the search result would be set back f
ddb: reliably fail with ambiguous commands
db_cmd_match had an even/odd bug, where if a third command was partially matched (or any odd number greater than one) the search result would be set back from CMD_AMBIGUOUS to CMD_FOUND, causing the last command in the list to be executed instead of failing the match.
Reported by: mlaier Reviewed by: markj, mlaier, vangyzen Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28659
show more ...
|
| #
fa2528ac |
| 18-Feb-2021 |
Alex Richardson <[email protected]> |
Use atomic loads/stores when updating td->td_state
KCSAN complains about racy accesses in the locking code. Those races are fine since they are inside a TD_SET_RUNNING() loop that expects the value
Use atomic loads/stores when updating td->td_state
KCSAN complains about racy accesses in the locking code. Those races are fine since they are inside a TD_SET_RUNNING() loop that expects the value to be changed by another CPU.
Use relaxed atomic stores/loads to indicate that this variable can be written/read by multiple CPUs at the same time. This will also prevent the compiler from doing unexpected re-ordering.
Reported by: GENERIC-KCSAN Test Plan: KCSAN no longer complains, kernel still runs fine. Reviewed By: markj, mjg (earlier version) Differential Revision: https://reviews.freebsd.org/D28569
show more ...
|
| #
3e06c7da |
| 01-Jan-2021 |
John Baldwin <[email protected]> |
Use kdb_thr_* to iterate over threads consistently in DDB.
The "findstack", "show all trace", and "show active trace" commands were iterating over allproc to enumerate threads. This missed threads
Use kdb_thr_* to iterate over threads consistently in DDB.
The "findstack", "show all trace", and "show active trace" commands were iterating over allproc to enumerate threads. This missed threads executing in exit1() after being removed from allproc.
Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27829
show more ...
|
| #
825d2341 |
| 01-Jan-2021 |
John Baldwin <[email protected]> |
Don't check P_INMEM in kdb_thr_*().
Not all debugger operations that enumerate threads require thread stacks to be resident in memory to be useful. Instead, push P_INMEM checks (if needed) into cal
Don't check P_INMEM in kdb_thr_*().
Not all debugger operations that enumerate threads require thread stacks to be resident in memory to be useful. Instead, push P_INMEM checks (if needed) into callers.
Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27827
show more ...
|
|
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0 |
|
| #
e2e050c8 |
| 20-May-2019 |
Conrad Meyer <[email protected]> |
Extract eventfilter declarations to sys/_eventfilter.h
This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces hea
Extract eventfilter declarations to sys/_eventfilter.h
This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially.
EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).
As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files.
LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change).
No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.
show more ...
|
|
Revision tags: release/12.0.0 |
|
| #
e41793db |
| 20-Oct-2018 |
Conrad Meyer <[email protected]> |
ddb: Enable 'thread <address>'
Currently, the 'thread' command (to switch the debugger to another thread) only accepts decimal-encoded tids. Use the same parsing logic as 'show thread <arg>' to acc
ddb: Enable 'thread <address>'
Currently, the 'thread' command (to switch the debugger to another thread) only accepts decimal-encoded tids. Use the same parsing logic as 'show thread <arg>' to accept hex-encoded thread pointers in addition to decimal-encoded tids.
Document the 'thread' command in ddb.4 and expand the 'show thread' documentation to cover the tid usage.
Reported by: bwidawsk Reviewed by: bwidawsk (earlier version), kib (earlier version), markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D16962
show more ...
|
|
Revision tags: release/11.2.0 |
|
| #
3531bbb5 |
| 17-Apr-2018 |
Warner Losh <[email protected]> |
Restore db_radix on parse error, otherwise we'll silently change it to 10 on a botched trace command.
|
| #
796df753 |
| 30-Nov-2017 |
Pedro F. Giffuni <[email protected]> |
SPDX: Consider code from Carnegie-Mellon University.
Interesting cases, most likely from CMU Mach sources.
|
| #
212ff84f |
| 28-Nov-2017 |
Edward Tomasz Napierala <[email protected]> |
Make kdb_reenter() silent when explicitly called from db_error(). This removes the useless backtrace on various ddb(4) user errors.
Reviewed by: jhb@ Obtained from: CheriBSD MFC after: 2 weeks Spons
Make kdb_reenter() silent when explicitly called from db_error(). This removes the useless backtrace on various ddb(4) user errors.
Reviewed by: jhb@ Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D13212
show more ...
|
| #
c6404e66 |
| 09-Nov-2017 |
Gavin Atkinson <[email protected]> |
Point people towards our https web site for documentation, http accesses are just redirected anyway.
MFC after: 1 week
|
|
Revision tags: release/10.4.0, release/11.1.0 |
|
| #
9990da25 |
| 06-Jul-2017 |
Edward Tomasz Napierala <[email protected]> |
Improve ddb(4) error reporting a bit.
Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL
|
| #
b5bd6c73 |
| 06-Jul-2017 |
Edward Tomasz Napierala <[email protected]> |
Make ddb(4) a bit more user-friendly by improving "help".
Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA, AFRL
|
|
Revision tags: release/11.0.1, release/11.0.0 |
|
| #
51d025a5 |
| 09-Sep-2016 |
Justin Hibbits <[email protected]> |
Correct the type of db_cmd_loop_done.
On big endian hardware that uses 1 byte bool a type mismatch of bool vs int will cause the least signifcant byte of db_cmd_loop_done to be set, but the MSB to b
Correct the type of db_cmd_loop_done.
On big endian hardware that uses 1 byte bool a type mismatch of bool vs int will cause the least signifcant byte of db_cmd_loop_done to be set, but the MSB to be read, and read as 0. This causes ddb to stay in an infinite loop.
MFC after: 1 week
show more ...
|
| #
7e89a322 |
| 26-Aug-2016 |
Conrad Meyer <[email protected]> |
ddb: Add 'show active trace' command
'show active trace', or 'acttrace' for short, prints backtraces from running threads only.
Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D
ddb: Add 'show active trace' command
'show active trace', or 'acttrace' for short, prints backtraces from running threads only.
Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D7646
show more ...
|
| #
9f915a92 |
| 15-Apr-2016 |
Pedro F. Giffuni <[email protected]> |
ddb: for pointers replace 0 with NULL.
Mostly cosmetical, no functional change.
Found with devel/coccinelle.
|
|
Revision tags: release/10.3.0, release/10.2.0 |
|
| #
0a95ab74 |
| 23-May-2015 |
Pedro F. Giffuni <[email protected]> |
ddb: de-register
|