Linux virtualization list
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Weimin Xiong <xiongwm2026@163.com>
Cc: Jean-Philippe Brucker <jpb@kernel.org>,
	Joerg Roedel <joro@8bytes.org>,
	Xiong Weimin <xiongweimin@kylinos.cn>,
	Robin Murphy <robin.murphy@arm.com>,
	virtualization@lists.linux.dev, iommu@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] iommu/virtio: Reject short event buffers
Date: Thu, 23 Jul 2026 12:44:45 +0100	[thread overview]
Message-ID: <amH-rdeANAtyXhDi@willie-the-truck> (raw)
In-Reply-To: <20260723095103.1-xiongweimin@kylinos.cn>

On Thu, Jul 23, 2026 at 09:54:09AM +0800, Weimin Xiong wrote:
> From: Xiong Weimin <xiongweimin@kylinos.cn>
> 
> From: Xiong Weimin <xiongweimin@kylinos.cn>
> 
> viommu_event_handler() only rejects event buffers that are larger than
> struct viommu_event. A short buffer is also invalid, but the handler
> would still read evt->head and, for fault events, the rest of evt->fault.
> 
> Require the used length to match the event buffer size before looking at
> the event contents.
> 
> Signed-off-by: Xiong Weimin <xiongweimin@kylinos.cn>
> ---
>  drivers/iommu/virtio-iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I don't know why you keep sending this without first responding to the
feedback you already received:

https://lore.kernel.org/all/20260709095518.GA1752964@myrica/

Will

      reply	other threads:[~2026-07-23 11:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  1:21 [PATCH] iommu/virtio: Set driver data before enabling virtqueues Weimin Xiong
2026-07-16  1:21 ` [PATCH] iommu/virtio: Handle iommu_device_register() failures Weimin Xiong
2026-07-22 21:42   ` Will Deacon
2026-07-23  1:54   ` [PATCH v2 0/3] iommu/virtio: Probe error handling and event buffer validation Weimin Xiong
2026-07-23  1:54   ` [PATCH v2 1/3] iommu/virtio: Set driver data before enabling virtqueues Weimin Xiong
2026-07-23  1:54   ` [PATCH v2 2/3] iommu/virtio: Handle iommu_device_register() failures Weimin Xiong
2026-07-23  1:54   ` [PATCH v2 3/3] iommu/virtio: Reject short event buffers Weimin Xiong
2026-07-23 11:44     ` Will Deacon [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=amH-rdeANAtyXhDi@willie-the-truck \
    --to=will@kernel.org \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=jpb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xiongweimin@kylinos.cn \
    --cc=xiongwm2026@163.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox