Received: by 10.192.165.148 with SMTP id m20csp3227326imm; Mon, 7 May 2018 08:43:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZru2EzP6DVrw7FDTGwM+rKo8LYAlr0MP8/GDO1RlpfBsnzKqciFbMrnS2XYHisgtIdhauth X-Received: by 2002:a24:1393:: with SMTP id 141-v6mr1829541itz.41.1525707803596; Mon, 07 May 2018 08:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525707803; cv=none; d=google.com; s=arc-20160816; b=dOV/3PSWEFKtsGEHVOJkwN8Q9WukErlw39yVvy7UsUzusvJ2sXPSI8Ptzo/VsvAjno D2nWcVslroN5iMPnA0dpqvFWGk34+yCR8qPX9wYoGZxVhudzrhfwpZp7iqkcA/0/CSOA lbWwKj8CxMosYY0n0a7DtjnFS9Qb7kh848l9ft6uYSsMMme1ijw/PD0w+iVKzXkqQTeL 1Ql33tp0imqDTObT7gjlvCwE0oDno+PzGdbMB7yGScqi96/WItElYoKJ7m8Ar+rUIWtP zBkhW4D7DBhzoQmD3TrR3sCBMs/6EijeG1YD1KKi9RRAV8NQtoHle2qdd2UQr/x573Gv gcSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=floGYrCYsHq5yQwKJ0Xcs31ogMT3D8AfNjcgMP0udvs=; b=h+7de7yyfg57/J2WjkdGgnGDw1EzxUPgCYgI+efIfORR/8HoQt5cQVLFrlldfM0ucW 5etbTFbrM5ObejWUCOEBCiLpVk99c0nKUKm0EL6/gLI6cq5B99IjgKDNbEexTFoPbA8z 9Hl9rc3Rd/2EsqhDULRKNu6cJC3UabV97cfvFXArLZdzXTLd6dgQ4eORhOtyWlxCCveK BrvbSDPmilHAKNBpg9TiT8YLQE646kKK+gmJB96kvNuUTvbMnJwQOFrYti8VAK7Vhs6Z /xC+M+QbNs/RGRNqpta5fgyihearSGXPOyUjZ5vFVvi+IBsqQNMEgCmL2MPkNA/QsOB7 bV2A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z66-v6si20333838ioe.93.2018.05.07.08.43.09; Mon, 07 May 2018 08:43:23 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752527AbeEGPmM (ORCPT + 99 others); Mon, 7 May 2018 11:42:12 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33440 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751923AbeEGPmK (ORCPT ); Mon, 7 May 2018 11:42:10 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A0FF4270959; Mon, 7 May 2018 15:42:10 +0000 (UTC) Received: from treble (ovpn-120-85.rdu2.redhat.com [10.10.120.85]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8DCE7215CDA7; Mon, 7 May 2018 15:42:09 +0000 (UTC) Date: Mon, 7 May 2018 10:42:08 -0500 From: Josh Poimboeuf To: Torsten Duwe 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 v3] On ppc64le we HAVE_RELIABLE_STACKTRACE Message-ID: <20180507154208.jo4s43olrf5a3hw4@treble> References: <20180305164928.GA17953@lst.de> <20180308162616.yhbymodggnfzpskx@treble> <20180309174718.2700b29e@blackhole.lan> <20180312153536.7avozx64ku4lvd3e@treble> <20180504123834.GA16581@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180504123834.GA16581@lst.de> User-Agent: NeoMutt/20180323 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 07 May 2018 15:42:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 07 May 2018 15:42:10 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jpoimboe@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 04, 2018 at 02:38:34PM +0200, 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 The subject doesn't actively describe what the patch does, maybe change it to something like: powerpc: Add support for HAVE_RELIABLE_STACKTRACE or maybe powerpc: Add support for livepatch consistency model Otherwise it looks great to me. Acked-by: Josh Poimboeuf -- Josh