From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932307AbbETQwa (ORCPT ); Wed, 20 May 2015 12:52:30 -0400 Received: from mail.skyhub.de ([78.46.96.112]:45582 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754315AbbETQw0 (ORCPT ); Wed, 20 May 2015 12:52:26 -0400 Date: Wed, 20 May 2015 18:52:23 +0200 From: Borislav Petkov To: Josh Poimboeuf , Andy Lutomirski Cc: Ingo Molnar , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Michal Marek , Peter Zijlstra , X86 ML , live-patching@vger.kernel.org, "linux-kernel@vger.kernel.org" , Linus Torvalds , Andy Lutomirski , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Andrew Morton Subject: Re: [PATCH v4 0/3] Compile-time stack frame pointer validation Message-ID: <20150520165223.GC3424@pd.tnic> References: <20150520103339.GA22205@gmail.com> <20150520141331.GA16995@treble.redhat.com> <20150520144810.GA10374@gmail.com> <20150520162537.GD16995@treble.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150520162537.GD16995@treble.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2015 at 11:25:37AM -0500, Josh Poimboeuf wrote: > > I've never quite understood what the '?' means. > > It basically means "here's a function address we found on the stack, > which may or may not have been called." It's needed because stack > walking isn't currently 100% reliable. Yeah, that was not that trivial to figure out at the time: unsigned long print_context_stack(struct thread_info *tinfo, ... if (__kernel_text_address(addr)) { if ((unsigned long) stack == bp + sizeof(long)) { ops->address(data, addr, 1); frame = frame->next_frame; bp = (unsigned long) frame; } else { ops->address(data, addr, 0); } and that ops->address is print_trace_address() |-> printk_stack_address() So if I'm understanding this correctly, if rBP+8 is equal to rSP, i.e. return address is on the stack, then this frame got called. Otherwise -> "?". I might be missing something though... -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --