From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752143AbdF2IMv (ORCPT ); Thu, 29 Jun 2017 04:12:51 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36787 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbdF2IMq (ORCPT ); Thu, 29 Jun 2017 04:12:46 -0400 Date: Thu, 29 Jun 2017 10:12:33 +0200 From: Ingo Molnar To: Mark Rutland Cc: Kyle Huey , Vince Weaver , "Jin, Yao" , "Peter Zijlstra (Intel)" , stable@vger.kernel.org, Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa , Linus Torvalds , Namhyung Kim , Stephane Eranian , Thomas Gleixner , acme@kernel.org, jolsa@kernel.org, kan.liang@intel.com, Will Deacon , gregkh@linuxfoundation.org, "Robert O'Callahan" , open list Subject: Re: [PATCH] perf/core: generate overflow signal when samples are dropped (WAS: Re: [REGRESSION] perf/core: PMU interrupts dropped if we entered the kernel in the "skid" region) Message-ID: <20170629081233.7muy7k447pc5njmg@gmail.com> References: <2256f9b5-1277-c4b1-1472-61a10cd1db9a@linux.intel.com> <20170628101248.GB5981@leverpostej> <20170628105600.GC5981@leverpostej> <20170628174900.GG8252@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170628174900.GG8252@leverpostej> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Mark Rutland wrote: > It still seems wrong to make up data, though. So what we have here is a hardware quirk: we asked for user-space samples, but didn't get them and we cannot expose the kernel-internal address. The question is, how do we handle the hardware quirk. Since we cannot fix the hardware on existing systems there's really just two choices: - Lose the sample (and signal it as a lost sample) - Keep the sample but change the sensitive kernel-internal address to something that is not sensitive: 0 or -1 works, but we could perhaps also return a well-known user-space address such as the vDSO syscall trampoline or such? there's no other option really. I'd lean towards Vince's take: losing samples is more surprising than getting the occasional sample with some sanitized data in it. If we make the artificial data still a meaningful user-space address, related to kernel entries, then it might even be a bonus, as users would learn to recognize it as: 'oh, skid artifact, I know about that'. Thanks, Ingo