Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp225791pxa; Tue, 11 Aug 2020 01:02:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPQ5WHe8ERnjmHaugxT5bpoDaQYLSx/QXjnChlnUFyE0aXi7/Yhfs5sqIzvcDjMUfZFUEI X-Received: by 2002:a17:906:301b:: with SMTP id 27mr9953439ejz.197.1597132927793; Tue, 11 Aug 2020 01:02:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597132927; cv=none; d=google.com; s=arc-20160816; b=Fcx87NHOPy8ftYWZ0rMfIvlOE9Iof7o2+y/JGkMfn1MABTMG+E0C447Gcz1W5Xg6zR +flzzp5V7bO77/Bg9xxbWu9BGvJo8EwkQxcaVSHx3m+KUQLUYhOYNQ1OtxAOrMRbHfbf NMEa1ecka5Bx7wLmzJncYRODW6bxe8hHj6Py/NX/GxjHqF96h0UKcGSEi0bqt3rltcb+ 7GOzM3IfF9GD5qTbcmRp3Lje+2Gdg4heY0I+fiCiORVP05D/dKzc4Rn/zYWqBLjkepIh askzwKoLMNGPEx3nytwKuaz/33I3m/1D/ULsZnXaYRPrKYV2jsqI6pqi3Tj7svEJT8XM NiAA== 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=tmLs+QilYKUZTKQ3uTScZNsmKC3Uh/2MkcPg+WGingM=; b=WsOfz8vG1ywWUOnWGNFrlvCEi6xhPCyYFxcIxE+YBO+6cpup3leCzKSFwofXHrxNzJ Za/PUku/FhqRlLGgeLU50Tx5i88hs7+BJkD4OeedGWJ6O5HBKzbWT8ycEdroAUSy9L7w CazPEnvAofCMx0mRTaUG3VFENCajb10ahCDL8iRqS4PIR7sTZBad+Q9ndMTFQpYp4Y2I ajzpF11cGO0bl4/ujaOcYVGtx01c5MWVK2Yk5fRU6GJpY1pP1sSmPigeKzjBjnHcR3av TDuBM//hWkkKsoOuT1ZSkuT1WCOGb79qK9QiGZd4Umj5vVPJOKDExitV+XRy0p5Y6FAE JVlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=FaIeeDH1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si11807012edx.426.2020.08.11.01.01.44; Tue, 11 Aug 2020 01:02:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=FaIeeDH1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728301AbgHKH7k (ORCPT + 99 others); Tue, 11 Aug 2020 03:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726397AbgHKH7i (ORCPT ); Tue, 11 Aug 2020 03:59:38 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD61DC06174A for ; Tue, 11 Aug 2020 00:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=tmLs+QilYKUZTKQ3uTScZNsmKC3Uh/2MkcPg+WGingM=; b=FaIeeDH1ObZsUZV1Q+NIMbiICS WhADg+iBdbMI5tc+XyicIhjjEgt/fF+zNslnKWhYR/oXIS6aUt5rkCXmySw+tj2VwjRxnESDa2PEI Ph6/MqYpPc2dDzyPpyO/bSkSDOSkqn/7t0jwvwFn4DQUyMwQad3TjrYOoHXDAkcRNqvntNSuyLKKa q1ZKItqR1im/OGn4Ckg6lfBvkyC7AlltUskpTBc6Z9PbHZBBwo2FRCpS8lH5Xdo0P2l5Ba/GAZyOi gTngKcz3ql4aWS3EBvhwifC1i+cMSBAWn7IuMWYqpEn+AXqfby9iIsyIuEeerESYsWgr03Co8frrw WSpdCBGw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5PBs-0006Qk-IW; Tue, 11 Aug 2020 07:59:24 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 35260980C9D; Tue, 11 Aug 2020 09:59:24 +0200 (CEST) Date: Tue, 11 Aug 2020 09:59:24 +0200 From: Peter Zijlstra To: "Jin, Yao" Cc: mingo@redhat.com, oleg@redhat.com, acme@kernel.org, jolsa@kernel.org, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, alexander.shishkin@linux.intel.com, mark.rutland@arm.com Subject: Re: [PATCH v1 2/2] perf/core: Fake regs for leaked kernel samples Message-ID: <20200811075924.GU3982@worktop.programming.kicks-ass.net> References: <20200731025617.16243-1-yao.jin@linux.intel.com> <20200731025617.16243-2-yao.jin@linux.intel.com> <20200804114900.GI2657@hirez.programming.kicks-ass.net> <4c958d61-11a7-9f3e-9e7d-d733270144a1@linux.intel.com> <20200805124454.GP2657@hirez.programming.kicks-ass.net> <797aa4de-c618-f340-ad7b-cef38c96b035@linux.intel.com> <56957a58-6292-e075-8c30-6230450e3518@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56957a58-6292-e075-8c30-6230450e3518@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 11, 2020 at 03:50:43PM +0800, Jin, Yao wrote: > Could I post v2 which basically refers to your patch but removes some > conditions since I see some issues in test if we use these conditions. > > 1. Remove '!event->attr.exclude_hv || !event->attr.exclude_host || > !event->attr.exclude_guest' at the entry of sanitize_sample_regs(). > > 2. Remove '!attr.exclude_hv || !attr.exclude_host || !attr.exclude_guest' > at the perf_event_open syscall entry. exclude_host, maybe -- due to the dodgy semantics of it, but the others should definitely be there.