"Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> writes: > On Wed, Feb 12, 2020 at 09:22:03AM -0500, Jeff Moyer wrote: >> "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> writes: >> >> > On Tue, Feb 11, 2020 at 11:27:36AM -0500, Jeff Moyer wrote: >> >> > The real solution would be to retry __copy_from_user_inatomic() under ptl >> >> > if the first attempt fails. I expect it to be ugly. >> >> >> >> So long as it's correct. :) >> > >> > The first attempt on the real solution is below. >> > >> > Yeah, this is ugly. Any suggestion on clearing up this mess is welcome. >> > >> > Jeff, could you give it a try? >> >> Yes, that patch appears to fix the problem. I wonder if we could remove >> the clear_page completely, though. I'd rather see the program segfault >> than operate on bad data. What do you think? > > It is long standing policy: see 6aab341e0a28 ("mm: re-architect the > VM_UNPAGED logic") from 2005. Some obscure case may break if change it. I'll take your word for it. > I think it is fine to live with the WARN for a while and change it to > SIGBUS once we can be relatively sure that it is okay. OK, fine by me. Thanks for looking into this! -Jeff