mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: "Liu, Changcheng" <changcheng.liu@intel.com>
Cc: Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] lib_backtrace: fix kernel text address leak
Date: Mon, 6 Nov 2017 11:14:01 -0600	[thread overview]
Message-ID: <20171106171401.4h546bbvdon45or2@treble> (raw)
In-Reply-To: <20171106165648.GA95243@sofia>

On Tue, Nov 07, 2017 at 12:56:48AM +0800, Liu, Changcheng wrote:
> Don't leak idle function address in NMI backtrace.
> 
> Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
> 
> diff --git a/lib/nmi_backtrace.c b/lib/nmi_backtrace.c
> index 46e4c749..61a6b5a 100644
> --- a/lib/nmi_backtrace.c
> +++ b/lib/nmi_backtrace.c
> @@ -93,8 +93,8 @@ 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",
> -				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)

Sorry, I had a typo in my suggestion.  The subject prefix should be:
"nmi_backtrace" instead of "lib_backtrace".

Also, when posting a followup patch, please remove the "Re: " from the
subject so that it's clear that it's a new patch, and not a comment for
the old one.

Otherwise it looks great to me.  Thanks!

-- 
Josh

  reply	other threads:[~2017-11-06 17:14 UTC|newest]

Thread overview: 11+ 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
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 [this message]
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

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=20171106171401.4h546bbvdon45or2@treble \
    --to=jpoimboe@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=changcheng.liu@intel.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

all inboxes | Powered by JetHome®