Re: [patch V4 part 1 02/36] x86/hw_breakpoint: Prevent data breakpoints on cpu_entry_area

From: Andy Lutomirski
Date: Sat May 09 2020 - 15:08:54 EST


On Sat, May 9, 2020 at 2:23 AM Lai Jiangshan
<jiangshanlai+lkml@xxxxxxxxx> wrote:
>
> On Tue, May 5, 2020 at 10:15 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> >
> > From: Andy Lutomirski <luto@xxxxxxxxxx>
> >
> > A data breakpoint near the top of an IST stack will cause unresoverable
> > recursion. A data breakpoint on the GDT, IDT, or TSS is terrifying.
> > Prevent either of these from happening.
> >
>
> What happen when a data breakpoint on the direct GDT (load_direct_gdt())
> and the debug IDT (load_debug_idt()) which are not considered in this patch?
>

I have no idea, and learning the answer may involve talking to the
respective CPU vendors' microcode engineers. We should probably block
those, too.