Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Seojin An" <love09010224@uos.ac.kr>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v2] drm/virtio: bound execbuffer commands to control queue size
Date: Thu, 26 Nov 2026 14:47:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-235738@kernel.org> (raw)
In-Reply-To: <20261126143800.3493685-1-love09010224@uos.ac.kr>

> DRM_IOCTL_VIRTGPU_EXECBUFFER accepts a user-controlled command size and
> copies the command with vmemdup_user(). For a vmalloc-backed command,
> virtio-gpu maps each page to one SG entry, then adds a request and response
> entry before submitting the chain to the control virtqueue.
> 
> With indirect descriptors negotiated, the driver accounts for the chain as
> one free ring descriptor. An unprivileged render client can therefore
> submit more SG entries than the device Queue Size. A sufficiently large
> split-ring command wraps the indirect table's u16 next index. The device
> then consumes a chain different from the one constructed by the driver.
> 
> Reject command sizes whose vmalloc page count plus the fixed request and
> response exceeds the actual control Queue Size. This execbuffer check does
> not depend on the ring layout and applies to both split and packed
> virtqueues. The driver creates one command SG entry per page even when
> [ ... ]
> Link: https://lore.kernel.org/all/20261126080044.2898223-1-love09010224@uos.ac.kr/
> Suggested-by: Hyeonjun Hong <hyeonjunhong330@gmail.com>
> Suggested-by: GEONWOO HAN <gunwoo9643@uos.ac.kr>
> Cc: stable@vger.kernel.org
> Signed-off-by: Seojin An <love09010224@uos.ac.kr>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261126143800.3493685-1-love09010224@uos.ac.kr?part=1

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  8:00 [PATCH] drm/virtio: bound execbuffer commands to control queue size Seojin An
2026-11-26  8:22 ` sashiko-bot
2026-11-26 14:38   ` [PATCH v2] " Seojin An
2026-11-26 14:47     ` 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-235738@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=love09010224@uos.ac.kr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox