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 3A735A0C47 for ; Tue, 10 Aug 2021 17:42:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34EAE4014F; Tue, 10 Aug 2021 17:42:25 +0200 (CEST) Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by mails.dpdk.org (Postfix) with ESMTP id B13804014F for ; Tue, 10 Aug 2021 17:42:23 +0200 (CEST) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id 998123F0B8 for ; Tue, 10 Aug 2021 15:42:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610143; bh=YAuJTfmenzGWxgdDnMrkOSlF4MUiD9+Rzxe6sJ1q7DI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=YiK1EA6IAodLENe3b76ouhMJRbhdaDsecgsYu3azWYYcM2pEXRO1IXGq10vhnnage 2tesvz804P5l8XzFRlxDoE9gSPyE9I0G5jvmDMUnNp4c2XVwfsxi58f38DN5J4t6q4 E4EEoMqyiDU7zwDEM0/uqHAv8RZAF7xQwN3LLKcU4VtG3QHCajGmvoE2Mg8Yg6+3KV PTWMcF8L2N2JiW+6E2snwQ6jTdVTHNQ8B3JgJq+vgmELfJ9HsYZfDAqBYxNY6WvlZ/ y0gObirSI2uSCTj6qa9XJpCP7aEOB2NtinwbpqCxd85xsGeUxH2opIrUnO7xDzJEmW IMcGTIsTZe/tA== Received: by mail-ej1-f71.google.com with SMTP id v3-20020a1709063383b02905b4d1d1e27cso1121147eja.19 for ; Tue, 10 Aug 2021 08:42:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YAuJTfmenzGWxgdDnMrkOSlF4MUiD9+Rzxe6sJ1q7DI=; b=Z8fo5HNE9G9S4PFnTw+/nR7FrL3JYHUw2ld6/ArIle7Lqs2vqSlBNFJO+xdINhBPPz UNIg4Xh6J9+cg2mWvc9wHaUdcsjmP42Qlzr4nRMX1e0gWoo2MYHAOcVeP4IUHwRUsWXP UMbOcQ6XwaDQdPbdV3EjuEJ9ru9euAXYCCz7V400cHf1AcvO6SDgHuXIckljF9KbfdoW 8U55ehaofiUdfJqIz6LietmnJQHPgsJl/W6/dhJJefi2cvq4in09ONYjN+inkjZl1GbL gri2Z4pFQUqoOCECF/1gK2on8WlHWDRw1sdht/nKAXiYHoYIfes4hrmt4+rUC38PNQT5 8pGA== X-Gm-Message-State: AOAM530eLxxO5FJj+88Fq0VaAJAZUfo6v5LTx74mydPh8cmP5SZ12PUF YMbmVFFq5xtU3m7LWf7ds+eyjJb9YKdsrBmMK6tHTipVccO+mwAuZ/FbHd1FtEcc21qfRAuV+zq eN6hNMhu4bNgmLRi1jmPQZEcj X-Received: by 2002:aa7:de05:: with SMTP id h5mr5778016edv.174.1628610143340; Tue, 10 Aug 2021 08:42:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfjiaW2Eo8yXgH2GeF+DS4bHhyqTHil+T+zpoTYMbTWG8ue+kWRrTnxzTTjNzUvWwJ+FO19A== X-Received: by 2002:aa7:de05:: with SMTP id h5mr5778003edv.174.1628610143172; Tue, 10 Aug 2021 08:42:23 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id bs13sm7033615ejb.98.2021.08.10.08.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:42:22 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Feifei Wang Cc: Ruifeng Wang , Honnappa Nagarahalli , Adam Dybkowski , dpdk stable Date: Tue, 10 Aug 2021 17:39:16 +0200 Message-Id: <20210810154022.749358-36-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'crypto/qat: fix Arm build with special memcpy' has been queued to stable release 19.11.10 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/12/21. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/a65cf4d87891d6f9ae9f3e140b6dd0171d3c6699 Thanks. Christian Ehrhardt --- >From a65cf4d87891d6f9ae9f3e140b6dd0171d3c6699 Mon Sep 17 00:00:00 2001 From: Feifei Wang Date: Fri, 21 May 2021 10:00:04 +0800 Subject: [PATCH] crypto/qat: fix Arm build with special memcpy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit c316efc3cf90fba1b673373669096ad6a3e39cc4 ] In Arm platform, when "RTE_ARCH_ARM64_MEMCPY" is set as true, gcc will report variable uninitialized warning: ../drivers/crypto/qat/qat_sym_session.c: In function ‘partial_hash_compute’: ../lib/eal/include/generic/rte_byteorder.h:241:24: warning: ‘’ may be used uninitialized in this function [-Wmaybe-uninitialized] 241 | #define rte_bswap32(x) __builtin_bswap32(x) ... This is because "digest" will be initialized by "rte_memcpy" function rather than "memcpy" if "RTE_ARCH_ARM64_MEMCPY" is set as true. Furthermore, 'rte_memcpy' will initialize 'digest' with two steps by invoking rte_mov_x functions. For example: partial_hash_sha1 -> rte_memcpy -> rte_memcpy_ge16_lt_128 -> step 1: rte_mov16(dst,src ) step 2: rte_mov16(dst - 16 + n, src - 16 + n) However, gcc compiler cannot identify this multi-step initialization, then it will report warning. To fix this, use "memset" to initialize "digest". Fixes: cd7fc8a84b48 ("eal/arm64: optimize memcpy") Signed-off-by: Feifei Wang Reviewed-by: Ruifeng Wang Reviewed-by: Honnappa Nagarahalli Acked-by: Adam Dybkowski --- drivers/crypto/qat/qat_sym_session.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 8545be2791..ab12c99716 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1164,6 +1164,9 @@ static int partial_hash_compute(enum icp_qat_hw_auth_algo hash_alg, uint64_t *hash_state_out_be64; int i; + /* Initialize to avoid gcc warning */ + memset(digest, 0, sizeof(digest)); + digest_size = qat_hash_get_digest_size(hash_alg); if (digest_size <= 0) return -EFAULT; -- 2.32.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-10 15:11:14.463095664 +0200 +++ 0036-crypto-qat-fix-Arm-build-with-special-memcpy.patch 2021-08-10 15:11:12.986637869 +0200 @@ -1 +1 @@ -From c316efc3cf90fba1b673373669096ad6a3e39cc4 Mon Sep 17 00:00:00 2001 +From a65cf4d87891d6f9ae9f3e140b6dd0171d3c6699 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit c316efc3cf90fba1b673373669096ad6a3e39cc4 ] + @@ -34 +35,0 @@ -Cc: stable@dpdk.org @@ -45 +46 @@ -index 231b1640da..e22dd3600c 100644 +index 8545be2791..ab12c99716 100644 @@ -48 +49 @@ -@@ -1196,6 +1196,9 @@ static int partial_hash_compute(enum icp_qat_hw_auth_algo hash_alg, +@@ -1164,6 +1164,9 @@ static int partial_hash_compute(enum icp_qat_hw_auth_algo hash_alg,