From nobody Mon Jul 18 22:06:53 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lmwzf1j8rz1GpLt; Mon, 18 Jul 2022 22:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lmwzf12kqz3yNR; Mon, 18 Jul 2022 22:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658182014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n7OSUTff+J6z9qOQDgb4dgOoEp5Efp6mBvqhjsaOMKM=; b=RPsWsHZJ5I6kE+zto1+RA4GujU1laiEb1TY1e5X2V5mjlJlf72TmnQtYFL2hsmlJoSo0xE OhXlpeaGsptT9EOBgx65HxpG3g/4fQriP8E2yhRxlQo/+ySOIWKKXXffoHDXy1tbDMmsIa eJdlqHYgnuxy/Vcu//9MIrIlaV2fthOOKXDS2dHQL7YIlW5HjygcHeA29110UyfUgVTHea 8rNsqAk36gOPOdOmce6CddsaC2YVeoIo3mJAWoTPyvztw/i4WP0C40JJJbvYYQ3B1+Tfzd NISsXBEb1SQcSEMnhkS6YgRPVRzpHY0xIHJI8UFk0aGZ9Vf94Iwn7aqeGDIcwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lmwzf02c7zv4m; Mon, 18 Jul 2022 22:06:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26IM6rSh048166; Mon, 18 Jul 2022 22:06:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26IM6rVt048165; Mon, 18 Jul 2022 22:06:53 GMT (envelope-from git) Date: Mon, 18 Jul 2022 22:06:53 GMT Message-Id: <202207182206.26IM6rVt048165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: a305b20ead13 - main - ddb: tag core commands with DB_CMD_MEMSAFE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a305b20ead13bb29880e15ff20c3bb83b5397a82 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658182014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n7OSUTff+J6z9qOQDgb4dgOoEp5Efp6mBvqhjsaOMKM=; b=PhvGolgYVNE1sqJsunB2LU0k1FznLio48myLxevaj8NKdZCrZX52BrybgTpbTQak6RXnuT JUXV910GHbK2ofJDxI8fVQaRxlHAYekpV5IZH54JoZ/EasMRBhxP+j1cJ4t5nnJXHce2KF tlqitarb3IfigD6HuTX7Ax5wHAURSfj1SsczQM2n3AtHYqZGCSQZowc01wAHGX3R3CM7cp p9V/joKvgUXJMgdeYZabRgSKhcLZIa6xZoxBS16JjjiaKCILhN4prVZmFySg7zpjXNDmf4 h8y6ZH+0DPOhNQ2DVufvAC5StyALD7Ajj6a6RhPGKrNINlVVv2ONdyzrQobg0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658182014; a=rsa-sha256; cv=none; b=GVObq9KUtOx2kFPkKT3Y3zt3ulh22MZZlHhog2UDd89PW4Nbsjl1DrgdoKoEH8fY55NFBb +wUqTWuUMnvHtE183o7mPd2RJNtLO81JFcMaqs/wthqz5PNMgcEpIR5mT8zc5Iyyq34eat JPlUmljCIjAJc7coJ0BAbSp8A5q+/t0hXlaGetWBVd2KvCy0vm99YPVPOd9jyZt5+vaiWe XvE/wPpJert0K2cCGyzqjwM+GNYJlKdJS9S7H5DxxhGsFNRUMAeuRvlnwmCQ052lyQ1NxT h97/eiY/IAAZOPd+YoQWvl9UeOsBml842WzZuuzFLdYVMiKJqQ11dKBIrWdlcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=a305b20ead13bb29880e15ff20c3bb83b5397a82 commit a305b20ead13bb29880e15ff20c3bb83b5397a82 Author: Mitchell Horne AuthorDate: 2022-07-18 21:22:36 +0000 Commit: Allan Jude CommitDate: 2022-07-18 22:06:11 +0000 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 --- sys/ddb/db_command.c | 78 ++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 06eab31dbfa8..71e9b039d7a9 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -94,13 +94,13 @@ static db_cmdfcn_t db_watchdog; } static struct db_command db_show_active_cmds[] = { - DB_CMD("trace", db_stack_trace_active, 0), + DB_CMD("trace", db_stack_trace_active, DB_CMD_MEMSAFE), }; struct db_command_table db_show_active_table = LIST_HEAD_INITIALIZER(db_show_active_table); static struct db_command db_show_all_cmds[] = { - DB_CMD("trace", db_stack_trace_all, 0), + DB_CMD("trace", db_stack_trace_all, DB_CMD_MEMSAFE), }; struct db_command_table db_show_all_table = LIST_HEAD_INITIALIZER(db_show_all_table); @@ -108,9 +108,9 @@ struct db_command_table db_show_all_table = static struct db_command db_show_cmds[] = { DB_TABLE("active", &db_show_active_table), DB_TABLE("all", &db_show_all_table), - DB_CMD("registers", db_show_regs, 0), - DB_CMD("breaks", db_listbreak_cmd, 0), - DB_CMD("threads", db_show_threads, 0), + DB_CMD("registers", db_show_regs, DB_CMD_MEMSAFE), + DB_CMD("breaks", db_listbreak_cmd, DB_CMD_MEMSAFE), + DB_CMD("threads", db_show_threads, DB_CMD_MEMSAFE), }; struct db_command_table db_show_table = LIST_HEAD_INITIALIZER(db_show_table); @@ -121,48 +121,48 @@ static struct db_command db_cmds[] = { DB_CMD("examine", db_examine_cmd, CS_SET_DOT), DB_CMD("x", db_examine_cmd, CS_SET_DOT), DB_CMD("search", db_search_cmd, CS_OWN|CS_SET_DOT), - DB_CMD("set", db_set_cmd, CS_OWN), + 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, 0), - DB_CMD("d", db_delete_cmd, 0), - DB_CMD("dump", db_dump, 0), - 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, 0), - DB_CMD("s", db_single_step_cmd, 0), - DB_CMD("continue", db_continue_cmd, 0), - DB_CMD("c", db_continue_cmd, 0), - DB_CMD("until", db_trace_until_call_cmd, 0), - DB_CMD("next", db_trace_until_matching_cmd, 0), + DB_CMD("delete", db_delete_cmd, DB_CMD_MEMSAFE), + DB_CMD("d", db_delete_cmd, DB_CMD_MEMSAFE), + 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("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), + DB_CMD("c", db_continue_cmd, DB_CMD_MEMSAFE), + DB_CMD("until", db_trace_until_call_cmd, DB_CMD_MEMSAFE), + DB_CMD("next", db_trace_until_matching_cmd, DB_CMD_MEMSAFE), DB_CMD("match", db_trace_until_matching_cmd, 0), - DB_CMD("trace", db_stack_trace, CS_OWN), - DB_CMD("t", db_stack_trace, CS_OWN), + DB_CMD("trace", db_stack_trace, CS_OWN|DB_CMD_MEMSAFE), + DB_CMD("t", db_stack_trace, CS_OWN|DB_CMD_MEMSAFE), /* XXX alias for active trace */ - DB_CMD("acttrace", db_stack_trace_active, 0), + DB_CMD("acttrace", db_stack_trace_active, DB_CMD_MEMSAFE), /* XXX alias for all trace */ - DB_CMD("alltrace", db_stack_trace_all, 0), - DB_CMD("where", db_stack_trace, CS_OWN), - DB_CMD("bt", db_stack_trace, CS_OWN), + DB_CMD("alltrace", db_stack_trace_all, DB_CMD_MEMSAFE), + DB_CMD("where", db_stack_trace, CS_OWN|DB_CMD_MEMSAFE), + DB_CMD("bt", db_stack_trace, CS_OWN|DB_CMD_MEMSAFE), DB_CMD("call", db_fncall, CS_OWN), - DB_CMD("ps", db_ps, 0), + DB_CMD("ps", db_ps, DB_CMD_MEMSAFE), DB_CMD("gdb", db_gdb, 0), - DB_CMD("halt", db_halt, 0), - DB_CMD("reboot", db_reset, 0), - DB_CMD("reset", db_reset, 0), - DB_CMD("kill", db_kill, CS_OWN), - DB_CMD("watchdog", db_watchdog, CS_OWN), + DB_CMD("halt", db_halt, DB_CMD_MEMSAFE), + DB_CMD("reboot", db_reset, DB_CMD_MEMSAFE), + DB_CMD("reset", db_reset, DB_CMD_MEMSAFE), + DB_CMD("kill", db_kill, CS_OWN|DB_CMD_MEMSAFE), + DB_CMD("watchdog", db_watchdog, CS_OWN|DB_CMD_MEMSAFE), DB_CMD("thread", db_set_thread, 0), - DB_CMD("run", db_run_cmd, CS_OWN), - DB_CMD("script", db_script_cmd, CS_OWN), - DB_CMD("scripts", db_scripts_cmd, 0), - DB_CMD("unscript", db_unscript_cmd, CS_OWN), - DB_CMD("capture", db_capture_cmd, CS_OWN), - DB_CMD("textdump", db_textdump_cmd, CS_OWN), + DB_CMD("run", db_run_cmd, CS_OWN|DB_CMD_MEMSAFE), + DB_CMD("script", db_script_cmd, CS_OWN|DB_CMD_MEMSAFE), + DB_CMD("scripts", db_scripts_cmd, DB_CMD_MEMSAFE), + DB_CMD("unscript", db_unscript_cmd, CS_OWN|DB_CMD_MEMSAFE), + DB_CMD("capture", db_capture_cmd, CS_OWN|DB_CMD_MEMSAFE), + DB_CMD("textdump", db_textdump_cmd, CS_OWN|DB_CMD_MEMSAFE), DB_CMD("findstack", db_findstack_cmd, 0), }; struct db_command_table db_cmd_table = LIST_HEAD_INITIALIZER(db_cmd_table);