Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp744639iog; Wed, 15 Jun 2022 11:17:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uoUgTGch4GJlCB8Tx81i5Rr110NrbekQ+N1XITumAvUn/imRcr0w3r7/l+F0TtFAIMAAsg X-Received: by 2002:a17:907:f9c:b0:711:734d:a9a2 with SMTP id kb28-20020a1709070f9c00b00711734da9a2mr1000172ejc.690.1655317035978; Wed, 15 Jun 2022 11:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655317035; cv=none; d=google.com; s=arc-20160816; b=YMT9WHuHe8QiFWugSfBZoOBitKcA3UuDSSSoHIdilj0Brp+C99gDljQIOC1sPS6KFd 2iQbs1GtGg7BzvIGMS9bb2ElS4W38lFxlvTINOhlO57dpSUFPJuzm/eqK2b60D+WR1xJ Om+lnrY9qTruV2w9w8yDDf+uKI/94OMFlpk5Zg6DV3K+c3gRzv227FaVwIPiz/G2q9oK qBRlzo9xkSvxpfzdwaX0SuAHYuBLKxFqFdfy+qvqURuCe1y8Tup8er6duvDpAi7fzyns gloAUDMW18WdoXeawtz2nfm/nsuav7xS89pPaLZoI+ob1KXiOsTsmmANr4zBJB/06kbe Mi3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:date:from :dkim-signature; bh=lUE1wMAUhn3kDY9KTIDAYl8As1JumgEjfydHKTXBoMA=; b=nAGA4mo3+ATkRAjgpVtiCh4Ip9hO/jJkVc1vCbrBHljLVn1uRaGoQNvZmIu3/cHFlc kX+pZstJ2HWhe/OQdzMtuaIkOUw4IH6v5DO+eJO84mNwy4/bwjzFfbO+dbyj9ExsKeP/ 70MXzAgp3kEpYJuGcagXIjnaqzAprx+6N2jORu+NYt6Jf6sW7Y2m+2HGxvr/+HSVYnBU cnkueLOnovEl5XfsC+wjsmqZbpdDc0D6ExTEoypNPXpgWZlMVZVy72/QcC7WTuVNG/Fb m1+MU7mte0heMju4nGiKzIRs+fOrHu5RaNZCMMcIcuz95MH8NYxeCW7xV0KQsDaTv8+R XOJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@maine.edu header.s=google header.b=UWiV+IKL; 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=maine.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o19-20020a170906975300b00715771cd3c1si15985144ejy.622.2022.06.15.11.16.49; Wed, 15 Jun 2022 11:17:15 -0700 (PDT) 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=@maine.edu header.s=google header.b=UWiV+IKL; 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=maine.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346716AbiFOR5R (ORCPT + 99 others); Wed, 15 Jun 2022 13:57:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243685AbiFOR5M (ORCPT ); Wed, 15 Jun 2022 13:57:12 -0400 Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2FD544CC for ; Wed, 15 Jun 2022 10:57:11 -0700 (PDT) Received: by mail-qk1-x72f.google.com with SMTP id d23so9357023qke.0 for ; Wed, 15 Jun 2022 10:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maine.edu; s=google; h=from:date:to:cc:subject:message-id:mime-version; bh=lUE1wMAUhn3kDY9KTIDAYl8As1JumgEjfydHKTXBoMA=; b=UWiV+IKLfovZ0BMALPQiVyjiWYDSwQjf/lH3EyiJcqf1sGrFa9gWqv1UgYKIEotxDK 9pfzIcBtAQoovKOvqxNUaBKSI1Fg5CEL0GGtA8Tpq3gqQt4haQyD0qeeDfzPxSlzcX9Q rv6g+VqLqiM0sbc03LRWTiXOe5rhouubMjflU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:to:cc:subject:message-id:mime-version; bh=lUE1wMAUhn3kDY9KTIDAYl8As1JumgEjfydHKTXBoMA=; b=392jmihUFiJWrOcmJmgpLnDQkmuCkR7y+l2LLKU3OJSvtOz46sdB0gNv6vqTJGLH39 TI2SqVDlyRpYDk5CDib1G2THwV9959NkHXxXqdJQ763QhDsZqEOxA7mhbSYWmsxQtsY3 0SSunC63LkEa+np+iK45prI4t5a/uEeIEZh3Kje5PxEafL60qKXEwROTsp9vd+UsOH4l fq9hmsuDZcPl5Dd2eD9bnQ+zQJKgqzspYg/ubAjQhTRn0olFMxkAN6j+rmIa9NMS/gFz b7k8Geyj0SZFXeEEu3pnACiObIj/sxc705ZoZdiG9EdbcpYHYayIlxpJly7chc8ZD1F+ Itlg== X-Gm-Message-State: AJIora+nw56z2/Kk3dNtam/L1V/7GnrsRx66lkrlj5KzhYL1wjRbcnAt X1DZOY42A2jgYpyKgK3vUzRMAkoIH28hsg== X-Received: by 2002:a37:6b47:0:b0:6a7:48d:e64a with SMTP id g68-20020a376b47000000b006a7048de64amr729185qkc.112.1655315830505; Wed, 15 Jun 2022 10:57:10 -0700 (PDT) Received: from macbook-air.local (weaver.eece.maine.edu. [130.111.218.23]) by smtp.gmail.com with ESMTPSA id cc23-20020a05622a411700b00304f98ad3c1sm9327430qtb.29.2022.06.15.10.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jun 2022 10:57:09 -0700 (PDT) From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Wed, 15 Jun 2022 13:57:03 -0400 (EDT) To: linux-kernel@vger.kernel.org cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Catalin Marinas , linux-perf-users@vger.kernel.org, Will Deacon , Mark Rutland , Rob Herring Subject: [perf] why is /proc/sys/kernel/perf_user_access ARM64 only? Message-ID: <30d95df2-c3b-b3e3-d65e-c6be0355fb1@maine.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Just wasted a lot of time tracking down why rdpmc() event reading wasn't working on an ARM64 machine. It turns out ARM64 has added a custom "/proc/sys/kernel/perf_user_access" to control rdpmc access, but only on ARM64. e2012600810c9ded81f6f63a8d04781be3c300ad Why is this ARM64-only? Why isn't this generic perf infrastructure? How is this different from the existing /sys/bus/event_source/devices/cpu/rdpmc tooling? Also, when user events are disabled, why is the ARMv8 PMU not disabling the cap_user_rdpmc bit in the perf mmap() page? rdpmc was trouble before, but now it's an even bigger architecture-dependent mess just trying to figure out if the feature is enabled or not. Vince