Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp812404imm; Tue, 15 May 2018 09:30:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq15TY+6BjpkdBh9h3C8jhW33HV2yKDUXXQwl08VSrSi4tzBrGIWGnDKbH4sTqvmlT4qo2C X-Received: by 2002:a65:590e:: with SMTP id f14-v6mr12765280pgu.282.1526401840413; Tue, 15 May 2018 09:30:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526401840; cv=none; d=google.com; s=arc-20160816; b=etfg1H1jB4DP8Xqst2DthSExMxaM049/IsY05Y0mdC7QsSeiZ+7l69PO8j4nPwwrYP 2XYlphGaz/8y89pNFWE3xQpR5YbU/BC+ctQCwMkznqRGawqlUqo6HGP+CfOYAX/tOpBu 1d3E6a+i27I3KC/1VM0lgtAYtr2JkOno1b1XXrInXAO2M4zv4DFOh7S+UE1KBcbDApII R2fxKq8+yFS9C2GHTibnIUYXrNNXzf9LOcA31sFnScmYP02eU3Bh1ooBD/G3EhsNuwFa iSQxV0NA/bWqMGMXvbzlWb1bH+8uxQlNsnsmxHA0oQdY9SwKjQ2/ujGLz8l4aTo+YC9v H9lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=FDPAMp9l14E4jMrcBZFIbyUPfoUurdgrmF+lfDbQlg0=; b=vRdZS+HFE/KqOy0kD06hQ4Hrow7cLZ/LCFXXPqNmE1U3LH6zSUmcNi5wl0ymurFWKw XGEYv+7N1YMWkVKXVmKN/jmNtDJ3GMoRDu6zB/cwN/7SSrqCjvijMg527eyAVITXxjyq e7gaCyh/0tTX2Ceqm5QLQdBq2tqzoh8p0eKo8gVXvzZttNgyWrZCmvYCo8X/ej8V3EfW 5l8tY+CemmCsN8fOsuuqZ92ssm5Sr0s0muLr/OeNi2/pBDAff/BJloc0Nn8WSAha+v6r Km7obdQuNP74uLU2un6u+9Sfo3f4WzGdCw7bvtNc6rNOW2s0+Oy1xxVx6dLsf4jLKsOw Hing== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=zi0BIjvv; 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 c17-v6si432658pfk.36.2018.05.15.09.30.23; Tue, 15 May 2018 09:30:40 -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; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=zi0BIjvv; 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 S1752730AbeEOQaM (ORCPT + 99 others); Tue, 15 May 2018 12:30:12 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:37831 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751309AbeEOQaK (ORCPT ); Tue, 15 May 2018 12:30:10 -0400 Received: by mail-pf0-f194.google.com with SMTP id e9-v6so309709pfi.4 for ; Tue, 15 May 2018 09:30:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FDPAMp9l14E4jMrcBZFIbyUPfoUurdgrmF+lfDbQlg0=; b=zi0BIjvvK+t7WMMNkVaN3TJ5L8Fitsao9m+7lBjZNKmiAEBfojeY6g6xNHvqQ5au00 FQR//awFScDrR8oeDooD6RzTIHPlFd7tr+JRuMkmobZsWWTWsSMtnUlVJV5/0Mer3JHC QZpZYhsFr9nAjpQDktgZ2bftgfr2hv1QwKhH98BO8DGjebST5ajVIZxqvkgcg1Tpkbta pVwEBUEbvjynhOY5XwzSJpHUODAzD4dRNmjyres72BAbAyboB1WNY1XG0cea/mjm5zzj z4DyqrTPxFA+0yh0XdY9XN0hcKYpo9txO9N2wbArQ7Xneh39RnmGJ99c8Wn57iuYJjAY Bzag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=FDPAMp9l14E4jMrcBZFIbyUPfoUurdgrmF+lfDbQlg0=; b=irGPMJmSNDlCNm+fNGiOBOhb5kqqu1R8Riw0ewTk6YdlBAhHgMreg0cskZsDm7G7IU gOSLOr4fGKLwVb/0cw54DRYt4oB4Nw3JtIsLXdW/AjwrUlq3kWp61CIZQEO4cUv4vihL dOnm06z3FZ0spLG/Qjxzk4ruD4C4wMomcG4Zb3w5IPfKugrOb6myvkUTqAM5JAOFGGVW Leq5nGb/XHjx8D6g8YvdY9uw+6UMaFKqXJKGmzKn/yPHFp0XZ+vJSyKb6l/vMoNrDn3w 333GqkHAKHdjJReRvEuhA+g0rxqT6qQ0Y0EHarBGhZkaiUSqHG3f+lZ5MtvcyvjXcOwf 34mg== X-Gm-Message-State: ALKqPwegLd5JjFwx1Kn8DZezblCrQ3kqAg/vz9ho++8XjcGSEnaPjAea VmG6+hnc1zqjuLzpn0QWntP+DSFes8E= X-Received: by 2002:a65:53ca:: with SMTP id z10-v6mr10728395pgr.413.1526401809227; Tue, 15 May 2018 09:30:09 -0700 (PDT) Received: from ?IPv6:2600:1010:b02f:b300:c9b2:92dd:a6b6:9492? ([2600:1010:b02f:b300:c9b2:92dd:a6b6:9492]) by smtp.gmail.com with ESMTPSA id g20-v6sm559620pfi.163.2018.05.15.09.30.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 09:30:08 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2]: perf/x86: store user space frame-pointer value on a sample From: Andy Lutomirski X-Mailer: iPhone Mail (15E302) In-Reply-To: Date: Tue, 15 May 2018 09:30:05 -0700 Cc: Peter Zijlstra , Andy Lutomirski , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andi Kleen , linux-kernel , linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <31205dc8-b756-e12b-0249-2ed06c2db9c9@linux.intel.com> <20180509145436.GV12217@hirez.programming.kicks-ass.net> To: Alexey Budankov Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 15, 2018, at 1:08 AM, Alexey Budankov wrote: >=20 >=20 > Hi Andy, >=20 >> On 09.05.2018 17:54, Peter Zijlstra wrote: >>> On Tue, May 08, 2018 at 06:21:36PM +0300, Alexey Budankov wrote: >>>=20 >>> Store user space frame-pointer value (BP register) into Perf trace=20 >>> on a sample for a process so the value becomes available when=20 >>> unwinding call stacks for functions gaining event samples. >>>=20 >>> Signed-off-by: Alexey Budankov >>> --- >>> arch/x86/kernel/perf_regs.c | 8 +++++++- >>> 1 file changed, 7 insertions(+), 1 deletion(-) >>>=20 >>> diff --git a/arch/x86/kernel/perf_regs.c b/arch/x86/kernel/perf_regs.c >>> index e47b2dbbdef3..8d68658eff7f 100644 >>> --- a/arch/x86/kernel/perf_regs.c >>> +++ b/arch/x86/kernel/perf_regs.c >>> @@ -156,7 +156,13 @@ void perf_get_regs_user(struct perf_regs *regs_user= , >>=20 >>=20 >>> * Most system calls don't save these registers, don't report them. >>=20 >> ^^^ that worries me and is the reason for the '-1's below. However I >> think with all the PTI rework this might no longer be true. >>=20 >> The Changelog needs to state that user_regs->bp is in fact valid and >> ideally point to the commits that makes it so. Also this patch should >> update that comment. >>=20 >> Cc Andy who keeps better track of all that than me. >=20 > Are there any thoughts so far? Feedback on the matter above is highly appr= eciated. Sorry, I missed this. Can you forward the original patch? I don=E2=80=99t h= ave it. These days, system calls should save all registers, but I=E2=80=99m not enti= rely sure I want to promise that they=E2=80=99ll continue to do so forever.