[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuCfpFkB3OoahH6URzWi+4L50daNGqDVPeUaF5GGuez5tLk8w@mail.gmail.com>
Date: Tue, 4 Jul 2023 23:42:19 -0700
From: Suren Baghdasaryan <surenb@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Greg KH <gregkh@...uxfoundation.org>,
Linux regressions mailing list <regressions@...ts.linux.dev>,
Bagas Sanjaya <bagasdotme@...il.com>,
Jacob Young <jacobly.alt@...il.com>,
Laurent Dufour <ldufour@...ux.ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Memory Management <linux-mm@...ck.org>,
Linux PowerPC <linuxppc-dev@...ts.ozlabs.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: Fwd: Memory corruption in multithreaded user space program while
calling fork
On Tue, Jul 4, 2023 at 3:04 PM Suren Baghdasaryan <surenb@...gle.com> wrote:
>
> On Tue, Jul 4, 2023 at 2:28 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
> >
> > On Tue, 4 Jul 2023 13:22:54 -0700 Suren Baghdasaryan <surenb@...gle.com> wrote:
> >
> > > On Tue, Jul 4, 2023 at 9:18 AM Andrew Morton <akpm@...ux-foundation.org> wrote:
> > > >
> > > > On Tue, 4 Jul 2023 09:00:19 +0100 Greg KH <gregkh@...uxfoundation.org> wrote:
> > > >
> > > > > > > > > Thanks! I'll investigate this later today. After discussing with
> > > > > > > > > Andrew, we would like to disable CONFIG_PER_VMA_LOCK by default until
> > > > > > > > > the issue is fixed. I'll post a patch shortly.
> > > > > > > >
> > > > > > > > Posted at: https://lore.kernel.org/all/20230703182150.2193578-1-surenb@google.com/
> > > > > > >
> > > > > > > As that change fixes something in 6.4, why not cc: stable on it as well?
> > > > > >
> > > > > > Sorry, I thought since per-VMA locks were introduced in 6.4 and this
> > > > > > patch is fixing 6.4 I didn't need to send it to stable for older
> > > > > > versions. Did I miss something?
> > > > >
> > > > > 6.4.y is a stable kernel tree right now, so yes, it needs to be included
> > > > > there :)
> > > >
> > > > I'm in wait-a-few-days-mode on this. To see if we have a backportable
> > > > fix rather than disabling the feature in -stable.
> > >
> > > Ok, I think we have a fix posted at [2] and it's cleanly applies to
> > > 6.4.y stable branch as well. However fork() performance might slightly
> > > regress, therefore disabling per-VMA locks by default for now seems to
> > > be preferable even with this fix (see discussion at
> > > https://lore.kernel.org/all/54cd9ffb-8f4b-003f-c2d6-3b6b0d2cb7d9@google.com/).
> > > IOW, both [1] and [2] should be applied to 6.4.y stable. Both apply
> > > cleanly and I CC'ed stable on [2]. Greg, should I send [1] separately
> > > to stable@...r?
> > >
> > > [1] https://lore.kernel.org/all/20230703182150.2193578-1-surenb@google.com/
> >
> > This one isn't sufficient for .configs which already have
> > PER_VMA_LOCK=y. Using `depends on BROKEN' would be better.
> >
> > > [2] https://lore.kernel.org/all/20230704200656.2526715-1-surenb@google.com/
> > >
> >
> > We're still awaiting tester input on this?
>
> Yeah, and it seems to be negative... Anyway, I'll post a dependency on BROKEN.
I posted the patchset at
https://lore.kernel.org/all/20230705063711.2670599-1-surenb@google.com/
CC'ing stable@...r with the cover letter explaining the situation. The
negative report might have been a fluke, so let's wait for more
testing. In the meantime we can disable the feature by applying the
last patch in that series.
>
> >
> > I think a clean new fully-changelogged two-patch series would be the
> > best way to handle this. Please ensure that the [0/2] intro clearly
> > explains what we're proposing here, and why.
Done.
> >
> > Also, "might slightly regress" is a bit weak. These things are
> > measurable, no? Because a better solution would be to fix 6.4.x and
> > mainline and leave it at that.
They are measurable and they were included in the fix I posted. I
added the numbers in the new cover letter as well.
Thanks,
Suren.
> >
Powered by blists - more mailing lists