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 257D1468E4 for ; Thu, 12 Jun 2025 23:10:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20B0C42E0C; Thu, 12 Jun 2025 23:10:39 +0200 (CEST) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mails.dpdk.org (Postfix) with ESMTP id 7D4F642E0C for ; Thu, 12 Jun 2025 23:10:36 +0200 (CEST) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3a5096158dcso1258924f8f.1 for ; Thu, 12 Jun 2025 14:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749762636; x=1750367436; 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=x9kjiDbnSzYbd3XJ1OJ1wk31rccHVcjr8GUiHnxT5ZM=; b=JMKUMWxlboeFsCiMY20Vgk1PX23q3wQqqXnN1TmySjuN5DlWypjJRQP8foBFKqxBSX GH+PEe0qHCwFC8RwWqVywIFV0EbwCcalmiz7xcQy7W6KU0AQeZ82mOdolQjgciPR1BZo M0OETJNFEN3plk6L+S/GvKVSL9TO4MVO8oHvNa543w0lwt04Pc7e63Q+wlEZAXF6meQM YlLRpXTox9m1os34hNm4irWAqpwrL+XQCfZJXSDAdk94W7wtCoPfprVKzqCLtc0J6mAy QLevC0HohK1ak+YKiQ671WIXJllrD32Po/Ecli5ttp9S2Lg2eK34w4KT6vne8mj/qTi+ xT3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749762636; x=1750367436; 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=x9kjiDbnSzYbd3XJ1OJ1wk31rccHVcjr8GUiHnxT5ZM=; b=ow/7mJN7br5tsC2/Q7vi/1dy4kZx59OU2iigiWieJw8cS21lQR1AhNsDvdAWGh7cyX 8mB/dP05fUZXptTwFQR78lvxbDnQB1wtl0L7OdZGqiWK3kqh4ElyKfhsbiMgwRn2cY7G nzmIvJ3J+e7MBaalEyG+iswBFBC5t3/i4DgVACt/Xiv7C2F4Twgp5pB8Qkqw93eSnI7j y+OPo29673b7OIETCypjABqVNYZx7IQZzl61hi7wSzyEg023l1qbFFGGEd8dPVnxUhJY Hlv027Mgy4LtO/BJgOPMmH3YWRKedf+7GUtNfnm5rNPoLtff19XLq90Wk/fq8wafXTH/ zUhg== X-Gm-Message-State: AOJu0Yz2Fn6bQBVAfM1L22I4sb6SydNVGv6LKI++B7Bjk5ML5nQPzgHW M5YFm4GrzDPMG5CeJEdE2+S6VLvQ6Rj0APHQBm7ogc3v76SGrsTDo51AuEEMCeX1 X-Gm-Gg: ASbGncs7rTMiVroUxqkgFMi+eIshX84tDE6yiC2XqqGAz5MHt69vWhRym+8A6sSMTqu F7ssn+srVGBJUP1dnFLbfz194Wr0MNP6lAbxyDtt1lDRhMUPGsbNO4GzC1exTYHVZZwYOpUILcA Bb+LINs9Z0EELl/yJQjeRI/m7mWsT9m75K0zfJLRFl//HQVa4SM7FYKs6+gxTCS09Yvuhd7Vy4W cavdruU5CdxMghm+8YwqpYPDnlNt0ehL83OghtADOZvmL5rwhWp2MZI67wCPbXyEZD6OJV4pHP6 vOd7UcYzOjjdcz7d12Q9Znf1VtdadyO9vgW9OCXbVUy4XN3c6HXNKfNjoXgT/OBhqXcz7GzxdKq g2NY= X-Google-Smtp-Source: AGHT+IEaCV8KiV+4u2cHNAX+cfggkba2RR80Hi2WxgbXoqCPDha56bLNF6ZkTFmLjZ9dznh9nlbiKw== X-Received: by 2002:a05:6000:2585:b0:3a4:d6ed:8e2e with SMTP id ffacd0b85a97d-3a56876c2aemr487426f8f.41.1749762636011; Thu, 12 Jun 2025 14:10:36 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:f2df:571a:ae4c:bef2]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a568b08c7csm382556f8f.50.2025.06.12.14.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 14:10:35 -0700 (PDT) From: luca.boccassi@gmail.com To: Gagandeep Singh Cc: dpdk stable Subject: patch 'common/dpaax: fix PDCP key command race condition' has been queued to stable release 22.11.9 Date: Thu, 12 Jun 2025 22:07:12 +0100 Message-ID: <20250612210733.2506558-55-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250612210733.2506558-1-luca.boccassi@gmail.com> References: <20250612210733.2506558-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 22.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/14/25. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/dce7e9ed56759203c755ace16c51beb6e200086b Thanks. Luca Boccassi --- >From dce7e9ed56759203c755ace16c51beb6e200086b Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Wed, 21 May 2025 12:26:50 +0530 Subject: [PATCH] common/dpaax: fix PDCP key command race condition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 684faacc0fde7110c31c640669381dbf19f447f8 ] A race condition between loading the key into CAAM’s internal memory and initiating cryptographic operations can cause SEC errors in PDCP AES algorithm combinations. To mitigate this, the CALM instruction is added for the 12-bit SN case, and the older version of the descriptor is used for the 18-bit SN case. Fixes: 6127fff842a7 ("common/dpaax: remove outdated caamflib code") Signed-off-by: Gagandeep Singh --- drivers/common/dpaax/caamflib/desc/pdcp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/common/dpaax/caamflib/desc/pdcp.h b/drivers/common/dpaax/caamflib/desc/pdcp.h index 328b307ae9..4eff326738 100644 --- a/drivers/common/dpaax/caamflib/desc/pdcp.h +++ b/drivers/common/dpaax/caamflib/desc/pdcp.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: BSD-3-Clause or GPL-2.0+ * Copyright 2008-2013 Freescale Semiconductor, Inc. - * Copyright 2019-2022 NXP + * Copyright 2019-2025 NXP */ #ifndef __DESC_PDCP_H__ @@ -1981,8 +1981,7 @@ pdcp_insert_uplane_no_int_op(struct program *p, KEY(p, KEY1, cipherdata->key_enc_flags, cipherdata->key, cipherdata->keylen, INLINE_KEY(cipherdata)); - if ((sn_size == PDCP_SN_SIZE_15) || - (rta_sec_era >= RTA_SEC_ERA_10)) { + if (sn_size == PDCP_SN_SIZE_15) { PROTOCOL(p, dir, OP_PCLID_LTE_PDCP_USER, (uint16_t)cipherdata->algtype); return 0; @@ -2747,6 +2746,7 @@ cnstr_shdsc_pdcp_u_plane_encap(uint32_t *descbuf, (uint64_t)cipherdata->key, cipherdata->keylen, INLINE_KEY(cipherdata)); + JUMP(p, 1, LOCAL_JUMP, ALL_TRUE, CALM); if (authdata) PROTOCOL(p, OP_TYPE_ENCAP_PROTOCOL, OP_PCLID_LTE_PDCP_USER_RN, -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-12 22:06:25.885592917 +0100 +++ 0055-common-dpaax-fix-PDCP-key-command-race-condition.patch 2025-06-12 22:06:23.882044892 +0100 @@ -1 +1 @@ -From 684faacc0fde7110c31c640669381dbf19f447f8 Mon Sep 17 00:00:00 2001 +From dce7e9ed56759203c755ace16c51beb6e200086b Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 684faacc0fde7110c31c640669381dbf19f447f8 ] + @@ -18 +19,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 9ada3905c5..f4379ede2c 100644 +index 328b307ae9..4eff326738 100644 @@ -32 +33 @@ -- * Copyright 2019-2023 NXP +- * Copyright 2019-2022 NXP