[PATCH v2 2/2] treewide: Add the __GFP_PACKED flag to several non-DMA kmalloc() allocations
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Sun Oct 30 02:02:53 PDT 2022
On Sun, Oct 30, 2022 at 09:47:18AM +0100, Christoph Hellwig wrote:
> On Fri, Oct 28, 2022 at 11:37:52AM +0200, Greg Kroah-Hartman wrote:
> > And here's actually the patch...
>
> How is this supposed to work? noderef means any dereference of it will
> now make sparse complain. And the whole point of the DMA is to get
> data into and out of the system, so except for corner cases like direct
> DMA to userspace (which won't use kmalloc) we absolutely do want to
> derference it to generate or consume the information.
Ah, my fault, sorry, you are right. Is there a sparse tag that just
means "enforce this void * type?" I guess we could do that with something
like:
typedef void *dmaptr;
but that feels icky.
More information about the linux-arm-kernel
mailing list