From patchwork Mon Jan 9 10:34:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 121739 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 865A24237D; Mon, 9 Jan 2023 11:34:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4611142B77; Mon, 9 Jan 2023 11:34:49 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 33F414067C for ; Mon, 9 Jan 2023 11:34:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673260487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+KAskwx+18jksb6qRdbtVtFpf+No/YhcKkeykTEhXGs=; b=dfEqKEgNj5eS3ScIg3HGxb5tEMLja9mhG0s4mNnp6/CS92VQjjGDgjZzroU/NCOCEIzxdP /Gqdp4Q8Tez908xwIWUEMnxsUXt4PSxWnuD+BQz9BSZ5HtJ0P4MwM5MJxC0GK7hAwddNQl aWmga58JhS5dXxpfCdGfs3UBEq3uaQM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-548-3m3aY8iFOS6hCre_QSmiqw-1; Mon, 09 Jan 2023 05:34:43 -0500 X-MC-Unique: 3m3aY8iFOS6hCre_QSmiqw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4E40487A9E2; Mon, 9 Jan 2023 10:34:43 +0000 (UTC) Received: from dmarchan.redhat.com (ovpn-193-12.brq.redhat.com [10.40.193.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BE9D492B00; Mon, 9 Jan 2023 10:34:42 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Kai Ji , Ciara Power , Fan Zhang Subject: [PATCH] crypto/qat: fix build for generic x86 with GCC 12 Date: Mon, 9 Jan 2023 11:34:36 +0100 Message-Id: <20230109103436.996994-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Similar to commit 04361fe2aca8 ("crypto/qat: fix build with GCC 12"). The issue appears when building with the "generic" target we have in devtools/test-meson-builds.sh. Fixes: 3227bc7138f5 ("crypto/qat: use intel-ipsec-mb for partial hash and AES") Cc: stable@dpdk.org Signed-off-by: David Marchand Tested-by: Bruce Richardson --- drivers/crypto/qat/qat_sym_session.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 0ebc66f89e..84e998fb3f 100644 --- a/drivers/crypto/qat/qat_sym_session.c +++ b/drivers/crypto/qat/qat_sym_session.c @@ -1331,6 +1331,8 @@ static int qat_sym_do_precomputes_ipsec_mb(enum icp_qat_hw_auth_algo hash_alg, /* init ipad and opad from key and xor with fixed values */ memset(ipad, 0, block_size); memset(opad, 0, block_size); + 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);