Skip to content

Commit

Permalink
x86/debug: Remove aout_dump_debugregs()
Browse files Browse the repository at this point in the history
Unused remnants for the bit-bucket.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20200902133201.233022474@infradead.org
  • Loading branch information
Peter Zijlstra authored and Thomas Gleixner committed Sep 4, 2020
1 parent 389cd0c commit b84d42b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
2 changes: 0 additions & 2 deletions arch/x86/include/asm/debugreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ static __always_inline bool hw_breakpoint_active(void)
return __this_cpu_read(cpu_dr7) & DR_GLOBAL_ENABLE_MASK;
}

extern void aout_dump_debugregs(struct user *dump);

extern void hw_breakpoint_restore(void);

static __always_inline unsigned long local_db_save(void)
Expand Down
36 changes: 0 additions & 36 deletions arch/x86/kernel/hw_breakpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,42 +441,6 @@ int hw_breakpoint_arch_parse(struct perf_event *bp,
return 0;
}

/*
* Dump the debug register contents to the user.
* We can't dump our per cpu values because it
* may contain cpu wide breakpoint, something that
* doesn't belong to the current task.
*
* TODO: include non-ptrace user breakpoints (perf)
*/
void aout_dump_debugregs(struct user *dump)
{
int i;
int dr7 = 0;
struct perf_event *bp;
struct arch_hw_breakpoint *info;
struct thread_struct *thread = &current->thread;

for (i = 0; i < HBP_NUM; i++) {
bp = thread->ptrace_bps[i];

if (bp && !bp->attr.disabled) {
dump->u_debugreg[i] = bp->attr.bp_addr;
info = counter_arch_bp(bp);
dr7 |= encode_dr7(i, info->len, info->type);
} else {
dump->u_debugreg[i] = 0;
}
}

dump->u_debugreg[4] = 0;
dump->u_debugreg[5] = 0;
dump->u_debugreg[6] = current->thread.debugreg6;

dump->u_debugreg[7] = dr7;
}
EXPORT_SYMBOL_GPL(aout_dump_debugregs);

/*
* Release the user breakpoints used by ptrace
*/
Expand Down

0 comments on commit b84d42b

Please sign in to comment.