Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp363307imm; Mon, 21 May 2018 07:15:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqjOtJdoq6Mxo/MzVdu0/iI6yJ4IuPdCOHkTduiX2CGPbpe1IRUFU3ICA6YzDqiY5fM/TcN X-Received: by 2002:aa7:80c6:: with SMTP id a6-v6mr20150137pfn.120.1526912126738; Mon, 21 May 2018 07:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526912126; cv=none; d=google.com; s=arc-20160816; b=tm4WIHH9IjAHSyniSR+gKAeaV1VQp/CKiVQhDFQOPmcuxDrxdS/b23WOZGA42lfsF5 3demVxmXfGO+cRWApIeMCJ7fyP2dWRIb4RAYb7FmiIqVeZ+SvqM9CIyYKnQc1HuZ8oL5 W0QCOvrMyjQYXTtREDQDuLjcC5jttGws3gRNmkNDtYhITCdk/lRqao/zr7NeBANm0QUH K5TvPdcm2Dcw/WlF7DRnqdavuc37uar4vreYcAO7NnufR8yCrKoaUcBEbINZ0CpxtP+k fs6TQy4UOtxBgfEXPCbeMuccJIOTqXu2Gph9XDDHkmBr+G3YjdL5cFhCYjUytAg+m55q AcYw== 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=ifqGrHvsN1DO2acW91wmKVPFf63WxpRqxbUuYvKZ3KQ=; b=nGWznzqpgmeqN/t47j3E2AWBMvyG/G2w/ze4pwFs+Fz+S4fCMZHsdNotxtRve+EWnI aY/Uhxdhl9nO01LSOcJV18wBYhgjmxFwQZ5YbzMPDOPHAnectyV4fbgArLUdVWadf6Fk YPYcx0qMmyu098gnixJTmDPOWamdrRp71NhpZTCGLWQO6iiXzo6obmVFTE/kQiGprX7u QnzbKrIkxwgdaOe6yesfT4bhBg2ZEDyE18hIc4KpvrFLlI9icJRmf+sz67FKIBJ+H5rF 8rfBwNyToiq7YNA0HktH/jt8X41fskYJrOAipWuFUtY1OIlANls9PZ5/Kz8SWLYsb78e SqGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=X7o/ZAsR; 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 e8-v6si11363380pgt.185.2018.05.21.07.15.12; Mon, 21 May 2018 07:15:26 -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=X7o/ZAsR; 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 S1752572AbeEUOO6 (ORCPT + 99 others); Mon, 21 May 2018 10:14:58 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:41501 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679AbeEUOOw (ORCPT ); Mon, 21 May 2018 10:14:52 -0400 Received: by mail-pf0-f194.google.com with SMTP id v63-v6so7153951pfk.8 for ; Mon, 21 May 2018 07:14:52 -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=ifqGrHvsN1DO2acW91wmKVPFf63WxpRqxbUuYvKZ3KQ=; b=X7o/ZAsRYFVjASjfnXZ9pHpw2rrS1LMyMoNp0wRCXPNM0FsJV4vEFUsVM/0bmEhZwL 3RMjMJ7ExdhreI5qQtZvDXk2lyuIt5OOWRjlXn1CcaEEKnGA4dqnbRAhXA7Ynp02zzEi as+tQnQwgPJh5I6TmHnvvXnwAfRzQZgTk9UavdebUjcawc7Gke9OHS1sqc09CVE0CITk +ickLVNQoqWqswfm7pFDWmdTV/wm1LuIG2tjCbdmtVeyH1UsJaz2vAScalJBUeYIEmcJ HVdAbuSAw/k3MUCvMHvnk1IWydzdAkuaoWIlmPcUh+EuDdaOPxYfJA/Iib4e2+pevBEt VIYg== 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=ifqGrHvsN1DO2acW91wmKVPFf63WxpRqxbUuYvKZ3KQ=; b=gxDngQn22lGwToMxlcPZ5h4gfINTiSiuEPXUuARRk4777+Ygx5fnLSJpmCpu4V8C9n gL5rvHGxtgQ/cVZ+7mNiaHR8jgIfH24i+e69aDm18YN+XdLvotfPRTE8UZlYQaS1Ajc8 +yOWdzD8HGbNhMo8QqXmf+AAWTeH+IKxW8pg6I06DF69QiYwW7XbXXe7Zx8WYUaYSzCw Fta58IuepEQC8+MIR0LSUxmnWRxR2mneXMtRzPpFoJjgXk4LEI4NDpENy5I5t6naIzaG JMj9lEGdab+yZ6hKjGBzsgiehz4Moc/39BpqSFZ0biw8kScHGFHw8hQ/XdmEZ8Eip9HC 5SUA== X-Gm-Message-State: ALKqPwcySUzoOGd06uOMUltsDwhd/GIoq+BWtoviynBORUd4zXyHNt3k 3k0OxWmdg1IwANc4SmbscU3/Tisomt4= X-Received: by 2002:a65:45c7:: with SMTP id m7-v6mr1197988pgr.109.1526912091584; Mon, 21 May 2018 07:14:51 -0700 (PDT) Received: from ?IPv6:2605:e000:1313:a206:15d9:6571:54aa:276f? ([2605:e000:1313:a206:15d9:6571:54aa:276f]) by smtp.gmail.com with ESMTPSA id z13-v6sm36872565pfk.156.2018.05.21.07.14.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 07:14:50 -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: <0594eaea-0cab-ea04-c258-5f4770ffeee6@linux.intel.com> Date: Mon, 21 May 2018 07:14:49 -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: <71E4F816-7E0F-4984-B53C-06F8566EAB40@amacapital.net> References: <31205dc8-b756-e12b-0249-2ed06c2db9c9@linux.intel.com> <20180509145436.GV12217@hirez.programming.kicks-ass.net> <3ecedd91-1c01-6fc5-4648-89eaf5ff0930@linux.intel.com> <20180510101406.GA12217@hirez.programming.kicks-ass.net> <0594eaea-0cab-ea04-c258-5f4770ffeee6@linux.intel.com> To: Alexey Budankov Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On May 21, 2018, at 5:44 AM, Alexey Budankov wrote: >=20 > Hi Peter, >=20 >> On 10.05.2018 13:14, Peter Zijlstra wrote: >> On Thu, May 10, 2018 at 12:42:38PM +0300, Alexey Budankov wrote: >>>> The Changelog needs to state that user_regs->bp is in fact valid and >>>=20 >>> That actually was tested on binaries compiled without and with BP expose= d=20 >>> and in the latter case proved the value of that change. >>=20 >> Mostly works is not the same as 'always initialized', if there are entry >> paths that do not store that register, then using the value might leak >> values from the kernel stack, which would be bad. >>=20 >> But like said, I think much of the kernel entry code was sanitized with >> the PTI effort and I suspect things are in fact fine now, but lets wait >> for Andy to confirm. >=20 > It looks like, these days, all registers are saved on system calls, just=20= > like you anticipated. >=20 > So BP register value might be stored into the Perf trace on a sample.=20 >=20 > Andy? Hmm, I thought I replied. Yes, they are indeed all saved, but I=E2=80=99m no= t very excited about committing to doing so forever. But storing BP should b= e fine.