Re: [PATCH 2/3] cnic,bnx2,bnx2x: page align uio mmap allocations

From: Christoph Hellwig
Date: Mon Oct 02 2023 - 02:11:49 EST


On Fri, Sep 29, 2023 at 10:00:22AM -0700, Chris Leech wrote:
> Allocations in these drivers that will be mmaped through a uio device
> should be made in multiples of PAGE_SIZE to avoid exposing additional
> kernel memory unintentionally.

dma coherent allocations are always rounded up to a page, although
the documentation for that is somewhat obscure and I wouldn't fault
anyone for not relying on it.