Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/debug: Remove aout_dump_debugregs()

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

authored by

Peter Zijlstra and committed by
Thomas Gleixner
b84d42b6 389cd0cd

-38
-2
arch/x86/include/asm/debugreg.h
··· 90 90 return __this_cpu_read(cpu_dr7) & DR_GLOBAL_ENABLE_MASK; 91 91 } 92 92 93 - extern void aout_dump_debugregs(struct user *dump); 94 - 95 93 extern void hw_breakpoint_restore(void); 96 94 97 95 static __always_inline unsigned long local_db_save(void)
-36
arch/x86/kernel/hw_breakpoint.c
··· 442 442 } 443 443 444 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 - 480 - /* 481 445 * Release the user breakpoints used by ptrace 482 446 */ 483 447 void flush_ptrace_hw_breakpoint(struct task_struct *tsk)