[RFC PATCH 0/5] x86/hw_breakpoint: protects more cpu entry data
From: Lai Jiangshan
Date: Mon May 25 2020 - 10:51:13 EST
Hello
The patchset is based on (tag: entry-v9-the-rest, tglx-devel/x86/entry).
And it is complement of 3ea11ac991d
("x86/hw_breakpoint: Prevent data breakpoints on cpu_entry_area").
After reading the code, we can see that more data needs to be protected
against hw_breakpoint, otherwise it may cause
dangerous/recursive/unwanted #DB.
Lai Jiangshan (5):
x86/hw_breakpoint: add within_area() to check data breakpoints
x86/hw_breakpoint: Prevent data breakpoints on direct GDT
x86/hw_breakpoint: Prevent data breakpoints on per_cpu cpu_tss_rw
x86/hw_breakpoint: Prevent data breakpoints on user_pcid_flush_mask
x86/hw_breakpoint: Prevent data breakpoints on debug_idt_table
Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: x86@xxxxxxxxxx
Link: https://lkml.kernel.org/r/20200505134058.272448010@xxxxxxxxxxxxx
Link: https://lore.kernel.org/lkml/20200521200513.656533920@xxxxxxxxxxxxx
arch/x86/kernel/hw_breakpoint.c | 71 +++++++++++++++++++++++++++++----
1 file changed, 63 insertions(+), 8 deletions(-)
--
2.20.1