linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Ryan Roberts <ryan.roberts@arm.com>
Cc: David Hildenbrand <david@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Linux-MM <linux-mm@kvack.org>, Mike Rapoport <rppt@kernel.org>
Subject: Re: Warning on mremapped uffd-wp memory
Date: Tue, 1 Oct 2024 11:10:02 -0400	[thread overview]
Message-ID: <ZvwQyhfFvQo4VXhA@x1n> (raw)
In-Reply-To: <d9f417ab-cb08-440f-9d45-38dabaf20f64@arm.com>

On Tue, Oct 01, 2024 at 03:27:48PM +0100, Ryan Roberts wrote:
> Hi Peter,
> 
> On 08/08/2024 12:25, Ryan Roberts wrote:
> > On 07/08/2024 19:59, Peter Xu wrote:
> >> On Wed, Aug 07, 2024 at 12:18:18PM +0200, David Hildenbrand wrote:
> >>> On 07.08.24 10:58, David Hildenbrand wrote:
> >>>> On 06.08.24 22:29, Peter Xu wrote:
> >>>>> On Tue, Aug 06, 2024 at 06:37:55PM +0200, David Hildenbrand wrote:
> >>>>>> On 06.08.24 17:15, Ryan Roberts wrote:
> >>>>>>> Hi Peter, David,
> >>>>>
> >>>>> Hi, Ryan,
> >>>>>
> >>>>>>>
> >>>>>>> syzkaller has found an issue (at least on arm64, but I suspect it will be
> >>>>>>> visible on x86_64 too) that triggers the following warning:
> >>>>>
> >>>>> This is true.  I can easily reproduce..
> >>>>>
> 
> [...]
> 
> >> When I'm looking at this specific issue again, it's more than ptes that
> >> should need to remove the uffd-wp bit.  We have:
> >>
> >>   - pmd/pud/hugetlb in other paths that will need similar care..
> >>
> >>   - move_page_tables() smartness on HAVE_MOVE_PUD.. where we may need to
> >>     walk the pmd page removing the bits when necessary..
> >>
> >>   - more importantly, mremap_userfaultfd_prep() might be too late if it's
> >>     after moving pgtables..
> >>
> >>   - [not yet started looking] the mlock issue Ryan mentioned..
> >>
> >> Looks like we'll need more things to fix and test..
> >>
> >> I wished if I can simply disable UFFD_WP + EVENT_REMAP, but I think even
> >> with that, by default when mremap() we should still logically tear down all
> >> those uffd-wp bits which is the same as !EVENT_REMAP now..
> >>
> >> Let me know if anyone would like to beat me to it on fixing the whole
> >> thing, I'd be more than happy..  
> > 
> > Afraid I won't be able to sign up to doing that work.
> > 
> > Otherwise, I'll probably need to postpone
> >> the fix of this issue for 1-2 weeks but finish some other things first..
> 
> I'm not sure if there was any progress on this? We are still seeing the problem
> on v6.12-rc1.

Hi, Ryan,

I haven't yet got free time to look at this, sorry.  I confess I didn't
prioritize this as high, as I doubt anyone would make real use of it, or
hit this issue in real workloads, and it'll even slow down generic
workloads even if slightly.

Do you want to have a look?  It'll be great if so.  Or I can try to find
some time this month.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2024-10-01 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 15:15 Ryan Roberts
2024-08-06 16:37 ` David Hildenbrand
2024-08-06 16:58   ` Ryan Roberts
     [not found]   ` <ZrKHtOJ7wxk0V9Pl@x1n>
     [not found]     ` <7e52ca0b-39df-4979-8b16-9880e5a7149c@redhat.com>
     [not found]       ` <97c7b531-daeb-468f-af2a-31980f6f6a84@redhat.com>
     [not found]         ` <ZrPELKDCMl6MXupy@x1n>
     [not found]           ` <29404449-fcbe-4d54-85ce-44da0b202243@arm.com>
2024-10-01 14:27             ` Ryan Roberts
2024-10-01 15:10               ` Peter Xu [this message]
2024-10-01 15:31                 ` Ryan Roberts
2024-10-01 15:42                   ` Peter Xu

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=ZvwQyhfFvQo4VXhA@x1n \
    --to=peterx@redhat.com \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=mark.rutland@arm.com \
    --cc=rppt@kernel.org \
    --cc=ryan.roberts@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox