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 588B5455AD for ; Mon, 15 Jul 2024 17:27:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5157740A73; Mon, 15 Jul 2024 17:27:50 +0200 (CEST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by mails.dpdk.org (Postfix) with ESMTP id 6601140A82 for ; Mon, 15 Jul 2024 17:27:49 +0200 (CEST) Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-52ea5dc3c79so6234597e87.1 for ; Mon, 15 Jul 2024 08:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057269; x=1721662069; 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=HZFyZloFpjvYE0lCAvZ8PDgn0fsnK1LHKH6p1GFevQQ=; b=EOPKdYEKhOUCDkVV+nTaI9OdbXIcxCyRwrvnx3kL/s2bSVuH5yjmkCEZMC48a5lK8D zIigsNv/1I8Y0Bckbkk7gMXPYJr3FTFXW6j+Vq+9vrRljhkeHNu276E9HS7OTHMSRM4K 45hazMZqC2CG8MmAW2DxQSm4Bn+zZKGs64LkzLoaUTx8LDT0N7GCgilCkaDjHqVJi+8C lCRb0svFRfsfA16oxVMOYaUJ5Rs5qLHH2D81j766WpbQsgqLV9XVT4xs121VuZ4x0YpB bXv0AGUiiTsaVNfC7q3eKGHeQJlzritFENIQpLp712/AWF1YGeOUOOFX/kY+xa9E2eby O4sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057269; x=1721662069; 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=HZFyZloFpjvYE0lCAvZ8PDgn0fsnK1LHKH6p1GFevQQ=; b=ZJDQ6J5g499N3DOegFwwegHKJ8Kj5fvNZDYE+GNEqZPNt67IJffxbtYTy3+ywQmhRm gkGvTorGeALNJL6+9yhwDQ/EnrAtWCX87JUjjXkASRoBwq/YzQVgg1fuI1jQZmfFUecB gY+qeEZEwgvbHqWCYFvl4H4DA1bEqSVRXqG64POs5myeKaU5XFjpd+2xD16aT4OkVR4T zNHUuved6seH/yCpNpUUb1pXtcW2Y9RVQnRxewqmtlx0A1pLzTYqJ0c0yvtOmc7t9eE2 4EZiXBVEouJHIm0JRQSsezgfbami5XqpvyMcljspw1Q9oUNGt30Nqg8kzIT1T6Nkm53Q AreA== X-Forwarded-Encrypted: i=1; AJvYcCWXBhcFjvPAVlJB3PI7IFnV9tYsQOkkAj5y9KWNDAo0twLqPkn0yEUOO2tQr1EyyZ8Izuu/EEA2YnJxDk9qVAA= X-Gm-Message-State: AOJu0YwED5WpOeTMZwjXyXKYdJKXimuCjVIbIa1g8OTyjy0xcuwEN1uf iCoGqdFk4UKtin13zaLwdNKh2sh2Kg376+3UM27VoXlHiqbN7OuidATB/4U0 X-Google-Smtp-Source: AGHT+IEDBSsy2LgtDIrifAIn5MathaFno+kkP9t7qvbrXj27KixSUsJIYw16PrXfRjnlM2XgSD5a0Q== X-Received: by 2002:a05:6512:39c5:b0:52c:a465:c61f with SMTP id 2adb3069b0e04-52eb99d6e56mr13096830e87.56.1721057268777; Mon, 15 Jul 2024 08:27:48 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dabef9asm6712473f8f.39.2024.07.15.08.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:27:48 -0700 (PDT) From: luca.boccassi@gmail.com To: Ganapati Kundapura Cc: Akhil Goyal , dpdk stable Subject: patch 'cryptodev: validate crypto callbacks from next node' has been queued to stable release 22.11.6 Date: Mon, 15 Jul 2024 16:25:53 +0100 Message-Id: <20240715152704.2229503-15-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com> References: <20240624235907.885628-81-luca.boccassi@gmail.com> <20240715152704.2229503-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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/17/24. 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/3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5 Thanks. Luca Boccassi --- >From 3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5 Mon Sep 17 00:00:00 2001 From: Ganapati Kundapura Date: Thu, 27 Jun 2024 05:06:26 -0500 Subject: [PATCH] cryptodev: validate crypto callbacks from next node [ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ] Crypto callbacks are invoked on checking from head node which is always valid pointer. This patch checks next node from the head node if callbacks registered before invoking callbacks. Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks") Signed-off-by: Ganapati Kundapura Acked-by: Akhil Goyal --- lib/cryptodev/rte_cryptodev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h index f955d96e23..cef9f2b3cb 100644 --- a/lib/cryptodev/rte_cryptodev.h +++ b/lib/cryptodev/rte_cryptodev.h @@ -1851,7 +1851,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, nb_ops = fp_ops->dequeue_burst(qp, ops, nb_ops); #ifdef RTE_CRYPTO_CALLBACKS - if (unlikely(fp_ops->qp.deq_cb != NULL)) { + if (unlikely(fp_ops->qp.deq_cb[qp_id].next != NULL)) { struct rte_cryptodev_cb_rcu *list; struct rte_cryptodev_cb *cb; @@ -1918,7 +1918,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, fp_ops = &rte_crypto_fp_ops[dev_id]; qp = fp_ops->qp.data[qp_id]; #ifdef RTE_CRYPTO_CALLBACKS - if (unlikely(fp_ops->qp.enq_cb != NULL)) { + if (unlikely(fp_ops->qp.enq_cb[qp_id].next != NULL)) { struct rte_cryptodev_cb_rcu *list; struct rte_cryptodev_cb *cb; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-15 16:19:35.572331136 +0100 +++ 0015-cryptodev-validate-crypto-callbacks-from-next-node.patch 2024-07-15 16:19:34.472204413 +0100 @@ -1 +1 @@ -From e858d0c9612211ba43d6703cb7834697214a3fe1 Mon Sep 17 00:00:00 2001 +From 3d19e7d9eb6ee856cbd2f1e362056d80ef6151b5 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e858d0c9612211ba43d6703cb7834697214a3fe1 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index c946f747fc..bec947f6d5 100644 +index f955d96e23..cef9f2b3cb 100644 @@ -25 +26 @@ -@@ -1910,7 +1910,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, +@@ -1851,7 +1851,7 @@ rte_cryptodev_dequeue_burst(uint8_t dev_id, uint16_t qp_id, @@ -34 +35 @@ -@@ -1977,7 +1977,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id, +@@ -1918,7 +1918,7 @@ rte_cryptodev_enqueue_burst(uint8_t dev_id, uint16_t qp_id,