From nobody Fri Jul 19 21:06:55 2024 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 4WQj0b4vPzz5QMPs; Fri, 19 Jul 2024 21:06:55 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WQj0b441Fz4Py8; Fri, 19 Jul 2024 21:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721423215; 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=VXyaHPO8PsFntp1aL3CNP/yfMyZjpo+qBSd+KcSiIO4=; b=nJNjtibvu0o/Q0eSQfOTRP5r3zaMzPvW51m41A0knr/rPSutx2Ps1nFcTHXV4UbIKF8mPq J4x0vqvfst84voimzYZGfJW+Yqklqqme/I+C6YGjMdlZtPpD8ChWzktTs1nMq4JsiUs4dX KXjlpQ7Ebfv0UDyIlxlWSj2pisbGJZKCSsXJOagcmuAbP0RRDUAn/z8yrXh68QSA2cokT0 Vw3m7LVbR1cNkZuouEY3oK2dXOkywgES0LgYRarj8OzsiBfma/QIR5oHpyp6ol4Uh4QxD2 eVf1R88Ck0aLC9wcvmPcgK90QoBUf3v2t8+UwfMRO5CJ2znznQnNPoGYTC9HaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721423215; a=rsa-sha256; cv=none; b=CqDwTnyR/RRpusXMsOzSmcE7EkSuGRLbj/6yUxUIrBkoxkIx/9g0x/iUd4Jzwku0ephIn8 uo7+B4VcpAtrYpB1dj+Il/EqwP0T82jXaXE4ia545fNWOxPnHDc6wfZVZBNIA7c+2CK9j/ 9Dz0Undszqtn+sgyp4/rvJm+iXPAp+5d59/2a07gCXqHOcKMTIj1CjFjwxmuEITBNdisLk lOmnIEgqxv9r2sv1aD3Xo1OzC3gW2/dFCVxbbTuCUVQFL7rkbNOoTSFP6D9CR6QdGrmmoC iQR1h+pT8XAt4c6MUDtxapzgJm2WUh0UkB7AlOOwrfTJpXHVi7wRcRQ6IJeleg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721423215; 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=VXyaHPO8PsFntp1aL3CNP/yfMyZjpo+qBSd+KcSiIO4=; b=XcuTAei3mktXaGQFCEFfS3IA1UsuIzKKLJsK716h1oiq+/BnwX3GIbqaeBq0OuLONLKmC0 4Yj4o1NubCHeXWu6hN0zKOZLEZJjogbX4LTGT0yEmZ/5Bfovw2a3YMlgZEGtJkP0uOpXwQ t79cdi56QeHv9RFI0N2wSpMvMa5DYNXS+zvJ1ENcpKpBJhR/EV184L7aK2VN1eEjY39VGA 07f82oXP2a8UckSm32u4VDoapPVMzb0dY6BHK2+12I2fNton8vbHhlTjjFP7QYXDY1F1Sv EAccoJmTJXGHc6SgEyFynwDhdQKaZ0UfqPEp1qMttQXG6kYzL6WaF3/QAX1IqQ== 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 4WQj0b3gPVzp1l; Fri, 19 Jul 2024 21:06:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46JL6tqd034330; Fri, 19 Jul 2024 21:06:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46JL6tOD034327; Fri, 19 Jul 2024 21:06:55 GMT (envelope-from git) Date: Fri, 19 Jul 2024 21:06:55 GMT Message-Id: <202407192106.46JL6tOD034327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e0649a35a670 - main - libnvmf: Zero controller data template for I/O controllers 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0649a35a670c4b625d1de289b3886d9b3c9654f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e0649a35a670c4b625d1de289b3886d9b3c9654f commit e0649a35a670c4b625d1de289b3886d9b3c9654f Author: John Baldwin AuthorDate: 2024-07-19 21:06:47 +0000 Commit: John Baldwin CommitDate: 2024-07-19 21:06:47 +0000 libnvmf: Zero controller data template for I/O controllers This prevents stack garbage from leaking into the cdata used for the userspace I/O controller in nvmfd(8). Sponsored by: Chelsio Communications --- lib/libnvmf/nvmf_controller.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libnvmf/nvmf_controller.c b/lib/libnvmf/nvmf_controller.c index 554e5e769ded..0e0126040ee4 100644 --- a/lib/libnvmf/nvmf_controller.c +++ b/lib/libnvmf/nvmf_controller.c @@ -425,6 +425,7 @@ nvmf_init_io_controller_data(struct nvmf_qpair *qp, const char *serial, uname(&utsname); + memset(cdata, 0, sizeof(*cdata)); _nvmf_init_io_controller_data(qp->nq_cntlid, na->na_params.max_io_qsize, serial, utsname.sysname, utsname.release, subnqn, nn, ioccsz, sizeof(struct nvme_completion), cdata);