[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wj0JH6PnG7dW51Sr5ZqhomqSaSLTQV7z4Si2dLeSVcO_g@mail.gmail.com>
Date: Wed, 7 Apr 2021 10:04:49 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Suren Baghdasaryan <surenb@...gle.com>,
Mikulas Patocka <mpatocka@...hat.com>
Cc: 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, 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
Powered by blists - more mailing lists