public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: "Paul E. McKenney" <paulmck@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lockdep: Make print_lock() address visible
Date: Mon, 16 Sep 2019 20:07:55 -0700	[thread overview]
Message-ID: <201909162006.3138C81AE0@keescook> (raw)
In-Reply-To: <20190917013946.9EC51C60479@www.outflux.net>

On Mon, Sep 16, 2019 at 06:39:46PM -0700, keescook@chromium.org wrote:
> commit 519248f36d6f3c80e176f6fa844c10d94f1f5990
> Author: Paul E. McKenney <paulmck@linux.ibm.com>
> Date:   Thu May 30 05:39:25 2019 -0700
> 
>     lockdep: Make print_lock() address visible
>     
>     Security is a wonderful thing, but so is the ability to debug based on
>     lockdep warnings.  This commit therefore makes lockdep lock addresses
>     visible in the clear.
>     
>     Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
> 
> diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
> index 4861cf8e274b..4aca3f4379d2 100644
> --- a/kernel/locking/lockdep.c
> +++ b/kernel/locking/lockdep.c
> @@ -620,7 +620,7 @@ static void print_lock(struct held_lock *hlock)
>  		return;
>  	}
>  
> -	printk(KERN_CONT "%p", hlock->instance);
> +	printk(KERN_CONT "%px", hlock->instance);
>  	print_lock_name(lock);
>  	printk(KERN_CONT ", at: %pS\n", (void *)hlock->acquire_ip);
>  }

Just to clarify: this is only visible under CONFIG_LOCKDEP, yes? That's
not a state anyone would run a production system under, I'd hope.

-- 
Kees Cook

       reply	other threads:[~2019-09-17  3:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190917013946.9EC51C60479@www.outflux.net>
2019-09-17  3:07 ` Kees Cook [this message]
2019-09-18  0:28   ` [PATCH] lockdep: Make print_lock() address visible Paul E. McKenney

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=201909162006.3138C81AE0@keescook \
    --to=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.ibm.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