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 8EAF345CF9; Wed, 13 Nov 2024 19:57:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7D3940ECF; Wed, 13 Nov 2024 19:57:35 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id B18C540E35 for ; Wed, 13 Nov 2024 19:57:32 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2e2e2d09decso889743a91.1 for ; Wed, 13 Nov 2024 10:57:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1731524252; x=1732129052; 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=AtZcUP0vm/IMgU5O/HsnJE2HeXe5FpNIxRDuTUnK96M=; b=Dy2HGyOWgTbJM25Uou/d8ZYkQRNO8z8wW8s//t2ed2K610ySDKLJA2iPOjrfWf8Jm4 HISvqVdW2HejMjghQTCOapT0kYJ7w7WvubF0+TDQj5KbdiK+kM5ObsCGkNzmG8CvcoOr 6grB+zzTzZdohQQjXWhBpXp161pskQoOoeIrwPIifuoztgtUZJcJZV+luH3kcr10UBr4 rsnHWTncpQyrPbFhM5fs3gWO+u6iKzZ5ZxrybJCGgDcf23W41LfnOFGRkcPzffUmxQwP 3tKNoYB4t1e2IbpWRcHxgqKFQRhOi/LDZrUheMyQ8gj46Yi74fVUh2Qx9ZWySMinVp3+ Otsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731524252; x=1732129052; 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=AtZcUP0vm/IMgU5O/HsnJE2HeXe5FpNIxRDuTUnK96M=; b=MooMd0E5NuO+8o5NPu34XxI3WWomxdbR5Z3Vz+MVge5mZRBZm+lGgP3V1iz1tcy1tM nSm95+8L3JkLgcDWgJbKo7hzxTvxAdKoe1ur0wRvXnrui39qtw7X5X2fNlHrsIkwnXPD JMZvBj2aNhxqpeA6qpESAGMgXSDonZ5RqlS3PiD043W/FPG9Cw12fphYUu4evlpMvtJ1 aLbVfZ+2zdb/VWmopYe5CEQlaS0bAWkNvAKVVbee09oLG9e4JsSIJAYdjZPLgQXu5WUb gZUj072rY4AxZan0CiNFZ8hfuLvuZtDpW0i/8wo1WYM1EJuUJsJSa/L/4vSpc0ULBRZC qrgg== X-Gm-Message-State: AOJu0YxndTlNeJlgaFKlfhfrmmkPFkD9ucf1zWvUJ8NhUuyGgf2kwu3O jUwViu2WYRS6XoFwnRshnB5uRO8Mqe3oBxNPGhmHPG41hUL5IXx+7zroZjO4zTtGznzT+q4uMrh S X-Google-Smtp-Source: AGHT+IHmJDgm6FNCSgHCA/CDnFnczTf5W9XRUfza2v2TPoEf/OQDd4ZiYB4DWt5wmdi4SVbhw5CaHQ== X-Received: by 2002:a17:90b:4c8a:b0:2e3:bc3e:feef with SMTP id 98e67ed59e1d1-2e9fe61547dmr671515a91.3.1731524251904; Wed, 13 Nov 2024 10:57:31 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 10:57:31 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Kai Ji Subject: [RFC 2/5] crypto/qat: use secure memset Date: Wed, 13 Nov 2024 10:56:01 -0800 Message-ID: <20241113185720.28706-3-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 Regular memset maybe removed by compiler if done before a free function. Use the C11 memset_s instead to ensure security parameters are cleared. Signed-off-by: Stephen Hemminger --- drivers/crypto/qat/qat_asym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/qat/qat_asym.c b/drivers/crypto/qat/qat_asym.c index f5b56b2f71..a2b87ddbfd 100644 --- a/drivers/crypto/qat/qat_asym.c +++ b/drivers/crypto/qat/qat_asym.c @@ -103,7 +103,7 @@ static const struct rte_driver cryptodev_qat_asym_driver = { #define PARAM_CLR(what) \ do { \ - memset(what.data, 0, what.length); \ + memset_s(what.data, 0, what.length); \ rte_free(what.data); \ } while (0) -- 2.45.2