Re: [PATCH v2 3/3] iommu/virtio: Reject short event buffers
From: Will Deacon
Date: Thu Jul 23 2026 - 07:46:05 EST
On Thu, Jul 23, 2026 at 09:54:09AM +0800, Weimin Xiong wrote:
> From: Xiong Weimin <xiongweimin@xxxxxxxxxx>
>
> From: Xiong Weimin <xiongweimin@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> ---
> 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