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: <CALCETrV-G6-UGMK=MT4RLQyqcUH7p=VsFPOddu-oAUaKic7CKw@mail.gmail.com>
Date:   Tue, 19 May 2020 13:21:52 -0700
From:   Andy Lutomirski <luto@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>, X86 ML <x86@...nel.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Andy Lutomirski <luto@...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 20/37] x86/irq/64: Provide handle_irq()

On Fri, May 15, 2020 at 5:10 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
>
> To consolidate the interrupt entry/exit code vs. the other exceptions
> provide handle_irq() (similar to 32bit) to move the interrupt stack
> switching to C code. That allows to consolidate the entry exit handling by
> reusing the idtentry machinery both in ASM and C.

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

>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
>
> diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
> index 62cff52e03c5..6087164e581c 100644
> --- a/arch/x86/kernel/irq_64.c
> +++ b/arch/x86/kernel/irq_64.c
> @@ -79,3 +79,11 @@ void do_softirq_own_stack(void)
>         else
>                 run_on_irqstack(__do_softirq, NULL);
>  }
> +
> +void handle_irq(struct irq_desc *desc, struct pt_regs *regs)
> +{
> +       if (!irq_needs_irq_stack(regs))
> +               generic_handle_irq_desc(desc);
> +       else
> +               run_on_irqstack(desc->handle_irq, desc);
> +}
>

Would this be nicer if you open-coded desc->handle_irq(desc) in the if
branch to make it look less weird.

This also goes away if you make the run_on_irqstack_if_needed() change
I suggested.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ