Skip to content

x86/debug: Untangle handle_debug()

Peter Zijlstra lkml stable 1 version Applied

Status from this message: The following commit has been merged into the x86/entry branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 8 repliesApplied

Since v2 from the cover letter

- fixed (user) INT1 / icebp detection
- some further cleanups
- two additional RFC patches

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/13x86/entry: Fix AC assertionarch/x86/include/asm/entry-common.h+10 -25 replies
2/13x86/debug: Allow a single level of #DB recursionarch/x86/kernel/traps.c+31 -342 replies
3/13x86/debug: Sync BTF earlierarch/x86/kernel/traps.c+7 -70 replies
4/13x86/debug: Move kprobe_debug_handler() into exc_debug_kernel()arch/x86/include/asm/kprobes.h arch/x86/kernel/traps.c+8 -60 replies
5/13x86/debug: Remove handle_debug(.user) argumentarch/x86/kernel/traps.c+10 -110 replies
6/13x86/debug: Simplify #DB signal codearch/x86/kernel/traps.c+9 -60 replies
7/13x86/debug: Move historical SYSENTER junk into exc_debug_kernel()arch/x86/kernel/traps.c+25 -240 replies
8/13x86/debug: Move cond_local_irq_enable() block into exc_debug_user()arch/x86/kernel/traps.c+29 -290 replies
9/13x86/debug: Remove the historical junkarch/x86/kernel/traps.c+12 -110 replies
10/13x86/debug: Remove aout_dump_debugregs()arch/x86/include/asm/debugreg.h arch/x86/kernel/hw_breakpoint.c+0 -380 replies
11/13x86/debug: Simplify hw_breakpoint_handler()arch/x86/kernel/hw_breakpoint.c+2 -60 replies
12/13x86/debug: Support negative polarity DR6 bitsarch/x86/kernel/hw_breakpoint.c arch/x86/kernel/ptrace.c arch/x86/kernel/traps.c+5 -60 replies
13/13x86/debug: Change thread.debugreg6 to thread.virtual_dr6arch/x86/include/asm/processor.h arch/x86/kernel/hw_breakpoint.c arch/x86/kernel/kgdb.c +2 more+26 -240 replies

Reviews trailers per patch

4 of 13 patches have a Reviewed-by or Acked-by.

PatchAndy LutomirskiJosh PoimboeufMasami HiramatsuDaniel Thompson
SeriesT-b
1/13A-b
2/13Debugged-by
3/13A-b
4/13A-b A-b
5/13A-b
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v1 thread

Cover letter [PATCH 00/13] x86/debug: Untangle handle_debug()

Hi,

The first two patches probably ought to go in x86/urgent, the rest (!RFC) can go into x86/core and wait a bit.

handle_debug() is a mess, and now that we have separate user and kernel paths, try and clean it up a bit.

There's two RFC patches at the end that impact the ptrace_{get,set}_debugreg(6) ABI, I've no idea what, if anything, is expected of that or if anybody actually cares about that. If I read the code correctly nothing actually consumes the value from ptrace_set_debugreg(6).

Kyle, you seem to be pushing all this to the edge with RR, any clues?

Since v2:

- fixed (user) INT1 / icebp detection
- some further cleanups
- two additional RFC patches