From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752528AbdKFKwC (ORCPT ); Mon, 6 Nov 2017 05:52:02 -0500 Received: from mga04.intel.com ([192.55.52.120]:4540 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752004AbdKFKwB (ORCPT ); Mon, 6 Nov 2017 05:52:01 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,352,1505804400"; d="scan'208";a="332591606" Date: Mon, 6 Nov 2017 18:52:03 +0800 From: "Liu, Changcheng" To: Sergey Senozhatsky , jpoimboe@redhat.com, Petr Mladek , changcheng.liu@intel.com Cc: Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0001/0001] format idle IP output func+offset/length Message-ID: <20171106105203.GC69364@sofia> References: <20171106052511.GB69364@sofia> <20171106080528.GA1298@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171106080528.GA1298@jagdpanzerIV> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kaslr feature is enabled in kernel. Remove kernel text address when dumping idle IP info Signed-off-by: Liu Changcheng Signed-off-by: Jerry Liu 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 > > Signed-off-by: Jerry Liu > > > > 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);