From: sashiko-bot@kernel.org
To: "Hengyu Liang" <hengyul@cs.unc.edu>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v2] vhost/net: ignore extra words in VHOST_SET_FEATURES_ARRAY
Date: Mon, 23 Nov 2026 04:37:20 +0000 [thread overview]
Message-ID: <sashiko-outbox-228664@kernel.org> (raw)
In-Reply-To: <20261123042259.3484334-1-hengyul@cs.unc.edu>
> Commit 333c515d1896 ("vhost-net: allow configuring extended features")
> added VHOST_SET_FEATURES_ARRAY. The ioctl reads the number of feature
> words from user space, copies the words it supports, and then reads
> every remaining word, one at a time, to check that it is zero.
>
> That loop has no upper bound and no scheduling point. A caller can pass
> a count of U64_MAX and a pointer into a large zero-filled mapping. The
> ioctl then stays in the kernel for as long as the mapping is readable,
> and a fatal signal is not handled until it ends. On a v6.18 debug kernel
> booted with preempt=none, two such calls from a non-root user, each on a
> 4 GiB mapping, froze a 2-CPU VM for 56 s with soft lockup reports.
>
> The check is not needed: the extra words can only hold features that
> this kernel does not know about, and they are never stored. Drop the
> loop and ignore them. A nonzero extra word is now ignored instead of
> failing with EOPNOTSUPP. Unsupported bits in the words the kernel knows
> still fail with EOPNOTSUPP.
>
> Fixes: 333c515d1896 ("vhost-net: allow configuring extended features")
> Cc: stable@vger.kernel.org # v6.17+
> Suggested-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Hengyu Liang <hengyul@cs.unc.edu>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123042259.3484334-1-hengyul@cs.unc.edu?part=1
prev parent reply other threads:[~2026-11-23 4:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 4:22 [PATCH v2] vhost/net: ignore extra words in VHOST_SET_FEATURES_ARRAY Hengyu Liang
2026-11-23 4:37 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-228664@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=hengyul@cs.unc.edu \
--cc=mst@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.