On 1/20/23 06:58, Jason Gunthorpe wrote: >> OK, so we're slightly fortifying follow_page() checking, but >> not at the level of is_valid_gup_args(). Should this be mentioned >> in the commit description? And should the checks be more extensive? > > I'd leave it, there is no reason to be too nannyish - follow_page() > isn't an exported symbol. OK, agreed. ... >> do_mlock() >> __mm_populate() >> populate_vma_page_range() > > This is in gup.c and sets the flags directly, so it is not part of the > "external interface" we should just leave it. > > IMHO, the point of the checks is primarily prevent bad gup_flags from > entering gup.c, primarily from creative driver authors, not to prevent > bugs in gup.c. Yes, also sounds like the right dividing line for how far to go with these checks. OK. thanks, -- John Hubbard NVIDIA