Messages in this thread | | | Date | Mon, 24 Apr 2023 14:49:35 -0300 | From | Jason Gunthorpe <> | Subject | Re: [PATCH] mm/gup: disallow GUP writing to file-backed mappings by default |
| |
On Sun, Apr 23, 2023 at 11:56:48PM +0100, Lorenzo Stoakes wrote:
> This warned upon check should in reality not occur, because it implies the > GUP user is trying to do something broken and is _not_ explicitly telling > GUP that it knows it's doing it and can live with the consequences. And on > that basis, is worthy of a warning so we know we have to go put this flag > in that place (and know it is a source of problematic GUP usage), or fix > the caller.
It is fine for debugging, but we can't merge user triggerable WARN_ONs..
Since the GUP caller has no idea if userspace might be maliciously passing in a file VMA we can't throw warnings.
Jason
| |