Re: [PATCH] dma-buf: Add debug option

2021-01-18 Thread Daniel Vetter
On Fri, Jan 15, 2021 at 07:52:53PM +0100, Christian König wrote: > Am 15.01.21 um 17:47 schrieb Daniel Vetter: > > We have too many people abusing the struct page they can get at but > > really shouldn't in importers. Aside from that the backing page might > > simply not exist (for dynamic p2p mapp

Re: [PATCH] dma-buf: Add debug option

2021-01-15 Thread Christian König
Am 15.01.21 um 17:47 schrieb Daniel Vetter: We have too many people abusing the struct page they can get at but really shouldn't in importers. Aside from that the backing page might simply not exist (for dynamic p2p mappings) looking at it and using it e.g. for mmap can also wreak the page handli

[PATCH] dma-buf: Add debug option

2021-01-15 Thread Daniel Vetter
We have too many people abusing the struct page they can get at but really shouldn't in importers. Aside from that the backing page might simply not exist (for dynamic p2p mappings) looking at it and using it e.g. for mmap can also wreak the page handling of the exporter completely. Importers reall

Re: [PATCH] dma-buf: Add debug option

2021-01-15 Thread Christian König
Am 15.01.21 um 16:52 schrieb Daniel Vetter: We have too many people abusing the struct page they can get at but really shouldn't in importers. Aside from that the backing page might simply not exist (for dynamic p2p mappings) looking at it and using it e.g. for mmap can also wreak the page handli

Re: [PATCH] dma-buf: Add debug option

2021-01-15 Thread Chris Wilson
Quoting Daniel Vetter (2021-01-15 15:52:26) > +static void mangle_sg_table(struct sg_table *sg_table) > +{ > +#ifdef CONFIG_DMABUF_DEBUG > + int i; > + struct scatterlist *sg; > + > + if (!sg_table) if (!IS_ENABLED(CONFIG_DMABUF_DEBUG) || IS_ERR_OR_NULL(sg_table)) > +

[PATCH] dma-buf: Add debug option

2021-01-15 Thread Daniel Vetter
We have too many people abusing the struct page they can get at but really shouldn't in importers. Aside from that the backing page might simply not exist (for dynamic p2p mappings) looking at it and using it e.g. for mmap can also wreak the page handling of the exporter completely. Importers reall

[PATCH] dma-buf: Add debug option

2021-01-15 Thread Daniel Vetter
We have too many people abusing the struct page they can get at but really shouldn't in importers. Aside from that the backing page might simply not exist (for dynamic p2p mappings) looking at it and using it e.g. for mmap can also wreak the page handling of the exporter completely. Importers reall