Skip to content

Commit b84d42b

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
x86/debug: Remove aout_dump_debugregs()
Unused remnants for the bit-bucket. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Daniel Thompson <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 389cd0c commit b84d42b

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

arch/x86/include/asm/debugreg.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ static __always_inline bool hw_breakpoint_active(void)
9090
return __this_cpu_read(cpu_dr7) & DR_GLOBAL_ENABLE_MASK;
9191
}
9292

93-
extern void aout_dump_debugregs(struct user *dump);
94-
9593
extern void hw_breakpoint_restore(void);
9694

9795
static __always_inline unsigned long local_db_save(void)

arch/x86/kernel/hw_breakpoint.c

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -441,42 +441,6 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
441441
return 0;
442442
}
443443

444-
/*
445-
* Dump the debug register contents to the user.
446-
* We can't dump our per cpu values because it
447-
* may contain cpu wide breakpoint, something that
448-
* doesn't belong to the current task.
449-
*
450-
* TODO: include non-ptrace user breakpoints (perf)
451-
*/
452-
void aout_dump_debugregs(struct user *dump)
453-
{
454-
int i;
455-
int dr7 = 0;
456-
struct perf_event *bp;
457-
struct arch_hw_breakpoint *info;
458-
struct thread_struct *thread = &current->thread;
459-
460-
for (i = 0; i < HBP_NUM; i++) {
461-
bp = thread->ptrace_bps[i];
462-
463-
if (bp && !bp->attr.disabled) {
464-
dump->u_debugreg[i] = bp->attr.bp_addr;
465-
info = counter_arch_bp(bp);
466-
dr7 |= encode_dr7(i, info->len, info->type);
467-
} else {
468-
dump->u_debugreg[i] = 0;
469-
}
470-
}
471-
472-
dump->u_debugreg[4] = 0;
473-
dump->u_debugreg[5] = 0;
474-
dump->u_debugreg[6] = current->thread.debugreg6;
475-
476-
dump->u_debugreg[7] = dr7;
477-
}
478-
EXPORT_SYMBOL_GPL(aout_dump_debugregs);
479-
480444
/*
481445
* Release the user breakpoints used by ptrace
482446
*/

0 commit comments

Comments
 (0)