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 5B3F9A034F for ; Wed, 10 Nov 2021 11:54:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2374140683; Wed, 10 Nov 2021 11:54:48 +0100 (CET) Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com [209.85.221.175]) by mails.dpdk.org (Postfix) with ESMTP id 072FE40683 for ; Wed, 10 Nov 2021 11:54:46 +0100 (CET) Received: by mail-vk1-f175.google.com with SMTP id e64so1112127vke.4 for ; Wed, 10 Nov 2021 02:54:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ELEQNq5VVArvMnIFicdQHDfk5jsnFGHZmJmvqzuVsGQ=; b=rb1uv6yX6Qq5+yMGfNpU002xaPBi6tAp0hNH1LXmo/Ur1CiC6XLrYz8HNiSVyCDqIC J9ffWVgQXwP3WVKJ6/c3itdsCNI2ZBVsKVkITKFMLsn3LYL/V0+GzZKJWWwfLzk8woJx FeY485+Itk38E8xwG3tZuRqSoveig9P8ss9U09bMDhDs61uNYbsa7bjSVjEErQOzYBQT YTeQlANFuBMms4s8VfB5BR0XGy74E32rrMlUannIDxB3nFOnzOjqPfFRYkKTj+pqW4xJ mji3NfnLHSAV6wiBNMRKJc76Icz6fyG7SLQKTeiIlT7zbhqL/1VuPCgh0WD7JBAMcFle bgbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ELEQNq5VVArvMnIFicdQHDfk5jsnFGHZmJmvqzuVsGQ=; b=b+KHuP0kOJJSCPd5GOVbHFqk/de9nM6uPk2GXXJJsU9dUY9/NA/Ul0iaG+LZfn9VMK qVRM8AyExy6xsDfmrMZq/HV/JwnN05io/rlaVeutmAIZOOe2htkEUr2ZzNDiBtaJxYYu MsQ+jGOrJAycoC3eUp00nj7fb6NrQMjctJwrMQAmMeJY1h3xYRYw1IPf0pb9lK31r+WH MOcsZbW8Guga8MAlDDrZUtG0oH9IYKEgwjQTemDlmLkjNHVVwc3et0RKFGQeOrbBusi7 6tHIkkn7t0iw94AhYeQtpygPKU6swdTYItWCcH1jMMQGEaDOHPJsor9UnSWlMHujPLeu rILw== X-Gm-Message-State: AOAM5319dfxgh8UpG0PcNQNOkJ9TtVXdCKPl25nXh797IzVVVgM10lwL 3/wh4t1ko0xYff5np8kl1IJfqKrl/GE9vWo8TOFwWw== X-Google-Smtp-Source: ABdhPJzGNC52uzuS66t3jI+uvAEKdqcVfmORzLaKpCpwShACTL7Af0yE4R+t+ZocPDUMH5hAgxcU+4HvkBSaPiJSqy8= X-Received: by 2002:ac5:c55a:: with SMTP id d26mr56729119vkl.25.1636541686350; Wed, 10 Nov 2021 02:54:46 -0800 (PST) MIME-Version: 1.0 References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211110063216.2744012-181-xuemingl@nvidia.com> In-Reply-To: <20211110063216.2744012-181-xuemingl@nvidia.com> From: Li Feng Date: Wed, 10 Nov 2021 18:54:35 +0800 Message-ID: To: Xueming Li Cc: Luca Boccassi , Maxime Coquelin , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] patch 'vhost: add sanity check on inflight last index' has been queued to stable release 20.11.4 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 Sender: "stable" Looks good. On Wed, Nov 10, 2021 at 2:52 PM Xueming Li wrote: > > Hi, > > FYI, your patch has been queued to stable release 20.11.4 > > Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. > It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk > > This queued commit can be viewed at: > https://github.com/steevenlee/dpdk/commit/022ab64a482d3e7a8627446d4acd52cfd084dd7d > > Thanks. > > Xueming Li > > --- > From 022ab64a482d3e7a8627446d4acd52cfd084dd7d 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 > Cc: Xueming Li > > [ 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 b97dcf6b69..1a7c240492 100644 > --- a/lib/librte_vhost/vhost.c > +++ b/lib/librte_vhost/vhost.c > @@ -1191,6 +1191,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.33.0 > > --- > Diff of the applied patch vs upstream commit (please double-check if non-empty: > --- > --- - 2021-11-10 14:17:09.922847297 +0800 > +++ 0180-vhost-add-sanity-check-on-inflight-last-index.patch 2021-11-10 14:17:01.990745109 +0800 > @@ -1 +1 @@ > -From 5a4fbe79e6d124141bd0a820c897287b15c559c4 Mon Sep 17 00:00:00 2001 > +From 022ab64a482d3e7a8627446d4acd52cfd084dd7d Mon Sep 17 00:00:00 2001 > @@ -4,0 +5,3 @@ > +Cc: Xueming Li > + > +[ upstream commit 5a4fbe79e6d124141bd0a820c897287b15c559c4 ] > @@ -10 +12,0 @@ > -Cc: stable@dpdk.org > @@ -15 +17 @@ > - lib/vhost/vhost.c | 3 +++ > + lib/librte_vhost/vhost.c | 3 +++ > @@ -18,5 +20,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 b97dcf6b69..1a7c240492 100644 > +--- a/lib/librte_vhost/vhost.c > ++++ b/lib/librte_vhost/vhost.c > +@@ -1191,6 +1191,9 @@ rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,