[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LRH.2.02.2104071432420.31819@file01.intranet.prod.int.rdu2.redhat.com>
Date: Wed, 7 Apr 2021 14:47:14 -0400 (EDT)
From: Mikulas Patocka <mpatocka@...hat.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
cc: Suren Baghdasaryan <surenb@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>, Peter Xu <peterx@...hat.com>,
stable <stable@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jann Horn <jannh@...gle.com>,
Kirill Tkhai <ktkhai@...tuozzo.com>, Shaohua Li <shli@...com>,
Nadav Amit <namit@...are.com>, Linux-MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Android Kernel Team <kernel-team@...roid.com>,
Andrea Arcangeli <aarcange@...hat.com>,
David Hildenbrand <david@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>
Subject: Re: [PATCH 0/5] 4.14 backports of fixes for "CoW after fork()
issue"
On Wed, 7 Apr 2021, Linus Torvalds wrote:
> On Wed, Apr 7, 2021 at 9:33 AM Suren Baghdasaryan <surenb@...gle.com> wrote:
> >
> > Trying my hand at backporting the patchsets Peter mentioned proved
> > this to be far from easy with many dependencies. Let me look into
> > Vlastimil's suggestion to backport only 17839856fd58 and it sounds
> > like 5.4 already followed that path.
>
> Well, in many ways 17839856fd58 was the "simple and obvious" fix, and
> I do think it's easily backportable.
>
> But it *did* cause problems too. Those problems may not be issues on
> those old kernels, though.
>
> In particular, commit 17839856fd58 caused uffd-wp to stop working
> right, and it caused some issues with debugging (I forget the exact
> details, but I think it was strace accessing PROT_NONE or write-only
> pages or something like that, and COW failed).
>
> But yes, in many ways that commit is a much simpler and more
> straightforward one (which is why I tried it once - we ended up with
> the much more subtle and far-reaching fixes after the UFFD issues
> crept up).
>
> The issues that 17839856fd58 caused may be entire non-events in old
> kernels. In fact, the uffd writeprotect API was added fairly recently
> (see commit 63b2d4174c4a that made it into v5.7), so the uffd-wp issue
> that was triggered probably cannot happen in the old kernels.
>
> The strace issue might not be relevant either, but I forget what the
> details were. Mikilas should know.
>
> See
>
> https://lore.kernel.org/lkml/alpine.LRH.2.02.2009031328040.6929@file01.intranet.prod.int.rdu2.redhat.com/
>
> for Mikulas report. I never looked into it in detail, because by then
> the uffd-wp issue had already come up, so it was juat another nail in
> the coffin for that simpler approach.
>
> Mikulas, do you remember?
>
> Linus
Hi
I think that we never found a root cause for this bug. I was testing if
the whole system can run from persistent memory and found out that strace
didn't work. I bisected it, reported it and when I received Peter Xu's
patches (which fixed it), I stopped bothering about it.
So, we fixed it, but we don't know why.
Peter Xu's patchset that fixed it is here:
https://lore.kernel.org/lkml/20200821234958.7896-1-peterx@redhat.com/
Mikulas
Powered by blists - more mailing lists