lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 03 Mar 2020 15:19:23 -0600
From:   Scott Wood <swood@...hat.com>
To:     Tom Zanussi <zanussi@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-rt-users <linux-rt-users@...r.kernel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Carsten Emde <C.Emde@...dl.org>,
        John Kacur <jkacur@...hat.com>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Daniel Wagner <wagi@...om.org>
Subject: Re: [PATCH RT 21/23] sched: migrate_enable: Busy loop until the
 migration request is completed

On Tue, 2020-03-03 at 14:39 -0600, Tom Zanussi wrote:
> Hi Scott,
> 
> On Tue, 2020-03-03 at 13:56 -0600, Scott Wood wrote:
> > On Thu, 2020-02-27 at 08:33 -0600, zanussi@...nel.org wrote:
> > > From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> > > 
> > > v4.14.170-rt75-rc2 stable review patch.
> > > If anyone has any objections, please let me know.
> > > 
> > > -----------
> > > 
> > > 
> > > [ Upstream commit 140d7f54a5fff02898d2ca9802b39548bf7455f1 ]
> > > 
> > > If user task changes the CPU affinity mask of a running task it
> > > will
> > > dispatch migration request if the current CPU is no longer allowed.
> > > This
> > > might happen shortly before a task enters a migrate_disable()
> > > section.
> > > Upon leaving the migrate_disable() section, the task will notice
> > > that
> > > the current CPU is no longer allowed and will will dispatch its own
> > > migration request to move it off the current CPU.
> > > While invoking __schedule() the first migration request will be
> > > processed and the task returns on the "new" CPU with "arg.done =
> > > 0". Its
> > > own migration request will be processed shortly after and will
> > > result in
> > > memory corruption if the stack memory, designed for request, was
> > > used
> > > otherwise in the meantime.
> > > 
> > > Spin until the migration request has been processed if it was
> > > accepted.
> > > 
> > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> > > Signed-off-by: Tom Zanussi <zanussi@...nel.org>
> > > ---
> > >  kernel/sched/core.c | 7 +++++--
> > >  1 file changed, 5 insertions(+), 2 deletions(-)
> > 
> > As I said in https://marc.info/?l=linux-rt-users&m=158258256415340&w=
> > 2 if
> > you take thhis you should take the followup 2dcd94b443c5dcbc ("sched:
> > migrate_enable: Use per-cpu cpu_stop_work")
> > 
> 
> Yes, I didn't forget about this, it's just that I can't apply this to
> 4.14-rt until 4.19-rt does, otherwise it will be seen as a regression
> to someone moving from 4.14-rt to 4.19-rt.
> 
> I will be keeping my eye out for when that happens and will apply it to
> the next backport release at that point.
> 
> Thanks for making sure it wasn't missed in any case.

Steven, any plans to merge that patch into 4.19-rt?

In the meantime, I guess it's a question of whether the bug fixed by patch
18/23 is worse than the (probably quite hard to hit) deadlock addressed by
2dcd94b443c5dcbc.

-Scott


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ