[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171004085810.GA14022@arm.com>
Date: Wed, 4 Oct 2017 09:58:10 +0100
From: Will Deacon <will.deacon@....com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: "Tobin C. Harding" <me@...in.cc>, Petr Mladek <pmladek@...e.com>,
Joe Perches <joe@...ches.com>,
Ian Campbell <ijc@...lion.org.uk>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
kernel-hardening@...ts.openwall.com, linux-kernel@...r.kernel.org,
Catalin Marinas <catalin.marinas@....com>,
Steven Rostedt <rostedt@...dmis.org>,
William Roberts <william.c.roberts@...el.com>,
Chris Fries <cfries@...gle.com>,
Dave Weinstein <olorin@...gle.com>
Subject: Re: [kernel-hardening] [RFC V2 2/6] lib: vsprintf: whitelist stack
traces
On Wed, Oct 04, 2017 at 10:56:57AM +0200, Greg KH wrote:
> On Mon, Oct 02, 2017 at 11:42:05AM +0100, Will Deacon wrote:
> > On Sun, Oct 01, 2017 at 11:06:46AM +1100, Tobin C. Harding wrote:
> > > Use the %pP functionality to explicitly allow kernel
> > > pointers to be logged for stack traces.
> > >
> > > Signed-off-by: Tobin C. Harding <me@...in.cc>
> > > ---
> > > arch/arm64/kernel/traps.c | 4 ++--
> > > kernel/printk/printk.c | 2 +-
> > > 2 files changed, 3 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
> > > index 5ea4b85..fe09660 100644
> > > --- a/arch/arm64/kernel/traps.c
> > > +++ b/arch/arm64/kernel/traps.c
> > > @@ -147,7 +147,7 @@ void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
> > > struct stackframe frame;
> > > int skip;
> > >
> > > - pr_debug("%s(regs = %p tsk = %p)\n", __func__, regs, tsk);
> > > + pr_debug("%s(regs = %pP tsk = %pP)\n", __func__, regs, tsk);
> >
> > Why do we care for pr_debug?
>
> Because you really want the real value? Seems to make sense to me...
Just seems like anybody debugging the kernel using pr_debug can probably
change /proc/sys/kernel/kptr_restrict...
Will
Powered by blists - more mailing lists