lkml.org 
[lkml]   [2020]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [patch V6 36/37] x86/entry: Move paranoid irq tracing out of ASM code
On Wed, May 20, 2020 at 8:17 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> Andy Lutomirski <luto@kernel.org> writes:
>
> > On Fri, May 15, 2020 at 5:11 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> >
> > I think something's missing here. With this patch applied, don't we
> > get to exc_debug_kernel() -> handle_debug() without doing
> > idtentry_enter() or equivalent? And that can even enable IRQs.
> >
> > Maybe exc_debug_kernel() should wrap handle_debug() in some
> > appropriate _enter() / _exit() pair?
>
> I'm the one who is missing something here, i.e. the connection of this
> patch to #DB. exc_debug_kernel() still looks like this:
>
> nmi_enter_notrace();
> handle_debug(regs, dr6, false);
> nmi_exit_notrace();
>
> Confused.
>

Hmm. I guess the code is correct-ish or at least as correct as it
ever was. But $SUBJECT says "Move paranoid irq tracing out of ASM
code" but you didn't move it into all the users. So now the NMI code
does trace_hardirqs_on_prepare() but the #DB code doesn't. Perhaps
the changelog should mention this.

exc_kernel_debug() is an atrocity. Every now and then I get started
on cleanup it up and so far I always get mired in the giant amount of
indirection.

So Acked-by: Andy Lutomirski <luto@kernel.org> if you write a credible
changelog.

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