From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E4E1445CF9; Wed, 13 Nov 2024 19:57:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94F5B41109; Wed, 13 Nov 2024 19:57:38 +0100 (CET) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id 6AF1340E45 for ; Wed, 13 Nov 2024 19:57:34 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2e34a089cd3so5914090a91.3 for ; Wed, 13 Nov 2024 10:57:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731524253; x=1732129053; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wIoWGY162PxQiRdoJSD58vBedGxGtTUiJ61NWmEHJgI=; b=X8fqpcQk5qmA3uIKx5ADfyd29mBl3I2rR6Tjv0XdWRakLyugCBdwNGyUKQOBfkvY+5 KUNx0KRuXb/2mD9dU9Ih7G8wmORrWOcoXLXg6a8qdpx0peglbXvlkyTvqdu2GewQ8NGx ZmfGRRbEHfmIKbqfLRedeFJPeYC7IrmoWW4//oV7HN+nEHkGTcQWItvREjZW9rw7IvBH 8kHiszJ0kTQbzTUZck3jUkqA311q6s6ilxw/THvEwcvb3viMx/frFY5gbvOZTXKsxsVy PVJyXkRagafNrorqovf9twpBXdP1vZHU77u6i54Lo8k6YPDY4BXXwy/8TtaJBXOpFhmu v79A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731524253; x=1732129053; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wIoWGY162PxQiRdoJSD58vBedGxGtTUiJ61NWmEHJgI=; b=E0GCsU4z9rczjroFRFfxNF4JsX4Y921iJ+AmB3LDx6LVE5wKBdS3TeRlbcFiqGUbZr EjkL+tdxCJS9vT6Q0TbqNrW62/5dWO54VzEsI3T19eLQUiOy8kFCONs/HkoZLXMF0pyT L4o39fLd3DDdBE+8X56GYoAC2K6YlsmeehNYKHnWAtqWbbSxBh74CF0RcF29UAFQtHEW NRZPoqvZsDlpe4c8s523Kxr/hmc/RHIP04R9AOD9q7EuJpeuHjHdUwWfuDnasfO+hFrQ Zd8iVMWXB2Qb/ribnD24vdTr1DRZSQx1EH7QUIFavR4uczw+3oKK55gSfo8XmgMACe5i uixw== X-Gm-Message-State: AOJu0YyW7Sd7fZp1Xn5tmhsYgkgC/IdleBDtsH4iQmYS2fiQO7JxlQxA GcMIfHnvDELUovn1omeknq5Z9d4XumAYKJBpjjb6N3tgollsYmkdP8+WjRsCJerwx7uojqUXnL8 O X-Google-Smtp-Source: AGHT+IFtc6kowiCQPDQ6yuFGp7CRXkNOReaBZ6f4ogxlxq4GaYtQHTM9aqB4sKDQVphMR39d2R8IMA== X-Received: by 2002:a17:90b:3c84:b0:2e2:c69b:669 with SMTP id 98e67ed59e1d1-2e9b177d6cbmr27767058a91.27.1731524253668; Wed, 13 Nov 2024 10:57:33 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e9f3e977d7sm1817935a91.8.2024.11.13.10.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 10:57:33 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ashish Gupta , Fan Zhang Subject: [RFC 4/5] compress/octeontx: remove memset before rte_free Date: Wed, 13 Nov 2024 10:56:03 -0800 Message-ID: <20241113185720.28706-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241113185720.28706-1-stephen@networkplumber.org> References: <20241113185720.28706-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Calling memset before rte_free not necessary, and could be removed by the compiler. In this case, the data is not security sensitive so the memset can be removed. Some security scanning tools will flag this. Signed-off-by: Stephen Hemminger --- drivers/compress/octeontx/otx_zip.c | 1 - drivers/compress/octeontx/otx_zip_pmd.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/compress/octeontx/otx_zip.c b/drivers/compress/octeontx/otx_zip.c index 11471dcbb4..331d2d9475 100644 --- a/drivers/compress/octeontx/otx_zip.c +++ b/drivers/compress/octeontx/otx_zip.c @@ -81,7 +81,6 @@ zipvf_q_term(struct zipvf_qp *qp) struct zip_vf *vf = qp->vf; if (cmdq->va != NULL) { - memset(cmdq->va, 0, ZIP_MAX_CMDQ_SIZE); rte_free(cmdq->va); } diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c index c8f456b319..74e3e942ad 100644 --- a/drivers/compress/octeontx/otx_zip_pmd.c +++ b/drivers/compress/octeontx/otx_zip_pmd.c @@ -479,8 +479,6 @@ zip_pmd_stream_free(struct rte_compressdev *dev, void *stream) (void *)&(z_stream->bufs[0]), (MAX_BUFS_PER_STREAM * ZIP_BURST_SIZE)); - /* Zero out the whole structure */ - memset(stream, 0, sizeof(struct zip_stream)); rte_free(stream); return 0; -- 2.45.2