Re: [PATCH v3 04/10] x86/traps: Allow custom fixups in handle_bug()

Peter Zijlstra
2025-02-19T18:17:51Z

On Wed, Feb 19, 2025 at 09:55:10AM -0800, Kees Cook wrote:

> > @@ -340,6 +343,9 @@ static noinstr bool handle_bug(struct pt
> > break;
> > }
> >
> > + if (!handled && regs->ip != addr)
> > + regs->ip = addr;
>
> Can you add a comment above this just to help with people scanning
> through this code in the future, maybe:
>
> /* Restore failure location if we're not continuing execution. */
>
>
> > +
> > if (regs->flags & X86_EFLAGS_IF)
> > raw_local_irq_disable();
> > instrumentation_end();

Done.