git: c036339ddf0c - main - ddb: Don't flag breakpoint/watchpoint commands as MEMSAFE
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 02 Nov 2022 17:47:15 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c036339ddf0cf80164f41ea31f1d8d27f4a068a9 commit c036339ddf0cf80164f41ea31f1d8d27f4a068a9 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-11-02 17:20:11 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-11-02 17:46:24 +0000 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 --- sys/ddb/db_command.c | 16 ++++++++-------- 1 file 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),