From nobody Sat Mar 26 01:11:46 2022 X-Original-To: dev-commits-src-main@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 95A941A3D34C; Sat, 26 Mar 2022 01:11:47 +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 4KQLX31mqrz3tvB; Sat, 26 Mar 2022 01:11:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648257107; 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=M4j5uJ4tKhaPL8JBp8iSs6vwjHwmX1Z6pD5Yfwkm2Ro=; b=ymVt0eZR8VKkz3bXvjTVjnQLiYUz6kPNZ+fEJ56tuuhvHKx2SBZrUW5lfW64umnvpTmOcQ QzJItbia/HuIisDPtRjIGcEZAPyB3HJAEGxqxUTE6MMC6b9pfm218EFXnk5sAjxBresCfO sUHQRt/FTUfqILqD9g1lZ0sk4VIxhbGNeE/BD2mq4yAGnGoxDxmx34amjqKrOytj57gSdk zAk5HDv8VnuGMYdLq2Gucv3GYtGtsUfo3jVyA+V3N/735Qcn9HUHvaMK09G9wqRgryZMv7 5aRToaT1EM87UJzLmBIcQFPUwZ3ooEs2Iu9OGrFeF9z+chD1wuBXDPLhL6FHww== 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 974CD17887; Sat, 26 Mar 2022 01:11:46 +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 22Q1BkJf063726; Sat, 26 Mar 2022 01:11:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22Q1BkNh063725; Sat, 26 Mar 2022 01:11:46 GMT (envelope-from git) Date: Sat, 26 Mar 2022 01:11:46 GMT Message-Id: <202203260111.22Q1BkNh063725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: aca2a7facabb - main - stack_zero is not needed before stack_save List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aca2a7facabb3522e19f998c27f96a55b65cf959 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648257107; 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=M4j5uJ4tKhaPL8JBp8iSs6vwjHwmX1Z6pD5Yfwkm2Ro=; b=RjupBQ68z0lx0tM4sE9TLtPPhbrWhFwW4MTgEEdQJCgO3kfnCaXxZS8PIJcAM8tna9yNCm 3qdbsoP0mApaA46O08AuD6jwi+6R0Ykic2m7NN/cHqCvmaBwuvc437pZuME6JZ6j2E5NHA sy+HacqdKs4IWVyAXQUVtAsXKy67/ZmQ0ECFN3Ff7Dzwn/WWXRKNDOcChI/j+PpIzcwfsR Vwz/dv4pZpfXWK7aYiGVhlJHdcL44G+AphX4fw3TtJ5q+ZndkMRLc0qPpWrBrtsjYvfIeh QuFC6R6tBr44a6Djti5BLM02GOahOKiCjSIV6nePVuWyNXMSIwsGr09O/mMWjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648257107; a=rsa-sha256; cv=none; b=ADwLEYMcG1iBrC0FqnEYUL1rCKV4unJY2FVbNRuCvR6TsQpYl7QvbDmm8xvlrAcrpYMTz2 ucymyuKjezy/7/abmacqdsuCJGcSUPDtlMqpriozhUlc4zSPELCMKTun2+Zwg71huv3D/9 uBMgA991XZvkx+cMG6TF+yBae1O8kwUoL3ME3rLgS07K/0yOkYIjM87ft8RcCuofZb3xBA ct4Hms79OdID0KLgaPH/jIWDnQjN6kz3aGhqY0ZgVUO7RwQhsQW2MkS0NNMNJ4VmY7MARR +aFRVB0BcLGNClK4h3qYEyeu4Y0olBWTas4DNmJ2RyEjXGRCU5DW/LbBUBNpaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=aca2a7facabb3522e19f998c27f96a55b65cf959 commit aca2a7facabb3522e19f998c27f96a55b65cf959 Author: Eric van Gyzen AuthorDate: 2022-03-07 16:01:45 +0000 Commit: Eric van Gyzen CommitDate: 2022-03-26 01:10:38 +0000 stack_zero is not needed before stack_save The man page was recently clarified to commit to this contract. MFC after: 1 week Sponsored by: Dell EMC Isilon --- sys/compat/linuxkpi/common/src/linux_compat.c | 1 - sys/dev/ocs_fc/ocs_os.c | 1 - sys/dev/xen/debug/debug.c | 1 - sys/kern/subr_epoch.c | 1 - sys/kern/subr_kdb.c | 1 - sys/kern/subr_witness.c | 2 -- 6 files changed, 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 70e208da428f..4159cef9ffba 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -2618,7 +2618,6 @@ linux_dump_stack(void) #ifdef STACK struct stack st; - stack_zero(&st); stack_save(&st); stack_print(&st); #endif diff --git a/sys/dev/ocs_fc/ocs_os.c b/sys/dev/ocs_fc/ocs_os.c index 4e4edea2e63f..bd55b6c0bdce 100644 --- a/sys/dev/ocs_fc/ocs_os.c +++ b/sys/dev/ocs_fc/ocs_os.c @@ -857,7 +857,6 @@ void ocs_print_stack(void) #if defined(STACK) struct stack st; - stack_zero(&st); stack_save(&st); stack_print(&st); #endif diff --git a/sys/dev/xen/debug/debug.c b/sys/dev/xen/debug/debug.c index c4562c02ed03..bd1d6101f392 100644 --- a/sys/dev/xen/debug/debug.c +++ b/sys/dev/xen/debug/debug.c @@ -74,7 +74,6 @@ xendebug_filter(void *arg __unused) #if defined(STACK) && defined(DDB) struct stack st; - stack_zero(&st); stack_save(&st); mtx_lock_spin(&lock); diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c index 74524fb3f97e..100221cd62f9 100644 --- a/sys/kern/subr_epoch.c +++ b/sys/kern/subr_epoch.c @@ -195,7 +195,6 @@ epoch_trace_report(const char *fmt, ...) va_list ap; struct stackentry se, *new; - stack_zero(&se.se_stack); /* XXX: is it really needed? */ stack_save(&se.se_stack); /* Tree is never reduced - go lockless. */ diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 14a0205fc098..b189fe303e0f 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -438,7 +438,6 @@ kdb_backtrace(void) struct stack st; printf("KDB: stack backtrace:\n"); - stack_zero(&st); stack_save(&st); stack_print_ddb(&st); } diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index db82450f0570..57f63d362a4f 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -3081,7 +3081,6 @@ witness_lock_order_add(struct witness *parent, struct witness *child) data->wlod_key = key; w_lohash.wloh_array[hash] = data; w_lohash.wloh_count++; - stack_zero(&data->wlod_stack); stack_save(&data->wlod_stack); return (1); } @@ -3118,7 +3117,6 @@ witness_debugger(int cond, const char *msg) sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN); sbuf_set_drain(&sb, witness_output_drain, NULL); - stack_zero(&st); stack_save(&st); witness_output("stack backtrace:\n"); stack_sbuf_print_ddb(&sb, &st);