All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Seojin An <love09010224@uos.ac.kr>
Cc: Eugenio Perez Martin <eperezma@redhat.com>,
	Jason Wang <jasowangio@gmail.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	virtualization@lists.linux.dev, security@kernel.org
Subject: Re: [PATCH] virtio_ring: reject unrepresentable split indirect tables
Date: Thu, 26 Nov 2026 06:36:30 -0500	[thread overview]
Message-ID: <20261126063555-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20261126112410.3485471-1-love09010224@uos.ac.kr>

On Thu, Nov 26, 2026 at 08:24:10PM +0900, Seojin An wrote:
> Thanks. Before I post v2, I want to confirm how broadly the core should
> enforce this.
> 
> One option is a common check that rejects total_sg greater than Queue Size
> for both split and packed queues. That would catch cases where a driver misses
> the check, but it may also reject requests that existing drivers issue today.
> 
> The other option is the narrower split representation guard from my v1. My
> original check used total_sg > 65536, but it needs to reject exactly 65536 as
> well. At that count the split cleanup cursor wraps to zero, so a failure while
> mapping the indirect table leaves the data SG mappings behind. Packed
> indirect tables do not use that cursor.
> 
> If you have a different core-side approach in mind, please let me know.
> 
> The current virtio-gpu v2 draft enforces Queue Size in the driver
> independently. For the core, would you prefer the common split-and-packed
> Queue-Size check, the narrow split guard, or no core change for now? Once
> that is clear, I will post the corresponding core v2.

Let's go with no core change for now.

-- 
MST


  reply	other threads:[~2026-11-26 11:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  8:02 [PATCH] virtio_ring: reject unrepresentable split indirect tables Seojin An
2026-11-26  8:10 ` sashiko-bot
2026-11-26  8:14 ` Eugenio Perez Martin
2026-11-26  8:24   ` Michael S. Tsirkin
2026-11-26  8:41     ` Eugenio Perez Martin
2026-11-26 11:24       ` Seojin An
2026-11-26 11:36         ` Michael S. Tsirkin [this message]
2026-11-26 11:28       ` Michael S. Tsirkin
2026-11-30  8:51         ` Eugenio Perez Martin
2026-11-30 11:55           ` Michael S. Tsirkin
2026-11-26  8:22 ` Michael S. Tsirkin

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=20261126063555-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=jasowangio@gmail.com \
    --cc=love09010224@uos.ac.kr \
    --cc=security@kernel.org \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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.