Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp492713imm; Fri, 15 Jun 2018 01:03:53 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL+izvzwzV97gTGf5svJ82P0KrU5uFfyLkota3jsAGZuXeSntORhZQLLdkwICPnKZ1b+rbP X-Received: by 2002:a65:5d8a:: with SMTP id f10-v6mr620618pgt.119.1529049833641; Fri, 15 Jun 2018 01:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529049833; cv=none; d=google.com; s=arc-20160816; b=V5jUaTC+LhLypVqPTyWQXqb9E3A0uAqHvHvEsJMqpVtAlWXNKIFbWSaPNFQDOWe0bj XjaFg8DJWKtYuPJa4sLLgbM42461Ps0gFXxFl66zUTb32+Hj0XzZlmexpmQPKQ1vRWNx l2xPQ//kK+oINTBAxt6LGhV0k34D4mJ2gQT6cV9H+HKt/IGcXbxvX2w5dkbm18zqFLc+ LIBcTZUSg65yaFiKc7LflFyQhNylidZcrOaDo7sbGIoc1PGDyjIWe54TGwQ8PFu3KypZ UTSOCqNlGNHyh9a0NzCje7AJ8/+MrTV0GV3GLJ+D6wq/jDPHnkvvNubuADAq6fcjn3Py G+VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=lE51sIS6syb3VZT9fiAIdnfO4uh1CTJrSf8EaydsDiE=; b=FSC7Y4OBN5d4p16Q9ofeJaJveymcj6HCyVaQ2lHxLuwg3k69m8deN9IoUdyC1mnVf9 jhKbb8rgWcHlt4qHRiTMJQCWLBQ1RaPr6nUti52Fci0CNBPwegKCjIJ4rywrk33ouHTP iHfM3suGBrDLgmWR1RAVZTpQXRtkXLP40ncbkC6umJaq9qodacssyyjj0kEJBSXtPSD6 +PQiqBAsIA5k8Hi/lLJRiTLQic89zFA7XlqzzycSTOvICOX8Gu8BaqOCF73thIWhe5bR gvcRcBNEJR4rTqlvBuWtxXvd6BKg8LVzGx9LD9vA/2HS0k5eYDld5iNA6ZGKH6HznU40 n6hQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u3-v6si7364847plb.2.2018.06.15.01.03.38; Fri, 15 Jun 2018 01:03:53 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755989AbeFOIBu (ORCPT + 99 others); Fri, 15 Jun 2018 04:01:50 -0400 Received: from mga06.intel.com ([134.134.136.31]:39290 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755792AbeFOIBt (ORCPT ); Fri, 15 Jun 2018 04:01:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jun 2018 01:01:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,226,1526367600"; d="scan'208";a="237378104" Received: from yjin15-mobl.ccr.corp.intel.com (HELO [10.239.161.30]) ([10.239.161.30]) by fmsmga005.fm.intel.com with ESMTP; 15 Jun 2018 01:01:46 -0700 Subject: Re: [PATCH v1 0/2] perf: Drop leaked kernel samples To: Peter Zijlstra Cc: acme@kernel.org, jolsa@kernel.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, me@kylehuey.com, Linux-kernel@vger.kernel.org, vincent.weaver@maine.edu, will.deacon@arm.com, eranian@google.com, namhyung@kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com References: <1529057003-2212-1-git-send-email-yao.jin@linux.intel.com> <20180615074504.GA2458@hirez.programming.kicks-ass.net> From: "Jin, Yao" Message-ID: <11958be5-dc05-611b-6839-f1f6903c7ca8@linux.intel.com> Date: Fri, 15 Jun 2018 16:01:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180615074504.GA2458@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/15/2018 3:45 PM, Peter Zijlstra wrote: > On Fri, Jun 15, 2018 at 06:03:21PM +0800, Jin Yao wrote: >> On workloads that do a lot of kernel entry/exits we see kernel >> samples, even though :u is specified. This is due to skid existing. >> >> This might be a security issue because it can leak kernel addresses even >> though kernel sampling support is disabled. >> >> One patch "perf/core: Drop kernel samples even though :u is specified" >> was posted in last year but it was reverted because it introduced a >> regression issue that broke the rr-project. >> >> Now this patch set uses sysctl to control the dropping of leaked >> kernel samples. > > So what happened to the suggestion of keeping the samples but 0-stuffing > all the tricky bits? > Bring more overhead to kernel if we zero the bits considering the number of leaked samples may be not too small? And the skid information may be interesting (see example of hitting on page_fault in previous mail). If we zero it, we will not know. Thanks Jin Yao