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  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, 13 May 2020 17:51:10 -0700
From:   Andy Lutomirski <luto@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Andy Lutomirski <luto@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Alexandre Chartre <alexandre.chartre@...cle.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Brian Gerst <brgerst@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Will Deacon <will@...nel.org>
Subject: Re: [patch V6 part 3 12/29] x86/entry/common: Provide idtentry_enter/exit()

On Tue, May 12, 2020 at 9:50 AM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Thomas Gleixner <tglx@...utronix.de> writes:
> > Andy Lutomirski <luto@...nel.org> writes:
> >> WARN_ON_ONCE(!on_thread_stack() && (regs->flags & X86_FLAGS_IF) &&
> >> preempt_count() == 0);
> >>
> >> IOW, the actual condition we want is that, if the idtenter_entry/exit
> >> code might schedule or if a cond_local_irq_enable() path might
> >> schedule, we had better be on the correct stack.
> >>
> >> Sorry for causing confusion.
> >
> > Nothing to be sorry about. I could have thought about it myself :)
> > Let me try again.
>
> Move it into the actual preemption condition. Most natural place.

Nice!  This way the logic is clear and the warning will fire even if
no actual preemption occurs.

Acked-by: Andy Lutomirski <luto@...nel.org>

Powered by blists - more mailing lists