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 A8FB445CFC; Thu, 14 Nov 2024 03:38:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C8A242D27; Thu, 14 Nov 2024 03:37:58 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 1BFD1427B7 for ; Thu, 14 Nov 2024 03:37:54 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-7240d93fffdso67073b3a.2 for ; Wed, 13 Nov 2024 18:37:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731551873; x=1732156673; 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=6tMHTaSjR129s50Et+v5VlBjfRp13QfpnUCNEZ8vsLM=; b=JfO5iZMUYZQeH38k9JEDQYS195MDnVbmk+53c6fUuKqC7TWVmy7dwTGi2kkc/89ZvD ZK2tSgtRBZX9dPZx/YgctgGmJX39XbquZFrtpYqvvsMFh5wTWDIKMbzWKSee9kbFSVR5 mdtNwRT8XSisc1bI6xdMCUmya9wnt8s3cK82oLFJ4rJoD/36likZhlpCO+73wftZd3ax zrNP/8GAmi4ON7rPV1PglhFP7X/vCihnzNxWgdrIHafOE1lSHzAH1/cMqCVV1pDjVXsq 7eqbveF1sWsqvQBb+uaVy3RU592LqK7s19TJ8pmgpYoINUJVQVK9BSI+tgiowwehcagj gObw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731551873; x=1732156673; 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=6tMHTaSjR129s50Et+v5VlBjfRp13QfpnUCNEZ8vsLM=; b=O7N9r8R7yFOpSlgdnY5KcCctDsnS64mqQ2hlG0cx9g1IBO23YyZ3NYZwWzOI/kEn+a npgR5Ac+J40ez+U7ZG6maS9n1nT/8P+zX+/KhIz5/PRQoTR5tZuHd4NjEpcEEVcEFApY P3Fm/LEODMYpX8o3uPq66NxWwJVpliz7Wc5Wxrf7vwAKUrhr7AcGT//9zUCvwq8JGljG w0t1pZp0RybUEff+EHWezuyWXHPdJjD0t3KtC021y2qwpEq7pK1nHoHZb1Xx76HxiOD7 QjNYihWHK8Yuo5VJxgYNTFjbtn5QBXN3CXRMWw1x5Lt5j8vH2qGO+TGW/RmemB7c8GbM gf6A== X-Gm-Message-State: AOJu0YwWi1P57A4V7aTM1A8MjkeWAvUCKJmKANQqYQwr01u6LEN4DAZn 14yEqfVSTD+bwD017xf166tcsaDrLqpI/r0p7zgNKX649LOsLDFRvvure6AEApPPeCK0GGW7hIq R X-Google-Smtp-Source: AGHT+IFCntQwit2bT4JGwaUeV+oSDauYjoYiOlr/WP+a7OREJEg35C9mLsPR1TyrD7nQDvL144JchA== X-Received: by 2002:a05:6a00:1388:b0:71e:6c65:e7c4 with SMTP id d2e1a72fcca58-72457a9d432mr7805099b3a.26.1731551873203; Wed, 13 Nov 2024 18:37:53 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7246a5d2bb5sm150976b3a.29.2024.11.13.18.37.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 18:37:52 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji Subject: [PATCH v3 05/11] crypto/qat: use secure memset Date: Wed, 13 Nov 2024 18:35:54 -0800 Message-ID: <20241114023738.141821-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114023738.141821-1-stephen@networkplumber.org> References: <20241114011129.451243-1-stephen@networkplumber.org> <20241114023738.141821-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 Regular memset maybe removed by compiler if done before a free function. Use new rte_free_sensitive instead. Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/qat_asym.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c index f5b56b2f71..d8a1406819 100644 --- a/drivers/crypto/qat/qat_asym.c +++ b/drivers/crypto/qat/qat_asym.c @@ -102,10 +102,7 @@ static const struct rte_driver cryptodev_qat_asym_driver = { curve.p.data, curve.bytesize) #define PARAM_CLR(what) \ - do { \ - memset(what.data, 0, what.length); \ - rte_free(what.data); \ - } while (0) + rte_free_sensitive(what.data) static void request_init(struct icp_qat_fw_pke_request *qat_req) -- 2.45.2