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:   Wed, 24 Apr 2019 15:19:54 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Waiman Long <longman@...hat.com>, Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will.deacon@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Linux List Kernel Mailing <linux-kernel@...r.kernel.org>,
        the arch/x86 maintainers <x86@...nel.org>,
        Davidlohr Bueso <dave@...olabs.net>,
        Tim Chen <tim.c.chen@...ux.intel.com>,
        huang ying <huang.ying.caritas@...il.com>,
        Roman Gushchin <guro@...com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH] bpf: Fix preempt_enable_no_resched() abuse

On Tue, Apr 23, 2019 at 10:35:12PM +0200, Peter Zijlstra wrote:
> On Tue, Apr 23, 2019 at 01:27:29PM -0700, Linus Torvalds wrote:
> > On Tue, Apr 23, 2019 at 12:56 PM Peter Zijlstra <peterz@...radead.org> wrote:
> > >
> > > Unless the very next line is schedule(), or implies it, one must not use
> > > preempt_enable_no_resched(). It can cause a preemption to go missing and
> > > thereby cause arbitrary delays, breaking the PREEMPT=y invariant.
> > 
> > That language may be a bit strong, or m,aybe the "implies it" might at
> > least be extended on.
> > 
> > It doesn't need to be "schedule()" per se, it can be any of the things
> > that check if we _need_ to be scheduled.
> 
> I'll try and word-smith that tomorrow, brain is fried. But yes,
> something that ends up in schedule() 'soon'.

I've made that:

Unless there is a call into schedule() in the immediate
(deterministic) future, one must not use preempt_enable_no_resched().
It can cause a preemption to go missing and thereby cause arbitrary
delays, breaking the PREEMPT=y invariant.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ