Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2543558imu; Sun, 13 Jan 2019 04:40:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN4/K1oJakmfZreU0WW8Ez4sVcc/Fdia6ObGXj7rknusuVX8bA0lXoLyID0IfqLD+ZqVctz2 X-Received: by 2002:a62:399b:: with SMTP id u27mr22361567pfj.181.1547383226708; Sun, 13 Jan 2019 04:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547383226; cv=none; d=google.com; s=arc-20160816; b=Cez8jM1BE1nyR8qXdUsoi+ueYIncVn4sDbzm0hgLwMiIOOaMBJbnnpYf3cL7E9kpWQ fdIntc3OV3LAoLtb0MllB96bdoG3q/ZOQIlomynX+qh1oEKqG52nZoPc+8Zmr/GQhd/b awZdfMXxQa6oVrNwGghJ+Q77W6lyzCsDanL/Fa+PM2girS9bdtwEW7bXnwxOl/9LiMjX yZgRV+15T4VJN6NbflaRzLcbTHv+cnNcn8OIxMMipe9V/umIThjNKgFNMVTqgmqxrUmi y3Ggy9ql2K+pTzZgAdkGZzCfgLLvG4WVkH60BYXlf1toqQSeE2XMnSqpJ4p/YWLAwmME TZsA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vkY6g5Vqw/ZcPB3+ASMRoGn4tKrtMQnoGHCgEri+h4c=; b=gv0hc2sbU95NatY00Xr9x2YfiF6+Vg4yRinS0s1ITd5+N0HFUt6FIobQrBz3DoS10/ Iq/s8Y3kRtv/61Uw3H+/19tgQVL7wA8O+J1IfIoQVDBCXC+w6BGb6rEigd5WYmJIwp8Q Vzx2N/ZKky8iarFbnQUTAFwUeAluRuktiUsfcpuLt96ac9ztrHsoA/hmpbgSRAwOwIz1 FcElT5eVYeLuE0bqXwp8wCu7gJr6dfSf8PpfSRVW4l+dXnAiLqc+gjP1xK8y7rwmd6Lf IZZ4vvcyCPmS9vNER3j+79AYRT+GkgNVcdB4BbZlQ6ayKEcl4U62pV9XumD61/9KxcxM 26bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sToe6NVO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si5390912pgg.327.2019.01.13.04.39.28; Sun, 13 Jan 2019 04:40:26 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sToe6NVO; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726510AbfAMMeC (ORCPT + 99 others); Sun, 13 Jan 2019 07:34:02 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:38205 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbfAMMeB (ORCPT ); Sun, 13 Jan 2019 07:34:01 -0500 Received: by mail-pl1-f196.google.com with SMTP id e5so8881112plb.5; Sun, 13 Jan 2019 04:34:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=vkY6g5Vqw/ZcPB3+ASMRoGn4tKrtMQnoGHCgEri+h4c=; b=sToe6NVOVkEom92efLv70SEU3rada5B2vsTWOSDUDI5zIPuhy+TyYWwbw/QeR7iK8p JH1OMPXX+8xzNEHKc/FbZ8Vt8fGYSX0ikWz9rsOCTF7jiqV8NsDzolK9LtTxSGx0BiSD kRX+h2ecEb2zS++ct7GSBZ54MCFLGuO14LnFSVTlt6FyTqGVBAkaXoPSu6yL23tluq+A uCHqKKy8yggrNWTArhtIjBiKsn3FSvsnQcBppJahmNkOSXO8/icjgQjAsoG8uyLNyt0u d+0uqQfEVJIeQ4tbUnOi2Yyk2FfNoZ22BKSb7+982GNPiLnKTCinugbLcP2eoDOtjuAB 1q7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vkY6g5Vqw/ZcPB3+ASMRoGn4tKrtMQnoGHCgEri+h4c=; b=mSo8QapHr+dO7AP9qwIlP/FFgOD+uT99YyIjaESHBGFg6NooYI273ZZbamV40xHXwJ 1aGMCI6cteWwHs7gjYTJULnzUUY38Pxel6OrzRkexFzU5Kvtw7kyALckYpZ+7Jh1vfuv GuPvN40x5DU09oQ2B5dKQJFtFNewUVLLrgfK8Qd3t+OzE/G+MoAFb6c8xxes+3Z3kwYD JWrg33BPgNc/N/pgCMSDN00jqF7UbYJGUwqnv9W0jIub6pABKJJPNYP3/0u/Rfe9oBXi CTLyGS2e9XzOnRdTgGiIDIqW9uGlQZpqnhwvwlAFSl6oh94AlOD9BlSxdbmpRIbJeqQJ quDg== X-Gm-Message-State: AJcUukfmIW3prVi2XZwi7Sg415km7bqurv9o4A7csmRtZN3PfXkHbVwD pVzmFyYrBynO7VbiOUIhfII= X-Received: by 2002:a17:902:690c:: with SMTP id j12mr21488290plk.206.1547382840505; Sun, 13 Jan 2019 04:34:00 -0800 (PST) Received: from localhost (14-202-194-140.static.tpgi.com.au. [14.202.194.140]) by smtp.gmail.com with ESMTPSA id r4sm165801214pgn.54.2019.01.13.04.33.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 13 Jan 2019 04:33:59 -0800 (PST) Date: Sun, 13 Jan 2019 23:33:56 +1100 From: Balbir Singh To: Segher Boessenkool Cc: Joe Lawrence , Jiri Kosina , linux-kernel@vger.kernel.org, Torsten Duwe , live-patching@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: ppc64le reliable stack unwinder and scheduled tasks Message-ID: <20190113123356.GA26056@350D> References: <7f468285-b149-37e2-e782-c9e538b997a9@redhat.com> <20190112010914.GB10427@350D> <20190112084541.GK14180@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190112084541.GK14180@gate.crashing.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 12, 2019 at 02:45:41AM -0600, Segher Boessenkool wrote: > On Sat, Jan 12, 2019 at 12:09:14PM +1100, Balbir Singh wrote: > > Could you please define interesting frame on top a bit more? Usually > > the topmost return address is in LR > > There is no reliable way (other than DWARF unwind info) to find out where > the value of LR at function entry currently lives (if anywhere). It may or > may not be still available in LR, it may or may not be saved to the return > stack slot. It can also live in some GPR, or in some other stack slot. > > (The same is true for all other registers). > > The only thing the ABI guarantees you is that you can find all stack frames > via the back chain. If you want more you can use some heuristics and do > some heroics (like GDB does), but this is not fully reliable. Using DWARF > unwind info is, but that requires big tables. > Thanks, so are you suggesting that a reliable stack is not possible on ppc64le? Even with the restricted scope of the kernel? Balbir Singh.