Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2144395ybz; Thu, 23 Apr 2020 12:22:32 -0700 (PDT) X-Google-Smtp-Source: APiQypIo7ZrtJG0ZdqJPCMef1TP2fVbGii7AcrgGW454n47mH/p/fiqI5Meo3npo8osSpfeQgy5J X-Received: by 2002:a17:906:7282:: with SMTP id b2mr4134013ejl.161.1587669752159; Thu, 23 Apr 2020 12:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587669752; cv=none; d=google.com; s=arc-20160816; b=WH0SvnRqCdTezgXH2PWs23k/VgdjI7qRhU8gtmGXy0mlviFHO/smWkJTSN1kzi+pYt DfMHgVNfo7A5rDGFAkoHGMHx7y58gnxmCyo5fZZ2ngv+oZnO2OMHnEH44YrhRe0dIa2R s6H0zRtSmwnCSZpd7RyDky6KA3nh+1RWOq9IMet6LFvoA0qZ0p37dU3Jscu5696uZhbA cFua3QDwM/SfEmThqRL7VYmUO/D51VswPQ30CIE7wWC5bRmlCpTmlIu7QezxeSgAQdZe VvCcnQNNXbthm+V2ssAZpv6emS34IFYT2mHaJbKZo6gdZZTnvBVJ2eow31Cae7gtXwKA /O5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:ironport-sdr :ironport-sdr; bh=A4cbK6E8rrhEMogZEQbMwgC9/ybQCfE/QPAL36vf6/Y=; b=BYbh/801i+UwhwO9SQLhgbggilS0dqC5fBs1zvmCxFpsXCM8aNR1u2+Q4Ax+9pqB1y RkRaqomirPxHj2rue5IE7WAzo9OoufmCkny+xlVLnHysnILY7kXE8KqmZrZlYuwfET8F oo3LNx/HnqGnOpZo5C4C5+SXXN0Y/8KPz5ebpoZcMLe8DJTV8lHNF+Ta4YOG0IxnVE/H usL3zvOphXMr5fcRrkMKWn8UZfvl2DJ0HC8RaYUfCH6nZtzSykj6eWjOI2orkxEWuSt/ A4/62jBv3c2lM8SO2LVrkfGWJv8ySsQPJLwG0/MevtP+qIoecQrndFEccdLRKvAeuJHc 1J6g== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h4si1940508ejo.186.2020.04.23.12.22.08; Thu, 23 Apr 2020 12:22:32 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728830AbgDWOti (ORCPT + 99 others); Thu, 23 Apr 2020 10:49:38 -0400 Received: from mga09.intel.com ([134.134.136.24]:43187 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgDWOti (ORCPT ); Thu, 23 Apr 2020 10:49:38 -0400 IronPort-SDR: 7qxIBEgG3WEPfdjusavt1enZ89VFXYhLTAyKlGKf0PlgAZjk9zJsT3llULEZYrmmaAEU8lLUa2 KqW6nVg9tqcg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2020 07:49:37 -0700 IronPort-SDR: MtXdHNMsGlrXrs09Toa9jfSEyfxSQh0dM37YM4Jo6MWNlglMEHwyr9qkNbc1GzIUDncM04qQga /kf0UqA05Nfw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,307,1583222400"; d="scan'208";a="366022929" Received: from linux.intel.com ([10.54.29.200]) by fmsmga001.fm.intel.com with ESMTP; 23 Apr 2020 07:49:36 -0700 Received: from [10.249.228.14] (abudanko-mobl.ccr.corp.intel.com [10.249.228.14]) by linux.intel.com (Postfix) with ESMTP id 028015802C9; Thu, 23 Apr 2020 07:49:33 -0700 (PDT) Subject: Re: [PATCH v2 1/4] perf trace: substitute CAP_SYS_ADMIN with CAP_PERFMON in error message To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Alexander Shishkin , Peter Zijlstra , Ingo Molnar , Andi Kleen , linux-kernel , "selinux@vger.kernel.org" , "linux-security-module@vger.kernel.org" References: <66f2975b-4a69-b428-7dc5-d9aa40b3c673@linux.intel.com> <450d035a-c192-10e5-1c28-664ccae3e46e@linux.intel.com> <20200423132052.GA19437@kernel.org> From: Alexey Budankov Organization: Intel Corp. Message-ID: Date: Thu, 23 Apr 2020 17:49:32 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200423132052.GA19437@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23.04.2020 16:20, Arnaldo Carvalho de Melo wrote: > Em Wed, Apr 22, 2020 at 05:44:02PM +0300, Alexey Budankov escreveu: >> >> Update error message to mention CAP_PERFMON only. CAP_SYS_ADMIN still >> works in keeping with user space backward compatibility approach. > > This will confuse users that build the latest perf to use in older > systems where CAP_PERFMON isn't available, probably we need to, in these > cases, check for the existence of CAP_PERFMON to provide a better > warning message, something like: > > You need CAP_ADMIN or update your kernel and libcap to one that supports > CAP_PERFMON. > > For systems without CAP_PERFMON, while mentioning only CAP_PERFMON for > systems where it is present, right? Right, but this ideal implementation requires more effort, so staying with two caps in the message and letting users decide which one to use looks like a good balance already. Thanks, Alexey