lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch V6 07/37] x86/entry: Provide helpers for execute on irqstack
On Mon, May 18, 2020 at 4:53 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Andy Lutomirski <luto@kernel.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.

\
 
 \ /
  Last update: 2020-05-19 01:58    [W:0.111 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site