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 F031CA0540 for ; Thu, 7 Jul 2022 09:58:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC41D42829; Thu, 7 Jul 2022 09:58:51 +0200 (CEST) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id DD95B40DDE for ; Thu, 7 Jul 2022 09:58:50 +0200 (CEST) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (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-internal-0.canonical.com (Postfix) with ESMTPS id AE5FD3FD8F for ; Thu, 7 Jul 2022 07:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180730; bh=8/UZ75n+HUAle+NEvJMKMnRiaV9Fm0Xn20yf9D3MSOc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=f7/vDM3uQW/DUFB3TtIqBFKZUkCMYcc09dmAeag8752yqHCtv817bDRMfWQ8cBYSk 74e5tF51mtjrUDyoJw6fb8Tr1MWJcNRYNgMZ9xMkzQ70t8eCaU5CeocunbK2RA+Ryh 5C80oYL+Gozc4QKJHok0bXnn+SOiLncwPdwhiNPmth7vtYYGR+15pO3jf3b/RnMmhS 6JOP73E5K0lAR1hUS3CrtmBq/hZD1dQXrTLrqMPxdrahMj2LZoy7yZ+z/tRfWpvaG6 tZ2Bhszk6Ikjlb87aBBm/X7HvgF6yotWHi5867TAAw+dGRsZWQi0qno5lpo78S87/m uLxwfg06p5Djg== Received: by mail-ej1-f72.google.com with SMTP id sd14-20020a1709076e0e00b0072a7c5a08f4so4465729ejc.21 for ; Thu, 07 Jul 2022 00:58:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8/UZ75n+HUAle+NEvJMKMnRiaV9Fm0Xn20yf9D3MSOc=; b=jPpVo3r7+SvvIl86hnXBvPknnk9XRIszNluKkD0x3OAaEdrXVmp87aIgEfMvCEsNeM RvLg0vk6tgRJncTLGyMp4aG9fpCKIXKOecffX2eD01ahZBEheymClSxNsXVPfw+x2HJm Ix/Lbo4jbmVA58kxp4HYinS2S/ewUErXi0rp0Q9hqDB+ELo3OFAmTbH8Tug1GvPT0818 yVVk9AACcTRqDbLaMYh9UR87ieRA0colcfeHIsGDXgM5u0nq66MsF8U7URFpuPaJNo66 wG2e0kucaVxTiwrsBJZLkmfNzrQGzvcqxhb6Ocp7A28zMC19w3V5Kess6PkMPCInzTYB RWuw== X-Gm-Message-State: AJIora/KeTpppOGHQY3oGLcGfXXHNEUbCnHAysKNO7EF+KVoXT6lWGj6 6Aqg3w8g5oTfaFlREZc/lVmU0KXxrOcPXDgW8JJccLtuGf7joSjPoaeuyt27uPZnKT24cTpQjp2 6RMw8+94V7ADp1Rt2VKqm6cOK X-Received: by 2002:a05:6402:42c8:b0:435:b99c:35f9 with SMTP id i8-20020a05640242c800b00435b99c35f9mr61408782edc.137.1657180730109; Thu, 07 Jul 2022 00:58:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sP8lbEhUaw76yMF47KSV/le5VIJ8OPJPzGY5BeZXoYpdY+Ub98Jii1R3YBwPxzec14FKx12g== X-Received: by 2002:a05:6402:42c8:b0:435:b99c:35f9 with SMTP id i8-20020a05640242c800b00435b99c35f9mr61408760edc.137.1657180729895; Thu, 07 Jul 2022 00:58:49 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id t12-20020a50d70c000000b0043590660f16sm28173064edi.35.2022.07.07.00.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:58:49 -0700 (PDT) From: christian.ehrhardt@canonical.com To: David Marchand Cc: Jakub Poczatek , Maxime Coquelin , Fan Zhang , dpdk stable Subject: patch 'vhost/crypto: fix descriptor processing' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:55:03 +0200 Message-Id: <20220707075522.194223-68-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.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 19.11.13 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/09/22. 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/05166062e73463e7e30ab36ded00e7bc86b81312 Thanks. Christian Ehrhardt --- >From 05166062e73463e7e30ab36ded00e7bc86b81312 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Wed, 22 Jun 2022 17:30:20 +0200 Subject: [PATCH] vhost/crypto: fix descriptor processing [ upstream commit 2fbada91545c004f04449500af0c6276900317ab ] copy_data was returning a pointer to an increased (off by one) descriptor. Subsequent calls to copy_data in the library were then failing. Fix this by incrementing the descriptor only if there is some left data to copy. Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12") Reported-by: Jakub Poczatek Signed-off-by: David Marchand Reviewed-by: Maxime Coquelin Tested-by: Jakub Poczatek Acked-by: Fan Zhang --- lib/librte_vhost/vhost_crypto.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index b8bdfe4bc7..4f91715c33 100644 --- a/lib/librte_vhost/vhost_crypto.c +++ b/lib/librte_vhost/vhost_crypto.c @@ -611,8 +611,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req, return -1; left -= copied; data = RTE_PTR_ADD(data, copied); - desc++; - } while (desc < head + max_n_descs && left != 0); + } while (left != 0 && ++desc < head + max_n_descs); if (unlikely(left != 0)) return -1; -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.975432505 +0200 +++ 0068-vhost-crypto-fix-descriptor-processing.patch 2022-07-07 09:54:10.981824716 +0200 @@ -1 +1 @@ -From 2fbada91545c004f04449500af0c6276900317ab Mon Sep 17 00:00:00 2001 +From 05166062e73463e7e30ab36ded00e7bc86b81312 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ - lib/vhost/vhost_crypto.c | 3 +-- + lib/librte_vhost/vhost_crypto.c | 3 +-- @@ -23,5 +24,5 @@ -diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c -index 96ffb82a5d..54946f46d9 100644 ---- a/lib/vhost/vhost_crypto.c -+++ b/lib/vhost/vhost_crypto.c -@@ -610,8 +610,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req, +diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c +index b8bdfe4bc7..4f91715c33 100644 +--- a/lib/librte_vhost/vhost_crypto.c ++++ b/lib/librte_vhost/vhost_crypto.c +@@ -611,8 +611,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,