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 355EF468E4 for ; Thu, 12 Jun 2025 23:08:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30D0342E3A; Thu, 12 Jun 2025 23:08:22 +0200 (CEST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id 14FF542E4B for ; Thu, 12 Jun 2025 23:08:21 +0200 (CEST) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-450ccda1a6eso12628495e9.2 for ; Thu, 12 Jun 2025 14:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1749762501; x=1750367301; 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=+SPk5qGtlLV0n4T/4YqkIMN6xuqFkt+kOQp4lljNkuU=; b=llg5j7O8WHVOT0QoOAU/RKJ8LNXXTZjSmnqB9Pj68iU2WMqRpJgURtSu4ox6+4ehzu IEnTTJqJOGgPExAQ7hC1ItKf8oEco96Hm+bT374LLIMcpshZJancGX9f+l2DvpBmBX7s JQc9z0dftRYhWLGJM61s0b8lmjRnp4udU4U+sWpPQFAK9yjFvRzVcYE8GJnFaaTiY8pf kQEhdzLxpE3L2f3qOi6Qr3od+21bCQWjbQL21Q0Ig/yWjEYqk+VZF5HzxN7jRewW1I77 KCgyuApnGlU4OXVRF5jqaDooh4ELaWfad58w3GM176zxFXcSjEVbCkaR7FgFh64kxvSp aIlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749762501; x=1750367301; 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=+SPk5qGtlLV0n4T/4YqkIMN6xuqFkt+kOQp4lljNkuU=; b=bw4dMPsFV8MlKH5Oyx4LbzEkibcx0oZG+QbZhBMG8OzI77cvRtaclUeXvUtkzDQVL1 UrvVVmdwyJEaSs1zjOgIQOCoacIhKBxPNPFvDESfhitczoC/CiwY95FQ2Ssbqt6dWLmc fFPAKKmGyX/STyOAn0QTWxwWW5uBu49Wjl9TJK1zpTBidkhejvlAQ8xoKZ7Z19lPZC0E I3AIpBh30BS6su9YNw96kZe0BfJle8SmgjU+ahWmfebi5CqoumkjvqbLe16FxIH9gXSl nm626ciGTJLyTZxGdNHDsuJDaSSBqnyXXzMxroY0o0nZz0bK/LZQhkw3vOGMzgVhoWcO RwhQ== X-Forwarded-Encrypted: i=1; AJvYcCWJc1HH+dNUbizInBY7m43jIxl5EyzYqJNB6/TB1DFeJ7wD2qM/LXzssSZN9jbUYaBVWfIrZXk=@dpdk.org X-Gm-Message-State: AOJu0YycjbKesM88C3onNa94pjRcTvS1OiCqErs85sHri3ylTjGcrIfi 6es82akkISH6gEImv7NyEV4n7UfrZbu7kjF1vZZFaYNrpt9l77hcqAEaOli3UkT4 X-Gm-Gg: ASbGncvR5qG/X12JDB7f4oUirOuyVJ4LwC3BRcjV3D9+4F+YbpTOuVZ/fqHu+UbWbb8 epd84NkmOr7GLTdnyfFDefIkh9e4Otw7jSnB+QVXDMiJvmBXcTW1IEgTiggVG+eBvw17vLlOgQz 5XKhmjNpjPehMMd4Tf36ojglZ/aoZDSSeLHsxEzsVw6ri8XLmTFeTwYTHPgJlQwbLkRfoNl3Ea/ 5wKBdL76NgOBpw/hOOTjQCwlPfRmPI3ogdGOrtNgkWPH+5JXOO70wJRiB97ZUN+lgwgRZconNbX uJ1LA9zOiPGqgJvbeAnPgQK51ESABGz+08r48OgGMQe6w0KoZS0/im98K7pAO0t7Pa2y X-Google-Smtp-Source: AGHT+IHnuUqZ1EIGoXYIeboqBnNYCxqNDu1/DEScJ38Eq4IZLLcXaAWBbBwA/J/1i5VtadGVaXtvsw== X-Received: by 2002:a05:600c:1c12:b0:439:9424:1b70 with SMTP id 5b1f17b1804b1-45334b5ae3cmr5236935e9.30.1749762500542; Thu, 12 Jun 2025 14:08:20 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:f2df:571a:ae4c:bef2]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4531fe8526bsm55890845e9.0.2025.06.12.14.08.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Jun 2025 14:08:19 -0700 (PDT) From: luca.boccassi@gmail.com To: Rajesh Mudimadugula Cc: Akhil Goyal , dpdk stable Subject: patch 'crypto/virtio: fix cipher data source length' has been queued to stable release 22.11.9 Date: Thu, 12 Jun 2025 22:06:32 +0100 Message-ID: <20250612210733.2506558-15-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-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/c468e5df1c05e5923ec00aa8f9fb447df4afd959 Thanks. Luca Boccassi --- >From c468e5df1c05e5923ec00aa8f9fb447df4afd959 Mon Sep 17 00:00:00 2001 From: Rajesh Mudimadugula Date: Thu, 3 Apr 2025 12:26:03 +0000 Subject: [PATCH] crypto/virtio: fix cipher data source length [ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ] In symmetric algorithm chaining, we need to consider both cipher and auth data length for cipher source. Fixes: 82adb12a1fce ("crypto/virtio: support burst enqueue/dequeue") Signed-off-by: Rajesh Mudimadugula Acked-by: Akhil Goyal --- drivers/crypto/virtio/virtio_rxtx.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/virtio/virtio_rxtx.c b/drivers/crypto/virtio/virtio_rxtx.c index d02486661f..01977c7ec4 100644 --- a/drivers/crypto/virtio/virtio_rxtx.c +++ b/drivers/crypto/virtio/virtio_rxtx.c @@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange( req_data->u.sym_req.u.chain.para.aad_len = session->aad.length; req_data->u.sym_req.u.chain.para.src_data_len = - (sym_op->cipher.data.length + - sym_op->cipher.data.offset); + RTE_MAX((sym_op->cipher.data.length + + sym_op->cipher.data.offset), + (sym_op->auth.data.length + + sym_op->auth.data.offset)); req_data->u.sym_req.u.chain.para.dst_data_len = req_data->u.sym_req.u.chain.para.src_data_len; req_data->u.sym_req.u.chain.para.cipher_start_src_offset = @@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit( uint32_t hash_result_len = 0; struct virtio_crypto_op_cookie *crypto_op_cookie; struct virtio_crypto_alg_chain_session_para *para; + uint32_t src_len; if (unlikely(sym_op->m_src->nb_segs != 1)) return -EMSGSIZE; @@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit( desc[idx++].flags = VRING_DESC_F_NEXT; } + src_len = RTE_MAX((sym_op->cipher.data.offset + + sym_op->cipher.data.length), + (sym_op->auth.data.length + + sym_op->auth.data.offset)); /* indirect vring: src data */ desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0); - desc[idx].len = (sym_op->cipher.data.offset - + sym_op->cipher.data.length); + desc[idx].len = src_len; desc[idx++].flags = VRING_DESC_F_NEXT; /* indirect vring: dst data */ if (sym_op->m_dst) { desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_dst, 0); - desc[idx].len = (sym_op->cipher.data.offset - + sym_op->cipher.data.length); + desc[idx].len = src_len; } else { desc[idx].addr = rte_pktmbuf_iova_offset(sym_op->m_src, 0); - desc[idx].len = (sym_op->cipher.data.offset - + sym_op->cipher.data.length); + desc[idx].len = src_len; } desc[idx++].flags = VRING_DESC_F_WRITE | VRING_DESC_F_NEXT; -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-12 22:06:24.457060847 +0100 +++ 0015-crypto-virtio-fix-cipher-data-source-length.patch 2025-06-12 22:06:23.806043286 +0100 @@ -1 +1 @@ -From fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 Mon Sep 17 00:00:00 2001 +From c468e5df1c05e5923ec00aa8f9fb447df4afd959 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fcb4d1f48e4aecb6be4ef7a4f6f25df24fee0ea2 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 0cc904485c..a7f1bd9753 100644 +index d02486661f..01977c7ec4 100644 @@ -22 +23 @@ -@@ -243,8 +243,10 @@ virtqueue_crypto_sym_pkt_header_arrange( +@@ -157,8 +157,10 @@ virtqueue_crypto_sym_pkt_header_arrange( @@ -35 +36 @@ -@@ -298,6 +300,7 @@ virtqueue_crypto_sym_enqueue_xmit_split( +@@ -212,6 +214,7 @@ virtqueue_crypto_sym_enqueue_xmit( @@ -43 +44 @@ -@@ -371,21 +374,22 @@ virtqueue_crypto_sym_enqueue_xmit_split( +@@ -285,21 +288,22 @@ virtqueue_crypto_sym_enqueue_xmit(