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 3893545D07; Thu, 14 Nov 2024 19:45:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DD0742EF9; Thu, 14 Nov 2024 19:45:11 +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 3192342EDC for ; Thu, 14 Nov 2024 19:45:07 +0100 (CET) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-2ea0f91d381so481058a91.1 for ; Thu, 14 Nov 2024 10:45:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731609906; x=1732214706; 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=tfYOu6aCEpzDaKe54IrbFgqggBNMewcb7kNSroyJDHM=; b=Gz++3OXMhGPsWUVNPoqlL8t0Hb2Ffyn7W1s9wPxmMYQA874auvDdQwAGRN7bLtBuW+ ZFS8WgbM9eUCWO+KJt+UoaC5MygMrpdSh3VfsQXR8NC93Ki+mJDY35wT4+BqCIYwMftk mo24XCuoWxpsUAIt5tgKlJlmyuJuwrjGHzCI//1fw8Krwk209tWv5qUNghx0nCJF3a85 HazhrLOgWASMVtWL45HP/vVWksx4Xd/Yky6IV0hjyepdKx4wabHjy0ScdBeR8U2IfFWn QVsL8mn9fmnlrzcPTtlYGcHfXq/+Hv4ik803mnKIPrckavRUTzUv5gsyxqOyn9QO5+9k 1opA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731609906; x=1732214706; 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=tfYOu6aCEpzDaKe54IrbFgqggBNMewcb7kNSroyJDHM=; b=qcwcf+WX59xT0c8Jsg72iyOal0p8EgrTEyzJppG+1yVO78pnkZjcbO48IXL4iltSPB kNBf59TAThk3h444Uer6oOUEsezbuP9uvL3AGrg+1h2ZdHEz8lMfQ0VG/E+5ykttOdEc EvskE8RcwNSAwIHk2f0nAjEbNBmBx25L4UJAcnxHauh3bv8kmxBkMVxKeGCETvcSlIIX PiTJcGNrOLqe2opHwYjNa9gokm0bNzDaIUgwks0LU4N5BCPxIrzAuSFl+SNVvIaA/lEG mI6V73+NP/v/r9akpd8cZyVGX3/vx56MQObQboTyhzyJvGm5alInWt1uBWDnyeB8Swup Mx5A== X-Gm-Message-State: AOJu0YyJ4ZZnMVlbEl4zlNXwRkPsEqN0sIfQmfO/30GWA8iXrbz5Vs60 O5tg+/gmnJsuN/OTOPT8j4e5mzGThFp4ht9sca0bTAYwjBqTbnCV4DHVzvX9NRF8eRLKKZmS+cN II70= X-Google-Smtp-Source: AGHT+IG1u0NZgYjXtJROuzuTPzdWvVDo3ABUKOOg8MibTf07Q2nF5MqCu8sAADkNpA5lPa4bFCOJFQ== X-Received: by 2002:a17:90a:e7c6:b0:2e2:d3e9:eb33 with SMTP id 98e67ed59e1d1-2ea0637083fmr3484513a91.11.1731609906313; Thu, 14 Nov 2024 10:45:06 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ea06ef71a6sm1517611a91.8.2024.11.14.10.45.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 10:45:06 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Bruce Richardson , Kai Ji Subject: [PATCH v4 05/12] crypto/qat: use secure memset Date: Thu, 14 Nov 2024 10:43:27 -0800 Message-ID: <20241114184452.31854-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241114184452.31854-1-stephen@networkplumber.org> References: <20241114011129.451243-1-stephen@networkplumber.org> <20241114184452.31854-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 Acked-by: Bruce Richardson --- 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