Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e08761e892c94bedb9778fd760958e07@AcuMS.aculab.com>
Date: Tue, 28 Nov 2017 17:44:54 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Linus Torvalds' <torvalds@...ux-foundation.org>, "Eric W. Biederman"
	<ebiederm@...ssion.com>
CC: "Tobin C. Harding" <me@...in.cc>, "Jason A. Donenfeld" <Jason@...c4.com>,
	Theodore Ts'o <tytso@....edu>, Kees Cook <keescook@...omium.org>, "Paolo
 Bonzini" <pbonzini@...hat.com>, Tycho Andersen <tycho@...ho.ws>, "Roberts,
 William C" <william.c.roberts@...el.com>, Tejun Heo <tj@...nel.org>, "Jordan
 Glover" <Golden_Miller83@...tonmail.ch>, Greg KH
	<gregkh@...uxfoundation.org>, Petr Mladek <pmladek@...e.com>, Joe Perches
	<joe@...ches.com>, Ian Campbell <ijc@...lion.org.uk>, Sergey Senozhatsky
	<sergey.senozhatsky@...il.com>, Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <wilal.deacon@....com>, Steven Rostedt <rostedt@...dmis.org>,
	Chris Fries <cfries@...gle.com>, Dave Weinstein <olorin@...gle.com>, Daniel
 Micay <danielmicay@...il.com>, Djalal Harouni <tixxdz@...il.com>,
	Radim Krcmár <rkrcmar@...hat.com>, "Linux Kernel Mailing
 List" <linux-kernel@...r.kernel.org>, KVM list <kvm@...r.kernel.org>,
	"kernel-hardening@...ts.openwall.com" <kernel-hardening@...ts.openwall.com>
Subject: RE: [PATCH 0/5] add printk specifier %px, unique identifier

From: Linus Torvalds
> Sent: 28 November 2017 17:33
> 
> On Mon, Nov 27, 2017 at 10:26 PM, Eric W. Biederman
> <ebiederm@...ssion.com> wrote:
> >>
> >> Oh well, I just did /proc/<pid>/stack by making it just print 0
> >> unconditionally rather than the hex number.
> >
> > Patch?
> 
> Oh, apparently I never pushed out yesterday.
> 
> The patch literally just affects the (useless) hex number. So:
> 
>     cat /proc/self/stack
> 
> now prints out
> 
>     [<0>] proc_pid_stack+0xaa/0x100
>     [<0>] proc_single_show+0x48/0x80
>     [<0>] seq_read+0xd2/0x410
>     ...
> 
> instead of putting some randomized kernel address there.

Not sure I've done it on Linux - getting a hexdump of the stack is hard.
But I know I've used the absolute return addresses to help hand-decode
the stack.
Usually needed to work out which stack frame is which - especially when the
stack decode doesn't actually (obviously) contain the addresses of each frame.

I don't know how these new stack traceback methods work, but the best one
I've seen in the past disassembled forwards remembering the stack offset
and unprocessed branch targets until it found a return address.
It only had to track %sp and %bp.

	David

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.