lkml.org 
[lkml]   [2023]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-04-24 19:50    [W:0.118 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site