mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Kees Cook <keescook@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Tobin C. Harding" <me@tobin.cc>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Laight <David.Laight@aculab.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH v2] tracing, printk: Force no hashing when trace_printk() is used
Date: Tue, 3 Apr 2018 18:03:13 -0400	[thread overview]
Message-ID: <20180403180313.3cc8bb27@gandalf.local.home> (raw)
In-Reply-To: <CAGXu5jLbNtn9CqqCeG3UHmWfC9=qPmhjSLw9vu0Zcyt04XaQ+A@mail.gmail.com>

On Tue, 3 Apr 2018 14:43:43 -0700
Kees Cook <keescook@chromium.org> wrote:

> > A static_key is added called "trace_debug" and if it is set, then %p will
> > not be hashed.  
> 
> Hrm, well, using a static key does make it weirder for an attacker to enable. :)

Not just weirder, much more difficult. static_keys are read only (code
segments). To enable them, the system makes the code portion rw updates
the code, then sets it back to ro.

> 
> Whatever the case, if you can get Linus's Ack, sure. I would expect

Linus you OK with this?

> he'd want you to change all the trace_printk()s to %px with
> justifications, though.

What trace_printk()s do you want to change? They are throw away
functions. trace_printk() is not something that stays in the kernel.
It's added during debugging and then removed before submitting what you
are working on upstream. It's just annoying to have to use %px instead
of %p when debugging.

-- Steve

  reply	other threads:[~2018-04-03 22:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-03 21:31 Steven Rostedt
2018-04-03 21:43 ` Kees Cook
2018-04-03 22:03   ` Steven Rostedt [this message]
2018-04-04  2:34     ` Sergey Senozhatsky
2018-04-04 17:13       ` Steven Rostedt
2018-04-04 19:04         ` Linus Torvalds
2018-04-04 19:30           ` Steven Rostedt

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=20180403180313.3cc8bb27@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=David.Laight@aculab.com \
    --cc=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@tobin.cc \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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®