aboutsummaryrefslogtreecommitdiff
path: root/sys/ddb/db_command.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2022-11-02 17:20:11 +0000
committerMark Johnston <markj@FreeBSD.org>2022-11-02 17:46:24 +0000
commitc036339ddf0cf80164f41ea31f1d8d27f4a068a9 (patch)
tree7da8956c1c6a7db94f66d046e2c13bef5734f58d /sys/ddb/db_command.c
parentd93ec8cb1324d04d7cae19fb7fa98ade2ff33c80 (diff)
downloadsrc-c036339ddf0cf80164f41ea31f1d8d27f4a068a9.tar.gz
src-c036339ddf0cf80164f41ea31f1d8d27f4a068a9.zip
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
Diffstat (limited to 'sys/ddb/db_command.c')
-rw-r--r--sys/ddb/db_command.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index ab7bec8f2ffc..0ddbf5f49629 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -126,15 +126,15 @@ static struct db_command db_cmds[] = {
DB_CMD("set", db_set_cmd, CS_OWN|DB_CMD_MEMSAFE),
DB_CMD("write", db_write_cmd, CS_MORE|CS_SET_DOT),
DB_CMD("w", db_write_cmd, CS_MORE|CS_SET_DOT),
- DB_CMD("delete", db_delete_cmd, DB_CMD_MEMSAFE),
- DB_CMD("d", db_delete_cmd, DB_CMD_MEMSAFE),
+ DB_CMD("delete", db_delete_cmd, 0),
+ DB_CMD("d", db_delete_cmd, 0),
DB_CMD("dump", db_dump, DB_CMD_MEMSAFE),
- DB_CMD("break", db_breakpoint_cmd, DB_CMD_MEMSAFE),
- DB_CMD("b", db_breakpoint_cmd, DB_CMD_MEMSAFE),
- DB_CMD("dwatch", db_deletewatch_cmd, DB_CMD_MEMSAFE),
- DB_CMD("watch", db_watchpoint_cmd, CS_MORE|DB_CMD_MEMSAFE),
- DB_CMD("dhwatch", db_deletehwatch_cmd, DB_CMD_MEMSAFE),
- DB_CMD("hwatch", db_hwatchpoint_cmd, DB_CMD_MEMSAFE),
+ DB_CMD("break", db_breakpoint_cmd, 0),
+ DB_CMD("b", db_breakpoint_cmd, 0),
+ DB_CMD("dwatch", db_deletewatch_cmd, 0),
+ DB_CMD("watch", db_watchpoint_cmd, CS_MORE),
+ DB_CMD("dhwatch", db_deletehwatch_cmd, 0),
+ DB_CMD("hwatch", db_hwatchpoint_cmd, 0),
DB_CMD("step", db_single_step_cmd, DB_CMD_MEMSAFE),
DB_CMD("s", db_single_step_cmd, DB_CMD_MEMSAFE),
DB_CMD("continue", db_continue_cmd, DB_CMD_MEMSAFE),