Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbcD2OAp (ORCPT ); Fri, 29 Apr 2016 10:00:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47055 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752670AbcD2OAo (ORCPT ); Fri, 29 Apr 2016 10:00:44 -0400 Date: Fri, 29 Apr 2016 09:00:39 -0500 From: Josh Poimboeuf To: Minfei Huang Cc: Jessica Yu , Jiri Kosina , Miroslav Benes , Ingo Molnar , Peter Zijlstra , Michael Ellerman , Heiko Carstens , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, Vojtech Pavlik , Jiri Slaby , Petr Mladek , Chris J Arges , Andy Lutomirski Subject: Re: [RFC PATCH v2 06/18] x86: dump_trace() error handling Message-ID: <20160429140039.w7nykasabm5kzhns@treble> References: <20160429134558.GA17476@dhcp-128-44.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160429134558.GA17476@dhcp-128-44.nay.redhat.com> User-Agent: Mutt/1.6.0.1 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 807 Lines: 21 On Fri, Apr 29, 2016 at 09:45:58PM +0800, Minfei Huang wrote: > On 04/28/16 at 03:44P, Josh Poimboeuf wrote: > > In preparation for being able to determine whether a given stack trace > > is reliable, allow the stacktrace_ops functions to propagate errors to > > dump_trace(). > > Hi, Josh. > > Have you considered to make walk_stack function as non-return function, > since there is no obvious error during detecting the frame points? If you look at the next patch 07/18, there are several cases where walk_stack (print_context_stack_reliable) returns an error. For example, if a function gets preempted before it gets a chance to save the frame pointer, the function's caller would get skipped on the stack trace. So for preempted tasks, we always have to consider their stacks unreliable. -- Josh