Skip to contentSkip to conversation

format idle IP output func+offset/length

PATCH In review Liu, Changcheng 2 participants 2 messages Nov 6, 2017 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 format idle IP output func+offset/length

kaslr feature is enabled in kernel.
Remove kernel text address when dumping idle IP info

lib/nmi_backtrace.c +1 -1
index 0bc0a35..9cc4178 100644
@@ -92,7 +92,7 @@ bool nmi_cpu_backtrace(struct pt_regs *regs)
    if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
        arch_spin_lock(&lock);
        if (regs && cpu_in_idle(instruction_pointer(regs))) {
-           pr_warn("NMI backtrace for cpu %d skipped: idling at pc %#lx\n",
+           pr_warn("NMI backtrace for cpu %d skipped: idling at pc %pS\n",
                cpu, instruction_pointer(regs));
        } else {
            pr_warn("NMI backtrace for cpu %d\n", cpu);
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw

lib/nmi_backtrace.c bool nmi_cpu_backtrace(struct pt_regs *regs) · line 95

Quoted 13 lines · Changcheng

kaslr feature is enabled in kernel.
Remove kernel text address when dumping idle IP info

lib/nmi_backtrace.c +1 -1
index 0bc0a35..9cc4178 100644
@@ -92,7 +92,7 @@ bool nmi_cpu_backtrace(struct pt_regs *regs)
    if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
        arch_spin_lock(&lock);
        if (regs && cpu_in_idle(instruction_pointer(regs))) {
-           pr_warn("NMI backtrace for cpu %d skipped: idling at pc %#lx\n",
+           pr_warn("NMI backtrace for cpu %d skipped: idling at pc %pS\n",

Great catch!

Best Regards,
Petr