Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp15251504rwb; Mon, 28 Nov 2022 09:27:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf6MoqXR/EIKjPSKOs9NWzeLHb7Mf/0A4Nz8tCtAU97yzPRauEsTsQfJy2aWy+qJIwOtSKH+ X-Received: by 2002:a17:906:c7c9:b0:7bc:c56d:1026 with SMTP id dc9-20020a170906c7c900b007bcc56d1026mr14381883ejb.291.1669656434330; Mon, 28 Nov 2022 09:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669656434; cv=none; d=google.com; s=arc-20160816; b=ZXh/XoA5cwtZsZ51VJEvlbcW9Rv9JGgRRr17Li6+UTQ7w46zGDHtVMzd7FeLo08Ft5 jbj/VnbbPf9+ba7G85DWD0U8R3s1y4u7YJMmwAPSflgI6ig0wDabJvzHwFEYeQxHE6Rn RUQSL3I40D28I4i6XZcJNLhGcLmWMaAprLE3fNiswlixDdEGonngpaJfYCYnpkGmY/N+ 6DhvqC8PM5x7fCb7zbSrrzzGh/M1HGrGw58Nbp10mtBSAnPhuIAV5QXkTnQs92F+9KSc dIzU2cAcw9G82xVWQVTWDN3sjLPsivrkFYtTfBeBIa9c9nXDbJsqGpBl0PEotG5yKcsa ryvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=V5oxt36CEVfwVNB2dTox7Sr7do/1t7zqlD+A0/Ucqbc=; b=QmW1p3/5GZWeIvV7CyDgEjBim/C+0tYkDlX1no++SH4L6j/w49HUTcSko3HMQ2OoMW cxL843KSvvV0Hcs/N29qo2eEKhhsLz8Y5uCuhrqj1UNvcA302HQCtwQIPOk0Zh2WkW7O K8LgZdTK29rJU6xHCOzoylKNZpQG0gij9hXoHRA8DLA6WCjFlB+0CmmoQz0wc+gmb6YB DxAlDmAryi6ElOz25EGSP/bX8jJBP5SzPFOmH1OH0e2Hh+Ae7Mg+SwBSANDzN09uBiiW ewCdrXcATTk3spGNxAh27q+sqGTvHzB4o/7jAmkE45AYeVZuXBaFZhQLOaef8lHok2tZ sEsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gb+2JqY1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa2-20020a170906eda200b0073d8830e4c7si8981323ejb.954.2022.11.28.09.26.51; Mon, 28 Nov 2022 09:27:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gb+2JqY1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232755AbiK1RPp (ORCPT + 84 others); Mon, 28 Nov 2022 12:15:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232336AbiK1RPj (ORCPT ); Mon, 28 Nov 2022 12:15:39 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BAAC192AC; Mon, 28 Nov 2022 09:15:38 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id AB0B3CE0F82; Mon, 28 Nov 2022 17:15:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7DC6C433D6; Mon, 28 Nov 2022 17:15:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669655734; bh=TjkRRocGp4/KkfkTxpUuw69NnWIMsmRgISNVf22kTRY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=gb+2JqY1awK0mINOxq4IOVP2bvEr5zFbvNeybTUSIRF1uf8NT78hZ8tldu0x7v9jb /M6OzFHfSkmR934ZE4HVU1nt+ukWfEjX4dFHOnAeDYX1BqnzlhBeoxZzJp84Mx1651 80i5gyLFnOryM3LVTlvuX+n8iulgTzlUt6q2/vl4gZ1p24sE/yYUc4UrSvt49wen/H L2NK92XAC46Jfb9pXeCnsIowsypLXlwDqKe/HMZs2Pa4mVan2YvqJTyhWSDPIelXql +T8pYunZNHrKgrtcWdoZnv+WwQlHlCvdQAhWXTEccl6wbrN+zMIimXNZd20l1W3UKS 9D65CUkh8rVsg== Received: by mail-vk1-f172.google.com with SMTP id j19so5484360vke.12; Mon, 28 Nov 2022 09:15:34 -0800 (PST) X-Gm-Message-State: ANoB5pknUjs85+uG6EQS5mCJua7LGAA3o7mMAWBwa0Yp+fQY5geX6rmu hhsWnm/AMI8chZzZLJSxYD8ctbboEbIW70SYQg== X-Received: by 2002:a1f:b2c9:0:b0:3b7:8f9b:4eff with SMTP id b192-20020a1fb2c9000000b003b78f9b4effmr19775933vkf.19.1669655733655; Mon, 28 Nov 2022 09:15:33 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <877czfujdj.fsf@ubik.fi.intel.com> From: Rob Herring Date: Mon, 28 Nov 2022 11:15:21 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 7/8] perf: Add perf_event_attr::config3 To: Alexander Shishkin Cc: Will Deacon , Peter Zijlstra , Arnaldo Carvalho de Melo , Ingo Molnar , Namhyung Kim , Jiri Olsa , Mark Rutland , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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