Re: [PATCH v8 0/2] dma-buf: Fix silent overflow and alignment
From: Jason Gunthorpe
Date: Wed Sep 02 2026 - 08:31:24 EST
On Wed, Sep 02, 2026 at 09:00:46AM +0200, Christian König wrote:
> On 9/1/26 19:08, David Hu wrote:
> > From: David Hu <xuehaohu@xxxxxxxxxx>
> >
> > This series address two related issues in scatter-gather mapping,
> > specifically for the MMIO based dma-buf mapping. The fixes ensure
> > sgt mapping is correct, and proper for large MMIO regions.
> >
> > Patch 1 fixes a silent integer overflow for mapping length exceeding 4G
> > (Previously submitted as [PATCH v7] dma-buf: Fix silent overflow for
> > phys vec to sgt)
> > https://lore.kernel.org/all/20260609164047.486227-1-xuehaohu@xxxxxxxxxx/
> >
> > Patch 2 Splits sgl by largest page aligned chunk
> > (Previously submitted as [PATCH v3] dma-buf: Split sgl by largest page-aligned chunk)
> > https://lore.kernel.org/all/20260722233806.3922093-1-dhu@xxxxxx/
>
> *sigh* such issues are exactly the reason why I didn't wanted the
> *dma-mapping stuff inside DMA-buf. That clearly doesn't belong here.
So you'd rather have these tricky bugs in every driver using dmabuf?
The scatterlist construction in most of the DRM drivers is not in good
shape. They should be converting to call these APIs so they can do it
properly.
> I'm going to push those fixes to drm-misc-next now, but when there
> are more issues like that will mark the code as abandoned and not
> maintained.
Code that is getting bugs fix is not abandoned, please be reasonable.
Jason