From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932330AbdLTRpr (ORCPT ); Wed, 20 Dec 2017 12:45:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49466 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932197AbdLTRpq (ORCPT ); Wed, 20 Dec 2017 12:45:46 -0500 Date: Wed, 20 Dec 2017 11:45:44 -0600 From: Josh Poimboeuf To: Jiri Slaby Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, Thomas Gleixner , "H. Peter Anvin" , x86@kernel.org Subject: Re: [PATCH 1/2] x86/stacktrace: do not fail when regs on stack for ORC Message-ID: <20171220174544.g34v2lkjrz2r6kh7@treble> References: <20171130080325.24785-1-jslaby@suse.cz> <20171130195710.cu2lsa47kwnow2hi@treble> <73526a6b-5083-78f1-8f76-d5f3ac52f958@suse.cz> <20171218033749.ihpwkjh7qfnilj4s@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171218033749.ihpwkjh7qfnilj4s@treble> User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 20 Dec 2017 17:45:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 17, 2017 at 09:37:49PM -0600, Josh Poimboeuf wrote: > > > > So making it: > > if (!(task->flags & (PF_KTHREAD | PF_IDLE))) > > return -EINVAL; > > > > works, but is not reliable now. So I believe, we cannot live without > > unwind->error to differentiate between "unwind_done() == true" because: > > * full stack unwound and the stack type is set to UNKNOWN > > * unwinding failed and the stack type is set to UNKNOWN > > > > Or perhaps introduce stack type BOTTOM, NONE, or NOMORE meaning the > > bottom of the stacks reached? > > Yeah, we'll need something... I need to think about it a little more. I can update the ORC unwinder to set unwind->error in case it runs into an issue or it doesn't reach the "end", like the FP unwinder does. It might not be until 2018 though. But in the meantime you can go ahead and update your patches accordingly and then we can combine them for testing next year. -- Josh