public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Liu, Changcheng" <changcheng.liu@intel.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	jpoimboe@redhat.com, Petr Mladek <pmladek@suse.com>,
	changcheng.liu@intel.com
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0001/0001] format idle IP output func+offset/length
Date: Mon, 6 Nov 2017 18:52:03 +0800	[thread overview]
Message-ID: <20171106105203.GC69364@sofia> (raw)
In-Reply-To: <20171106080528.GA1298@jagdpanzerIV>

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

Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.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@intel.com>
> > Signed-off-by: Jerry Liu <primerlink@gmail.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);

  reply	other threads:[~2017-11-06 10:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06  5:25 [PATCH 0001/0001] format idle IP output func+offset/length Liu, Changcheng
2017-11-06  8:05 ` Sergey Senozhatsky
2017-11-06 10:52   ` Liu, Changcheng [this message]
2017-11-06 12:15     ` Petr Mladek
2017-11-06 13:11     ` Josh Poimboeuf
2017-11-06 16:48       ` Liu, Changcheng
2017-11-06 16:56         ` [PATCH v2] lib_backtrace: fix kernel text address leak Liu, Changcheng
2017-11-06 17:14           ` Josh Poimboeuf
2017-11-09  3:10 ` [PATCH 0001/0001] format idle IP output func+offset/length kbuild test robot
2017-11-09  3:29   ` Liu, Changcheng
2017-11-09  3:21 ` kbuild test robot
  -- strict thread matches above, loose matches on Subject: below --
2017-11-06  3:19 Liu, Changcheng
2017-11-06 12:13 ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171106105203.GC69364@sofia \
    --to=changcheng.liu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox