Re: bug: data corruption introduced by commit 83d116c53058 ("mm: fix double page fault on arm64 if PTE_AF is cleared")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 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.

-- 
 Kirill A. Shutemov




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux