All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: Jia He <justin.he@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	linux-mm@kvack.org
Subject: Re: bug: data corruption introduced by commit 83d116c53058 ("mm: fix double page fault on arm64 if PTE_AF is cleared")
Date: Thu, 13 Feb 2020 15:14:16 +0300	[thread overview]
Message-ID: <20200213121416.57ddim2ygktctjrl@box> (raw)
In-Reply-To: <x491rqz3myc.fsf@segfault.boston.devel.redhat.com>

On Wed, Feb 12, 2020 at 09:22:03AM -0500, Jeff Moyer wrote:
> "Kirill A. Shutemov" <kirill@shutemov.name> 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


  reply	other threads:[~2020-02-13 12:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 22:51 bug: data corruption introduced by commit 83d116c53058 ("mm: fix double page fault on arm64 if PTE_AF is cleared") Jeff Moyer
2020-02-11  4:17 ` Justin He
2020-02-11  4:29   ` Justin He
2020-02-11 16:44     ` Jeff Moyer
2020-02-11 17:33       ` Kirill A. Shutemov
2020-02-11 17:55         ` Jeff Moyer
2020-02-11 21:44           ` Kirill A. Shutemov
2020-02-11 22:01             ` Jeff Moyer
2020-02-11 22:15               ` Kirill A. Shutemov
2020-02-11 14:51 ` Kirill A. Shutemov
2020-02-11 16:27   ` Jeff Moyer
2020-02-11 22:40     ` Kirill A. Shutemov
2020-02-12 14:22       ` Jeff Moyer
2020-02-13 12:14         ` Kirill A. Shutemov [this message]
2020-02-14 21:07           ` Jeff Moyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200213121416.57ddim2ygktctjrl@box \
    --to=kirill@shutemov.name \
    --cc=catalin.marinas@arm.com \
    --cc=jmoyer@redhat.com \
    --cc=justin.he@arm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.