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 68D39A0C41 for ; Tue, 30 Nov 2021 17:40:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FE954118F; Tue, 30 Nov 2021 17:40:58 +0100 (CET) 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 3A64841177 for ; Tue, 30 Nov 2021 17:40:57 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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 1BDD13F1ED for ; Tue, 30 Nov 2021 16:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290457; bh=v+FggFpYWMDupcTXXqvA3kN5+Ufy0Q3XyNFyuLqjPns=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XCw4YtmhNHcdEBSzggELCKWxllO9oD9nnxLhhtmMp3Bzw8Xt1m76kGNWTmB5MwkDx +S8uJVkcMEjGuo8MnY8I+GjxqJYe8uSc1fRuOJCf9A2D/KC0GjFk/O3VgP8p9lXHIb +uXezqBqZxoZFBtv0rUG82G6/IqxJjQWT8I4sJ1GCP1lXdkD1pKRCveMn2DGp039LK HmH0DI8RWvZhBEPjZwlm5IzOJQiYzLz/bWIoXRKqq8AuUUn9sOo+XyTjrpLXkTiv3u njs6nOTWX/Vn9jdb7axPtN8qJOJguqEb+wjdIsm84ERlXzB07Us5XacOQe3lWjx7Gh LcfT0IS8zUxdw== Received: by mail-ed1-f70.google.com with SMTP id q17-20020aa7da91000000b003e7c0641b9cso17471865eds.12 for ; Tue, 30 Nov 2021 08:40:57 -0800 (PST) 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=v+FggFpYWMDupcTXXqvA3kN5+Ufy0Q3XyNFyuLqjPns=; b=Pc9/9t0FLoxLdkq9x7b5QrexWUq8apWgQoXr0N7z/ylpa4cRNvUYvVy7RTUGkcfpqG PouE1aRSGqW4WksaRefdzqBEwI7ojQ7l7ge4Eltr0rW+2eHLTINf4nh8Lm/tb17IcTAr W1mk+ibrAiBw76qWbmbjCLUQXIy1LdzRJAcOLnwv2f0/6z7vV7KIccCWwHAwvT7NHOIA HKj2ZQUohNB9XX5YKRVoWmaYBYac5jTUEg+50ZKO+btmMU4vH2uy8Yj8dTA6AnltpRU0 9bUFoX65/gaVxgxvo84Ws3ZKn4DJ3NaMPEum92IdlvEdQOaqXxkicHHQEHnuQwnA8WpY U+uw== X-Gm-Message-State: AOAM5311XOykWS96e5hGjYdqw0+L1WLuSXhUn6KpLUhauXxzjS7YvA3z DJb6qoWbzdzDU+f4IUfsxQ5End1GcExi6CIl1XpQTcW3tHRbdlJ3A36zTkFNg/PKQiOi94wtnjW lrgSWohvdJjWekt7ZYIhZwQeh X-Received: by 2002:a17:906:9b8f:: with SMTP id dd15mr218045ejc.480.1638290456488; Tue, 30 Nov 2021 08:40:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBtutff+/JOUBqHdlSHsXESGsDa3POeoL7iE92nje0/6iNqNs08EazXpsaxlqf6tq+W+pJWA== X-Received: by 2002:a17:906:9b8f:: with SMTP id dd15mr218021ejc.480.1638290456277; Tue, 30 Nov 2021 08:40:56 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id gz26sm9213928ejc.100.2021.11.30.08.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:40:55 -0800 (PST) From: christian.ehrhardt@canonical.com To: Li Feng Cc: Maxime Coquelin , dpdk stable Subject: patch 'vhost: add sanity check on inflight last index' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:57 +0100 Message-Id: <20211130163605.2460997-93-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-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.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/27c4b8065e4c15f816d3fcf93b602f3b9e4c7e24 Thanks. Christian Ehrhardt --- >From 27c4b8065e4c15f816d3fcf93b602f3b9e4c7e24 Mon Sep 17 00:00:00 2001 From: Li Feng Date: Thu, 14 Oct 2021 20:40:08 +0800 Subject: [PATCH] vhost: add sanity check on inflight last index [ upstream commit 5a4fbe79e6d124141bd0a820c897287b15c559c4 ] The index in rte_vhost_set_last_inflight_io_split is from the frontend driver, check if it's in the virtqueue range. Fixes: bb0c2de9602b ("vhost: add APIs to operate inflight ring") Signed-off-by: Li Feng Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c index b876e81dbd..bb86e02d1e 100644 --- a/lib/librte_vhost/vhost.c +++ b/lib/librte_vhost/vhost.c @@ -1174,6 +1174,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx, if (unlikely(!vq->inflight_split)) return -1; + if (unlikely(idx >= vq->size)) + return -1; + vq->inflight_split->last_inflight_io = idx; return 0; } -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:11.312031076 +0100 +++ 0093-vhost-add-sanity-check-on-inflight-last-index.patch 2021-11-30 16:50:05.890874264 +0100 @@ -1 +1 @@ -From 5a4fbe79e6d124141bd0a820c897287b15c559c4 Mon Sep 17 00:00:00 2001 +From 27c4b8065e4c15f816d3fcf93b602f3b9e4c7e24 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5a4fbe79e6d124141bd0a820c897287b15c559c4 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -15 +16 @@ - lib/vhost/vhost.c | 3 +++ + lib/librte_vhost/vhost.c | 3 +++ @@ -18,5 +19,5 @@ -diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c -index 9540522dac..3b674ac320 100644 ---- a/lib/vhost/vhost.c -+++ b/lib/vhost/vhost.c -@@ -1226,6 +1226,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx, +diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c +index b876e81dbd..bb86e02d1e 100644 +--- a/lib/librte_vhost/vhost.c ++++ b/lib/librte_vhost/vhost.c +@@ -1174,6 +1174,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,