Re: [PATCH v2 3/3] iommu/virtio: Reject short event buffers

Will Deacon <[email protected]>
Newsgroups dev.linux.lists.iommu,dev.linux.lists.virtualization,org.kernel.vger.linux-kernel
Message-ID <amH-rdeANAtyXhDi@willie-the-truck>
On Thu, Jul 23, 2026 at 09:54:09AM +0800, Weimin Xiong wrote:
> From: Xiong Weimin <[email protected]>
> 
> From: Xiong Weimin <[email protected]>
> 
> 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 <[email protected]>
> ---
>  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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.