Skip to contentSkip to conversation

lib/nmi_backtrace.c: fix kernel text address leak

PATCH New [email protected] 1 participant 1 message Nov 17, 2017 Library code

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 36/94 lib/nmi_backtrace.c: fix kernel text address leak

From: "Liu, Changcheng" <[email protected]>
Subject: lib/nmi_backtrace.c: fix kernel text address leak

Don't leak idle function address in NMI backtrace.

---

 lib/nmi_backtrace.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/nmi_backtrace.c renamed from lib/nmi_backtrace.c~lib_backtrace-fix-kernel-text-address-leak +2 -2
diff -puN lib/nmi_backtrace.c~lib_backtrace-fix-kernel-text-address-leak lib/nmi_backtrace.c
@@ -93,8 +93,8 @@ bool nmi_cpu_backtrace(struct pt_regs *r
 	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",
-				cpu, instruction_pointer(regs));
+			pr_warn("NMI backtrace for cpu %d skipped: idling at %pS\n",
+				cpu, (void *)instruction_pointer(regs));
 		} else {
 			pr_warn("NMI backtrace for cpu %d\n", cpu);
 			if (regs)

_