Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1592192imm; Fri, 28 Sep 2018 23:30:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV60MZMraR8GUjbxkdUkftTo6hOa6Zw3vKe2KH6RxLCYGcSo6p8CZH9LAWjjjn3RJJHUKtlWy X-Received: by 2002:a63:e40d:: with SMTP id a13-v6mr1656817pgi.289.1538202646035; Fri, 28 Sep 2018 23:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538202646; cv=none; d=google.com; s=arc-20160816; b=eDDmhWGN6KLAJW1S6TPwFngJ3NEXg7a9wnkrIjuLc+FEPxTGn7aQLL3OLhlMs2mGtD znaVIlwbDqBlBlh2PteHWdUwqCvHW0fH0hzEa16VcQ4FFly+QfbdCpuA/PQsbOAlXXHq 4G/7A3P5bWq+hH/enRrcu+OY4JOYGAHFhoYu8bdY/9Ltef4W4gRKt8BlkFrj/6JZ12bJ pfUZfUxp1llw2vKjQmg/BdgcmFs9wTD1VdL4zT4obGG6HwphvnFKkVFmSgfNK7hynWqn rbJIi6dDJp8e/g+QM+sCCBHUHuWOrSvFrfJ3H7d/B57HDuivmO04yQ+rT3mhduCKFTFH anpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=3Rip5/ujLEJfJGDDtBv5LhbdiatS/JKUkocr2ncqklk=; b=vAwtBO7SYKr7r9vdmxZnuqf2lkt83wzLuF8VggjKoY3lq4FBDSlriMAYOWuVe26ST8 3ow77J0LuK9vykydwsfBgyUa7hin6U0/ZNGyjAFUD6p250CvK+gtcUA92zIbXCWZX/bk kSSTnlBu3OLs9DwO2a0tDXvyOvn0eSZC0+u0rc4ALEQV/DpshxCKjgh34fGhIwjceROa eCAlVCMKzRZS+vrW+n9zWFXD357cUlg0SNOWtle+Injb4EGfPIZ1I3+FYE5KhVkhWQXT iT0cd4ixCyn1jszpGwrh9c64cXZ6tjt2my+WYO8c5LluFgkrSO2N4A/WKBTuj++OVb82 PT/A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10-v6si6682136pgc.105.2018.09.28.23.30.30; Fri, 28 Sep 2018 23:30:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727493AbeI2M5g (ORCPT + 99 others); Sat, 29 Sep 2018 08:57:36 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:55498 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727393AbeI2M5g (ORCPT ); Sat, 29 Sep 2018 08:57:36 -0400 Received: from p5492e4c1.dip0.t-ipconnect.de ([84.146.228.193] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1g68lh-0001Li-3v; Sat, 29 Sep 2018 08:30:21 +0200 Date: Sat, 29 Sep 2018 08:30:20 +0200 (CEST) From: Thomas Gleixner To: Andi Kleen cc: Jann Horn , Mark Rutland , tursulin@ursulin.net, kernel list , tvrtko.ursulin@linux.intel.com, Peter Zijlstra , the arch/x86 maintainers , "H . Peter Anvin" , acme@kernel.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, maddy@linux.vnet.ibm.com, alexey.budankov@linux.intel.com, Kees Cook Subject: Re: [RFC 0/5] perf: Per PMU access controls (paranoid setting) In-Reply-To: <20180928205907.GD32651@tassilo.jf.intel.com> Message-ID: References: <20180919122751.12439-1-tvrtko.ursulin@linux.intel.com> <20180928164111.i6nba2j6mnegwslw@lakrids.cambridge.arm.com> <20180928172340.GA32651@tassilo.jf.intel.com> <20180928174016.i7d24puv7y3jwzf6@lakrids.cambridge.arm.com> <20180928204930.GC32651@tassilo.jf.intel.com> <20180928205907.GD32651@tassilo.jf.intel.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Sep 2018, Andi Kleen wrote: > > > This new file descriptor argument doesn't exist today so it would > > > need to create a new system call with more arguments > > > > Is that true? The first argument is a pointer to a struct that > > contains its own size, so it can be expanded without an ABI break. I > > don't see any reason why you couldn't cram more stuff in there. > > You're right we could put the fd into the perf_event, but the following is > still true: > > > > Obviously we would need to keep the old system call around > > > for compability, so you would need to worry about this > > > interaction in any case! > > > > > > So tying it together doesn't make any sense, because > > > the problem has to be solved separately anyways. And why so? You can keep the original functionality around with the existing restrictions without breaking any existing user space. That existing functionality does not require new knobs. It stays as is. So if you want to use the enhanced version with per PMU permissions based on file descriptors you need a new version of perf. That's nothing new, if the kernel adds new features to any syscall, then you need new tools, new libraries etc. The only guarantee the kernel makes is not to break existing user space, but there is no guarantee that you can utilize new features with existing userspace. Thanks, tglx