Received: by 10.192.165.148 with SMTP id m20csp1196756imm; Thu, 10 May 2018 07:06:59 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp5tcQL9XiWIQahAZkgkINAY6MjDO7iiKRHT2/Fm2eUPP2VC/blCRS3S9EIukUqSZUw1G4s X-Received: by 2002:a17:902:a5c7:: with SMTP id t7-v6mr1566037plq.360.1525961219728; Thu, 10 May 2018 07:06:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525961219; cv=none; d=google.com; s=arc-20160816; b=D5GJyN1OUd8GLTiaIgH0Upmvqupxaz2rh/hR+8z2glrFFRXdfC1d/oacxrm/doFQat /hHsGcFFBK4Cmrb3Iu5OJq9+1xnL+X/AiB6qdcbEMlq8sUGQgJfjnheAx2yhPuxJbjOB 0j3k9gyDka+ASs1E+wF0ERTbd4ohjJJCER+U3Ui8XlCLnHyeye+cf7bK3K8QUufBktgP Pr80xiMlgo9mqRBR3YvO54tB2Hhr2FhSx9RZkhvvF0q+jiqg5RAamc1azzjauycYe/Yp VBvqJbkePC0Lp7ZCSJ7/ZpcCyYysy+KgrC3+C72qUBVgpESzaLb+TPhQx9YGwDAJs/gZ WNpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to:arc-authentication-results; bh=0wV/Tt6cu2n7R+hI9rEMguCz0+vuPe7sRTfOXtaNCew=; b=VuevFH/Lx1XK0v8FU3s8HfJlxmx54AmOREVD9z9a/2jjWa1F+5xdRQuSKLdmL0lDxc OfYx1kjqtHf/Y3wbhU2vIkcBGaoKmhhSK9Ya108O1Iluh3MPYcAStmtuJKyVrvWi/42T FfNbMp33s+aSxOQb1DaoRUTAjfxIGl0Y5wGIvXfzv8SbiFGWZHodWx4lTSW7NEANLivo LeYu5rg+Vh8tjTvuiRbxuLF3NznGJNUIKVAepJbYYsGf1kWoS0x3U5keHF/zsHYu0OPY E1nUMwIih55PY49pFWx7qurXOSlG2OCD3kUY/gwYGMUAAkoN0jBjfOvvChicCBRNDwR9 C/qg== 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 z5-v6si855748pfh.367.2018.05.10.07.06.45; Thu, 10 May 2018 07:06:59 -0700 (PDT) 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 S965463AbeEJOGm (ORCPT + 99 others); Thu, 10 May 2018 10:06:42 -0400 Received: from ozlabs.org ([203.11.71.1]:39933 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935622AbeEJOGi (ORCPT ); Thu, 10 May 2018 10:06:38 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 40hZlc4mBGz9s1B; Fri, 11 May 2018 00:06:36 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: df78d3f6148092d33a9a24c7a9cfac3d0220b484 In-Reply-To: <20180504123834.GA16581@lst.de> To: Torsten Duwe , Josh Poimboeuf From: Michael Ellerman Cc: linux-kernel@vger.kernel.org, Nicholas Piggin , Jiri Kosina , live-patching@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [v3] On ppc64le we HAVE_RELIABLE_STACKTRACE Message-Id: <40hZlc4mBGz9s1B@ozlabs.org> Date: Fri, 11 May 2018 00:06:36 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-05-04 at 12:38:34 UTC, Torsten Duwe wrote: > The "Power Architecture 64-Bit ELF V2 ABI" says in section 2.3.2.3: > > [...] There are several rules that must be adhered to in order to ensure > reliable and consistent call chain backtracing: > > * Before a function calls any other function, it shall establish its > own stack frame, whose size shall be a multiple of 16 bytes. > > – In instances where a function’s prologue creates a stack frame, the > back-chain word of the stack frame shall be updated atomically with > the value of the stack pointer (r1) when a back chain is implemented. > (This must be supported as default by all ELF V2 ABI-compliant > environments.) > [...] > – The function shall save the link register that contains its return > address in the LR save doubleword of its caller’s stack frame before > calling another function. > > To me this sounds like the equivalent of HAVE_RELIABLE_STACKTRACE. > This patch may be unneccessarily limited to ppc64le, but OTOH the only > user of this flag so far is livepatching, which is only implemented on > PPCs with 64-LE, a.k.a. ELF ABI v2. > > Feel free to add other ppc variants, but so far only ppc64le got tested. > > This change also implements save_stack_trace_tsk_reliable() for ppc64le > that checks for the above conditions, where possible. > > Signed-off-by: Torsten Duwe > Signed-off-by: Nicolai Stange > Acked-by: Josh Poimboeuf Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/df78d3f6148092d33a9a24c7a9cfac cheers