Received: by 10.223.185.111 with SMTP id b44csp522138wrg; Fri, 9 Mar 2018 08:48:37 -0800 (PST) X-Google-Smtp-Source: AG47ELtrrQH/3rQAsBuA+j2QKKgkS4bQfOeZLe5a9dO07kGu3cxSs/CxGnA9wGJo4tyNVh8RlsMz X-Received: by 10.99.157.142 with SMTP id i136mr25372503pgd.14.1520614117624; Fri, 09 Mar 2018 08:48:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520614117; cv=none; d=google.com; s=arc-20160816; b=sw793oAeRI+El0cbdIOmNX0M27ExpXJIfMfIDC9krTfJh6AELsJVzdaiCcFtUn4naD pEQDvFw0kjwaVZnWPIeF+ggL3wAVghKf9SLq4XIJZX7f23SoEG5Hp+WZUWorSjnBqgql dw04ncEuBdDXfXNBHoOapEeLudEqr+7YsdsafSZPAPu2jgFRXe9btR181MG+0WwrzhS1 hWO6jHTy/cLKWWsmtjmxTYMTUCbDDNG8K7GlacnIEh+tfcDLpmq0NxefPLUcZ8xUTUYy aC0vBck/QJBOtDpn4VBCeb5jApXEi9lkkc5U+NCN8MHJoecC2xAZqZKxzYOCLL5SMgkN 1pmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=Kkjxz/1VUvw236ZrlOfChD+GV9Rfqz7NUGuh5ghBsQE=; b=kj/y3b3zJeSw8OKih9CS06EliX52GqDCJRaE5/+eaSPhN/XTsfo3hmtSUUH0xy+5lR nON/8dKzHczrj9ephbp1EVyqfUu4MlzZ7A7Y+Z2gZxIBDxGy5H9KSvppqc8DFz0cOQbO PngiuJz5PWI7LvAwvczDKinGKs1vwgh+VtN8p6gM86o18BUuJbLuXP8Tw/Os5onPZPnH T+EOWaHh3/oPX6DVfBDQKBiPjfdrxRt8MVlsa/ixfVgn9/rbOX/2WeItEo7lJOLNOG0Q qtsfHbQ+sVLkJ5KcTCaZWLYBtTPsbivP3lCbx7Ug3JG6RA25ZVWJ0cx4w/e1hpzzSFy9 2ZhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k80si1110417pfh.260.2018.03.09.08.48.23; Fri, 09 Mar 2018 08:48:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932234AbeCIQr1 (ORCPT + 99 others); Fri, 9 Mar 2018 11:47:27 -0500 Received: from verein.lst.de ([213.95.11.211]:41572 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932162AbeCIQrZ (ORCPT ); Fri, 9 Mar 2018 11:47:25 -0500 Received: by newverein.lst.de (Postfix, from userid 107) id 8E2D368DDD; Fri, 9 Mar 2018 17:47:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on newverein.lst.de X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50 autolearn=disabled version=3.3.1 Received: from blackhole.lan (p5B088633.dip0.t-ipconnect.de [91.8.134.51]) by newverein.lst.de (Postfix) with ESMTPSA id 61DF468CF1; Fri, 9 Mar 2018 17:47:20 +0100 (CET) Date: Fri, 9 Mar 2018 17:47:18 +0100 From: Torsten Duwe To: Josh Poimboeuf Cc: Michael Ellerman , Jiri Kosina , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Nicholas Piggin , live-patching@vger.kernel.org Subject: Re: [PATCH v2] On ppc64le we HAVE_RELIABLE_STACKTRACE Message-ID: <20180309174718.2700b29e@blackhole.lan> In-Reply-To: <20180308162616.yhbymodggnfzpskx@treble> References: <20180305164928.GA17953@lst.de> <20180308162616.yhbymodggnfzpskx@treble> Organization: LST e.V. X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Mar 2018 10:26:16 -0600 Josh Poimboeuf wrote: > This doesn't seem to address some of my previous concerns: You're right. That discussion quickly headed towards objtool and I forgot about this one paragraph with the remarks. > - Bailing on interrupt/exception frames That is a good question. My current code keeps unwinding as long as the trace looks sane. If the exception frame has a valid code pointer in the LR slot it will continue. Couldn't there be cases where this is desirable? Should this be configurable? Not that I have an idea how this situation could occur for a thread that is current or sleeping... Michael, Balbir: is that possible? Any Idea how to reliably detect an exception frame? My approach would be to look at the next return address and compare it to the usual suspects (i.e. collect all "b ret" addresses in the EXCEPTION_COMMON macro, for BookS). > - Function graph tracing return address conversion > > - kretprobes return address conversion You mean like in arch/x86/kernel/unwind_frame.c the call to ftrace_graph_ret_addr ? Forgive me my directness but I don't see why these should be handled in arch-dependent code, other than maybe a hook, if inevitable, that calls back into the graph tracer / kretprobes in order to get the proper address, or simply call the trace unreliable in case it finds such a return address. I understand that x86 has a hard time with its multiple unwinders, but there should be a simpler, generic solution for all other architectures. Torsten