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]
Message-ID: <20180425141807.GA8212@redhat.com>
Date:   Wed, 25 Apr 2018 16:18:07 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Daniel Vetter <daniel@...ll.ch>
Cc:     Andrey Grodzovsky <Andrey.Grodzovsky@....com>,
        Michel Dänzer <michel@...nzer.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        David.Panariti@....com, Eric Biederman <ebiederm@...ssion.com>,
        Alex Deucher <Alexander.Deucher@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Christian König <Christian.Koenig@....com>
Subject: Re: [PATCH 2/3] drm/scheduler: Don't call wait_event_killable for
 signaled process.

On 04/25, Daniel Vetter wrote:
>
> On Wed, Apr 25, 2018 at 3:22 PM, Oleg Nesterov <oleg@...hat.com> wrote:
> > On 04/24, Daniel Vetter wrote:
> >>
> >> wait_event_killabel doesn't check for fatal_signal_pending before calling
> >> schedule, so definitely has a nice race there.
> >
> > This is fine. See the signal_pending_state() check in __schedule().
> >
> > And this doesn't differ from wait_event_interruptible(), it too doesn't
> > check signal_pending(), we rely on schedule() which must not block if the
> > caller is signalled/killed.
> >
> > The problem is that it is not clear what should fatal_signal_pending() or
> > even signal_pending() mean after exit_signals().
>
> Uh, I was totally thrown off in all the wait_event* macros and somehow
> landed in the _locked variants, which all need to recheck before they
> drop the lock, for efficiency reasons. See do_wait_intr().

Just in case, note that do_wait_intr() has to check signal_pending() for
completely differerent reason. We need to return non-zero code to stop the
main loop in __wait_event_interruptible_locked(); unlike ___wait_event()
it doesn't check signal_pending() itself.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ