Re: [patch V4 part 4 15/24] x86/db: Split out dr6/7 handling

From: Andy Lutomirski
Date: Fri May 15 2020 - 01:37:46 EST


On Tue, May 5, 2020 at 7:16 AM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>
> DR6/7 should be handled before nmi_enter() is invoked and restore after
> nmi_exit() to minimize the exposure.
>
> Split it out into helper inlines and bring it into the correct order.

> + *
> + * Entry text is excluded for HW_BP_X and cpu_entry_area, which
> + * includes the entry stack is excluded for everything.
> + */
> + get_debugreg(*dr7, 6);
> + set_debugreg(0, 7);

Fortunately, PeterZ is hiding in a brown paper bag, so I don't have to
comment :)

Other than that:

Acked-by: Andy Lutomirski <luto@xxxxxxxxxx>