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 E1E58A00C2 for ; Thu, 3 Nov 2022 10:29:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DDD3640694; Thu, 3 Nov 2022 10:29:39 +0100 (CET) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id 465C140693 for ; Thu, 3 Nov 2022 10:29:38 +0100 (CET) Received: by mail-wm1-f47.google.com with SMTP id bg9-20020a05600c3c8900b003bf249616b0so719436wmb.3 for ; Thu, 03 Nov 2022 02:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=rqabqGJoxTPX9EH3FdCeVYqbMiNmy1+EglOCEdaZRc4=; b=LDb4WjLprevmwwTpDWGPEur3S3uOs9hqD5GozKzZnFshe5+0Fc8iGqJmvEKVdyvevO F+UdHvXjdraD02fpjvooFIqqIqdSJw1yLwnismj4aciRqoh3xoDS958sxkKJJ28QXU+Z Albg1nrY9/r9P4toIaTOIjBvQneRROMZLqGGO82g70lx6mU6zLLa1e1sTZsZwFrNCbaE 0yOmrNNdLVkLMQroqovpmYhbNP9Yuw0jIJ9ESPkPjIVcxC5f9k9sFXApVntUReUpWE1j 3GDqLO4RG+XakUkHUoG7QwlbVt4nhqU9v5+W7IkpKQzGt+mDLEW/MbBaknet112RP0Ll XIZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rqabqGJoxTPX9EH3FdCeVYqbMiNmy1+EglOCEdaZRc4=; b=NnbxbMpy6NlO9YUTZTMCZfbfsRmIS0spW73bIEpaIkOPl1kEvseJDl2HPMY58RT5VR wyubDRZ4mmwcfr6ZETMniF5f6nEp4TDRcTpz4TLLku7gpBclYkhFxEHlPlVKppkrM9FN 4kml/d2YGPVpga2hbZ4TpJB4pukSf8ym9jXCqumUi8vz0XdkXpx1+XX+RSDpUBaanjaq jyyqB83hII4rT/YtzdAKcRGOlIMH6Ga1ahVdrO9rVGtFdThPTZ8SPhmwHF6T6Bbq+mo6 zTLDPqPD1hPzEHGJPPJ13s/WK4fCOyZXaK+ygz6XXs5wgWuToel+tHLg8BujjTxWpMHp dAeQ== X-Gm-Message-State: ACrzQf1sxtvs08L9ggGdxBP8RGyE5KRucL4IqiZFaiO+NvZP0ca3vX4T rHgpCLY4d7iDqqDJ1RkWoUk= X-Google-Smtp-Source: AMsMyM5gODkI6w0AWw0j6IswnoHisoEZrJVuAZTz3OurtvtKf1IUitZ6wqV8zso2JMrJiwCKL/jlZQ== X-Received: by 2002:a7b:c30a:0:b0:3c1:bf95:e17b with SMTP id k10-20020a7bc30a000000b003c1bf95e17bmr19421061wmj.31.1667467777964; Thu, 03 Nov 2022 02:29:37 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id p16-20020a056000019000b0023538fb27c1sm314544wrx.85.2022.11.03.02.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:29:37 -0700 (PDT) From: luca.boccassi@gmail.com To: Amit Prakash Shukla Cc: Fan Zhang , dpdk stable Subject: patch 'crypto/qat: fix build with GCC 12' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:26:45 +0000 Message-Id: <20221103092758.1099402-27-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/7c0fda8b301b286f25a9ff539ee476940dba7c5b Thanks. Luca Boccassi --- >From 7c0fda8b301b286f25a9ff539ee476940dba7c5b Mon Sep 17 00:00:00 2001 From: Amit Prakash Shukla Date: Thu, 4 Aug 2022 19:10:55 +0530 Subject: [PATCH] crypto/qat: fix build with GCC 12 [ upstream commit 04361fe2aca8998ea06fb4823dceb965698e147c ] GCC 12 raises the following warning: In function '_mm_storeu_si128', inlined from 'rte_mov16' at ../lib/eal/x86/include/rte_memcpy.h:508:2, inlined from 'rte_mov128' at ../lib/eal/x86/include/rte_memcpy.h:542:2, inlined from 'rte_memcpy_generic' at ../lib/eal/x86/include/rte_memcpy.h:732:4, inlined from 'rte_memcpy' at ../lib/eal/x86/include/rte_memcpy.h:882:10, inlined from 'qat_sym_do_precomputes.constprop' at ../drivers/crypto/qat/qat_sym_session.c:1434:2: /usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:739:8: error: array subscript 8 is outside array bounds of 'unsigned char[128]' [-Werror=array-bounds] 739 | *__P = __B; | ~~~~~^~~~~ ../drivers/crypto/qat/qat_sym_session.c: In function 'qat_sym_do_precomputes.constprop': ../drivers/crypto/qat/qat_sym_session.c:1305:17: note: at offset 192 into object 'opad.750' of size 128 1305 | uint8_t opad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)]; | ^~~~ ../drivers/crypto/qat/qat_sym_session.c: In function 'qat_sym_do_precomputes.constprop': ../drivers/crypto/qat/qat_sym_session.c:1304:17: note: at offset 128 into object 'ipad.749' of size 128 1304 | uint8_t ipad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)]; | ^~~~ Added a check to prevent compiler warnings. Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") Signed-off-by: Amit Prakash Shukla Acked-by: Fan Zhang --- drivers/crypto/qat/qat_sym_session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 2a9b2712f6..155d59d226 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1409,6 +1409,10 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, QAT_LOG(ERR, "invalid keylen %u", auth_keylen); return -EFAULT; } + + RTE_VERIFY(auth_keylen <= sizeof(ipad)); + RTE_VERIFY(auth_keylen <= sizeof(opad)); + rte_memcpy(ipad, auth_key, auth_keylen); rte_memcpy(opad, auth_key, auth_keylen); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.066624868 +0000 +++ 0027-crypto-qat-fix-build-with-GCC-12.patch 2022-11-03 09:27:25.365422286 +0000 @@ -1 +1 @@ -From 04361fe2aca8998ea06fb4823dceb965698e147c Mon Sep 17 00:00:00 2001 +From 7c0fda8b301b286f25a9ff539ee476940dba7c5b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 04361fe2aca8998ea06fb4823dceb965698e147c ] + @@ -44 +45,0 @@ -Cc: stable@dpdk.org @@ -53 +54 @@ -index e09d810354..52b3455cf0 100644 +index 2a9b2712f6..155d59d226 100644 @@ -56 +57 @@ -@@ -1651,6 +1651,10 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg, +@@ -1409,6 +1409,10 @@ static int qat_sym_do_precomputes(enum icp_qat_hw_auth_algo hash_alg,