lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Aug 2016 15:06:27 -0500
From:	Josh Poimboeuf <jpoimboe@...hat.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Andy Lutomirski <luto@...capital.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Brian Gerst <brgerst@...il.com>,
	Kees Cook <keescook@...omium.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Byungchul Park <byungchul.park@....com>,
	Nilay Vaish <nilayvaish@...il.com>
Subject: Re: [PATCH v3 16/51] x86/32: put real return address on stack in
 entry code

On Mon, Aug 15, 2016 at 12:22:33PM -0700, H. Peter Anvin wrote:
> On 08/15/16 11:25, Josh Poimboeuf wrote:
> > On Mon, Aug 15, 2016 at 11:04:42AM -0700, H. Peter Anvin wrote:
> >> On 08/15/16 08:09, Josh Poimboeuf wrote:
> >>> On Sun, Aug 14, 2016 at 12:31:47AM -0700, Andy Lutomirski wrote:
> >>>> On Fri, Aug 12, 2016 at 7:28 AM, Josh Poimboeuf <jpoimboe@...hat.com> wrote:
> >>>>> This standardizes the stacks of idle tasks to be consistent with other
> >>>>> tasks on 32-bit.
> >>>>
> >>>> It might be nice to stick a ud2 or 1: hlt; jmp 1b or similar
> >>>> afterwards to make it clear that initial_code can't return.
> >>>
> >>> Yeah, I'll do something like that.
> >>>
> >>
> >> "Standardizing the stack" how?  A zero on the stack terminates the stack
> >> trace.
> > 
> > Instead of zero, user tasks have a real return address at that spot.
> > This makes idle tasks consistent with that, so we have a well defined
> > "end of stack".  Also it makes the stack trace more useful since it
> > shows what entry code was involved in calling into C.
> > 
> 
> So how is the stack terminated, and does things like kdb and kgdb need
> modifications?  Or is there now a stack termination above the struct
> pt_regs?

Even in today's code, there's no real "terminator".   The unwinder just
stops when it leaves the stack bounds.  See print_context_stack() in
mainline.

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ