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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C05B5C76186 for ; Wed, 17 Jul 2019 07:10:56 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9196320665 for ; Wed, 17 Jul 2019 07:10:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="b6LHaYai" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9196320665 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=bsFkggbTDgkftHcX+iZntIVKyhObQ2qycaNPm1TqF88=; b=b6LHaYaiyRo4v5 io6jvXqWucnB9P/bRQC+qJhcKoMKqpGbtqQ6F9He7iBCuQGgTwyvB0Y1wpBE71KaJ5WT6E+It2b/4 3ptzaPmrVHrfeolqGA2DzwjF2deOfd0vUF3Rqex0YaGewZ9tUCealH5MCU1XQQRkAqdAzGS6ow7BF KOg203bwcUYmwIxhjCDe0/ALobowIhGrnlPPbBbQE2Wda05ZWo+NSF16JuEsFcXTxdNmru+guVX+5 T09LL0X2MhTlY9wxiK1gu4g/pBxCr67p0AnjIe4JxAPQHY/gOqEr/UPHjjZF9w9S1uRkOQNjPEmpA Z2TxuSbY/HBOvGNNfc+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hne5P-0000GJ-34; Wed, 17 Jul 2019 07:10:47 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hne5A-0000Eq-Pb for linux-arm-kernel@lists.infradead.org; Wed, 17 Jul 2019 07:10:42 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EC8BB81F1B; Wed, 17 Jul 2019 07:10:30 +0000 (UTC) Received: from krava (unknown [10.43.17.77]) by smtp.corp.redhat.com (Postfix) with SMTP id 32C711001B0E; Wed, 17 Jul 2019 07:10:28 +0000 (UTC) Date: Wed, 17 Jul 2019 09:10:27 +0200 From: Jiri Olsa To: "Lubashev, Igor" Subject: Re: [PATCH 2/3] perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks Message-ID: <20190717071027.GG28722@krava> References: <1562112605-6235-1-git-send-email-ilubashe@akamai.com> <1562112605-6235-3-git-send-email-ilubashe@akamai.com> <20190716084744.GB22317@krava> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 17 Jul 2019 07:10:31 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190717_001034_091716_D5815F17 X-CRM114-Status: GOOD ( 16.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Poirier , Suzuki K Poulose , Peter Zijlstra , "linux-kernel@vger.kernel.org" , Arnaldo Carvalho de Melo , James Morris , Alexander Shishkin , Ingo Molnar , Namhyung Kim , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 16, 2019 at 05:01:26PM +0000, Lubashev, Igor wrote: > I could add another patch to the series for that. Any suggestion for what capability to check for here? it's: if (geteuid() != 0) { pr_err("ftrace only works for root!\n"); return -1 } so I think check for CAP_SYS_ADMIN should be fine in here jirka > > (There is always an alternative to not check for anything and let the kernel refuse to perform actions that the user does not have permissions to perform.) > > - Igor > > -----Original Message----- > From: Jiri Olsa > Sent: Tuesday, July 16, 2019 4:48 AM > Subject: Re: [PATCH 2/3] perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks > > On Tue, Jul 02, 2019 at 08:10:04PM -0400, Igor Lubashev wrote: > > The kernel is using CAP_SYS_ADMIN instead of euid==0 to override > > perf_event_paranoid check. Make perf do the same. > > I see another geteuid check in __cmd_ftrace, > perhaps we should cover this one as well > > jirka _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel