From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1EE9C3A5A7 for ; Tue, 6 Dec 2022 16:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d19cU3Jqb6zOhG4TruOiYrSMHIhkE7QuKxS4FvzuOfA=; b=u/yIRob5jeFN++ g0QaoNOhbvtjR6C1ASSKWl0cIbwCyiw9rmdJe34j5rG4EEIP+8u42/LHKUw167gk/zdtFVI6LgfNr myxZTpcsy6Tmds4qhuaOSG1zyOEEF10gvoYgmQMMSe8T3+vLNbajEmrpbDXlL4LAJV186ahEt29YN GfShrt+bVw/oVyBztZ44M/r30pG6Nw/T63WjYlWzgcppAB0X0AJ6A+l0rRo9lOnkadxt5Zm8As8dm Gk3MaAiEs0lsmBKfAA3uTZSuIbzxTpnSdqZ88CXm5dvSp64pXkAHrR9LayiabE2JV8s9lBmxoFMft lJ1xDeFE290wh+WME3Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2aoR-00EoAN-R3; Tue, 06 Dec 2022 16:28:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2aoN-00Eo03-Bl for linux-arm-kernel@lists.infradead.org; Tue, 06 Dec 2022 16:28:53 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 34C3723A; Tue, 6 Dec 2022 08:28:53 -0800 (PST) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.39.172]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C787A3F73B; Tue, 6 Dec 2022 08:28:43 -0800 (PST) Date: Tue, 6 Dec 2022 16:28:38 +0000 From: Mark Rutland To: Rob Herring , Peter Zijlstra Cc: Alexander Shishkin , Will Deacon , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Jiri Olsa , Catalin Marinas , Marc Zyngier , Oliver Upton , Suzuki K Poulose , James Morse , Alexandru Elisei , kvmarm@lists.linux.dev, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, James Clark , Mark Brown , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH v3 7/8] perf: Add perf_event_attr::config3 Message-ID: References: <20220825-arm-spe-v8-7-v3-0-87682f78caac@kernel.org> <20220825-arm-spe-v8-7-v3-7-87682f78caac@kernel.org> <20221118164943.GA4872@willie-the-truck> <877czfujdj.fsf@ubik.fi.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221206_082851_523770_CC6D0924 X-CRM114-Status: GOOD ( 29.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Peter, it looks like this series is blocked on the below now; what would you prefer out of: (a) Take this as is, and look add adding additional validation on top. (b) Add some flag to indicate a PMU driver supports config3, and have the core code check that, but leave the existing fields as-is for now (and hopefully follow up with further validation later for the existing fields). (c) Go audit all the existing drivers, add flags to indicate support for existing fields, and have the core code check that. Atop that, add support for config3 with the same sort of flag check. I suspect that'd end up needing to go check more than config1/config2 given all the filter controls and so on that drivers aren't great at checking, and that might being fairly invasive. (d) Something else? I think we want to get to a point where drivers indicate what they actually support and the core code rejects stuff drivers don't support or recognise, but I think it'd be a little unreasonable to delay this series on cleaning up all the existing issues. I'm tempted to say (b) as that shouldn't introduce any regressions, should be a relatively simple change to this series, and doesn't precluse making the rest stricter as a follow-up. I'm happy to take a look at that (and IIUC Rob is too). What's your preference? Thanks, Mark. On Mon, Nov 28, 2022 at 11:15:21AM -0600, Rob Herring wrote: > On Mon, Nov 28, 2022 at 10:36 AM Alexander Shishkin > wrote: > > > > Rob Herring writes: > > > > > On Fri, Nov 18, 2022 at 10:49 AM Will Deacon wrote: > > >> > > >> On Fri, Nov 04, 2022 at 10:55:07AM -0500, Rob Herring wrote: > > >> > @@ -515,6 +516,8 @@ struct perf_event_attr { > > >> > * truncated accordingly on 32 bit architectures. > > >> > */ > > >> > __u64 sig_data; > > >> > + > > >> > + __u64 config3; /* extension of config2 */ > > >> > > >> I need an ack from the perf core maintainers before I can take this. > > > > > > Peter, Arnaldo, Ingo, > > > > > > Can I get an ack on this please. > > > > It appears that PMUs that don't use config{1,2} and now config3 allow > > them to be whatever without any validation, whereas in reality we should > > probably -EINVAL in those cases. Should something be done about that? > > Always the 3rd occurrence that gets to clean-up things. ;) > > I think we'd have to add some capability flags for PMU drivers to set > to enable configN usage and then use those to validate configN is 0. > Wouldn't be too hard to do for config3 as we know there's exactly 1 > user, but for 1,2 there's about 80 PMU drivers to check. > > Rob > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel