From nobody Tue Nov 22 12:29:10 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 4NGk8R24CNz4hWhs; Tue, 22 Nov 2022 12:29:11 +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 4NGk8R1Snjz44f6; Tue, 22 Nov 2022 12:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669120151; 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=9isHB/TY8v/6oYXX3VYriAttJnEqlwXohCmHZ3QtpF8=; b=X3B2h/p90fX7CrZnT2O4SUw9cmn8JwFNaUyeILPC3ZSlxkomVfR0/TTmPhZFd9eiZz8sUl 1gYRWpCsIUbXovF75ZuL1KSetR7FvRVM8RaLpVfXIe4eKabU82Zc/cSJ1YxA99vT1gFLBe FikcntNZsylSwI1/hBYbVyTsTxcT6qOWgPcvc/VYwgIE9v5tqGWKaT0Ey1t3WA+GRqAhVS D62FZ23dELM9sb2g5p/rdcU9xx4YuZW3XoV5siLwWlhjugK1jOvle4cMx1HKQSE5YCKIFb WMJL7jlXqV/jPJn2J1RgTpI0LGMUfsjURVbccZiMIjVCLGkrNBcuccY4XaOxoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669120151; 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=9isHB/TY8v/6oYXX3VYriAttJnEqlwXohCmHZ3QtpF8=; b=nd5yFPamFPdwThygXIEq7YG7rv25T6XjW14y6cmpNVwBOqb3lNYcCkO3i92kK4nZ2hsCiX bUGj2Es2EEqACbmfiRgK7/cZgcY7RwixSRwzp9T+PBEb5vYb1XwquPchxl2DopqdDpTjTG fIYbTO70h2/fjBQPfattJ5eH/4qksMpTe6QcrIJrjMrhCCOMX1bHglStsxLTe8Y54N8rHS nJpIHSox1Qxl2pRvKAeWcsonFzpzzj5CXvAAVb0BwNCmek8dJUp/B1UwByNrOjTdU8JxKA 2jnhh0yPhm6NuUAISCR6zoMGxW1r5xEPbri5Snl60+NpCq9PjSyzYobGrtSwvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669120151; a=rsa-sha256; cv=none; b=qegqz5N3g0/XrgB58MBnwUiz+m7D7MDHr0vOx6pkDkPSMSGnbcV23U/xr0MjS2MkJpX4Am wgsOqZrJ2+v00dFvn0u0b1eRnE+Ssf7QUSOiLP9XRZ828LAwJmlGWj9L+5uPnz+93yh81x 1h02xBG4kmV684DqqPigAEHREKQYxZ+++p9fslDbh3X8OtAoYDvPwI7j0/qbxdvHefkB6n I38Rw00LVWGXKP4WWTtzhB+0TXCUxSW5vTQHDgedApeEcmhPQaUwUJ3SMkCQVXX5LA5+3O PP85bKhTSlApNcySsShuqZlYdknOKQxo0LEEKfQE9EuzLPX5UTGunJLkHvPFmg== 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 4NGk8R0MF7zjSl; Tue, 22 Nov 2022 12:29:11 +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 2AMCTA2B000083; Tue, 22 Nov 2022 12:29:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AMCTA71000082; Tue, 22 Nov 2022 12:29:10 GMT (envelope-from git) Date: Tue, 22 Nov 2022 12:29:10 GMT Message-Id: <202211221229.2AMCTA71000082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 517547573a5b - main - crypto: move all zeroing into crypto_getreq 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 517547573a5bcf28c676daca3a9118fcd28c8116 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=517547573a5bcf28c676daca3a9118fcd28c8116 commit 517547573a5bcf28c676daca3a9118fcd28c8116 Author: Mateusz Guzik AuthorDate: 2022-11-22 12:28:07 +0000 Commit: Mateusz Guzik CommitDate: 2022-11-22 12:28:07 +0000 crypto: move all zeroing into crypto_getreq Reviewed by: jhb, markj Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D36774 --- sys/opencrypto/crypto.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index 25bbc9a4bf70..0baa61c089d3 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -1633,17 +1633,11 @@ crypto_freereq(struct cryptop *crp) uma_zfree(cryptop_zone, crp); } -static void -_crypto_initreq(struct cryptop *crp, crypto_session_t cses) -{ - crp->crp_session = cses; -} - void crypto_initreq(struct cryptop *crp, crypto_session_t cses) { memset(crp, 0, sizeof(*crp)); - _crypto_initreq(crp, cses); + crp->crp_session = cses; } struct cryptop * @@ -1652,9 +1646,9 @@ crypto_getreq(crypto_session_t cses, int how) struct cryptop *crp; MPASS(how == M_WAITOK || how == M_NOWAIT); - crp = uma_zalloc(cryptop_zone, how | M_ZERO); + crp = uma_zalloc(cryptop_zone, how); if (crp != NULL) - _crypto_initreq(crp, cses); + crypto_initreq(crp, cses); return (crp); }