lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 6 Nov 2017 18:52:03 +0800
From:   "Liu, Changcheng" <changcheng.liu@...el.com>
To:     Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        jpoimboe@...hat.com, Petr Mladek <pmladek@...e.com>,
        changcheng.liu@...el.com
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0001/0001] format idle IP output func+offset/length

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

Signed-off-by: Liu Changcheng <changcheng.liu@...el.com>
Signed-off-by: Jerry Liu <primerlink@...il.com>

diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
index 0bc0a35..9cc4178 100644
--- a/lib/nmi_backtrace.c
+++ b/lib/nmi_backtrace.c
@@ -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 %pS\n",
 				cpu, instruction_pointer(regs));
 		} else {
 			pr_warn("NMI backtrace for cpu %d\n", cpu);
-- 
2.7.4

On 17:05 Mon 06 Nov, Sergey Senozhatsky wrote:
> On (11/06/17 13:25), Liu, Changcheng wrote:
> > kaslr feature is enabled in kernel.
> > Remove kernel text address when dumping idle IP info
> > 
> > Signed-off-by: Liu Changcheng <changcheng.liu@...el.com>
> > Signed-off-by: Jerry Liu <primerlink@...il.com>
> > 
> > diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
> > index 0bc0a35..9cc4178 100644
> > --- a/lib/nmi_backtrace.c
> > +++ b/lib/nmi_backtrace.c
> > @@ -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",
> 		       I guess the word 'pc' can be dropped from the message ^^
> 
> there seems to be other cases in the kernel when we print regs->pc/regs->ip.
> 
> 	-ss
> 
> >  				cpu, instruction_pointer(regs));
> >  		} else {
> >  			pr_warn("NMI backtrace for cpu %d\n", cpu);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ