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:   Mon, 18 May 2020 16:56:56 -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>,
        Tom Lendacky <thomas.lendacky@....com>,
        Wei Liu <wei.liu@...nel.org>,
        Michael Kelley <mikelley@...rosoft.com>,
        Jason Chen CJ <jason.cj.chen@...el.com>,
        Zhao Yakui <yakui.zhao@...el.com>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>
Subject: Re: [patch V6 07/37] x86/entry: Provide helpers for execute on irqstack

On Mon, May 18, 2020 at 4:53 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> Andy Lutomirski <luto@...nel.org> writes:
> > Actually, I revoke my ack.  Can you make one of two changes:
> >
> > Option A: Add an assertion to run_on_irqstack to verify that irq_count
> > was -1 at the beginning?  I suppose this also means you could just
> > explicitly write 0 instead of adding and subtracting.
> >
> > Option B: Make run_on_irqstack() just call the function on the current
> > stack if we're already on the irq stack.
> >
> > Right now, it's too easy to mess up and not verify the right
> > precondition before calling run_on_irqstack().
> >
> > If you choose A, perhaps add a helper to do the if(irq_needs_irqstack)
> > dance so that users can just do:
> >
> > run_on_irqstack_if_needed(...);
> >
> > instead of checking everything themselves.
>
> I'll have a look tomorrow morning with brain awake.

Also, reading more of the series, I suspect that asm_call_on_stack is
logically in the wrong section or that the noinstr stuff is otherwise
not quite right.  I think that objtool should not accept
run_on_irqstack() from noinstr code.  See followups on patch 10.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ