Message ID | 20200413165203.1816-13-acme@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=fcCn=55=vger.kernel.org=linux-security-module-owner@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 372791392 for <patchwork-linux-security-module@patchwork.kernel.org>; Mon, 13 Apr 2020 16:53:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 200892084D for <patchwork-linux-security-module@patchwork.kernel.org>; Mon, 13 Apr 2020 16:53:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586796801; bh=PXwArPyrCB+9UYBajG3cuzXYyMjKBkArgtx7/t80yDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2EYqxGGRbQUL6YX059Of5C0td+T7qxjIYzsrpz6M+knyh83T2bD63EimazJ7vJIi/ LecRw+MB/SMgsyXno4O3D4FWKDN81rETzyPxMO+EyphOu2dHbb+TV+VrbSFCwi8ngO s1zxKp1CnT/V6RZlLdSSXShIWv4VygJIbA+gpoTU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731958AbgDMQxT (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Mon, 13 Apr 2020 12:53:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:45460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731956AbgDMQxQ (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Mon, 13 Apr 2020 12:53:16 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 62EF7208E0; Mon, 13 Apr 2020 16:53:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586796795; bh=PXwArPyrCB+9UYBajG3cuzXYyMjKBkArgtx7/t80yDQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0Ye3QTeaS86gUwQ6vaqghWKUPtsyPWvtMoV/T9srtDd688AuzzYOnmOfSSyvNb1NZ pSnQ5WUa2265qzabJQcZ4l3PD7KRbGUKgZcmm0QHRyhkVj0NcQ8eVgFAaHIehQ83Uw 0LGYeTc2nhKKtj6ANWzZ4NMou+5ERcZbUKkFpZBk= From: Arnaldo Carvalho de Melo <acme@kernel.org> To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de> Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Clark Williams <williams@redhat.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Alexey Budankov <alexey.budankov@linux.intel.com>, James Morris <jamorris@linux.microsoft.com>, Helge Deller <deller@gmx.de>, Alexei Starovoitov <ast@kernel.org>, Andi Kleen <ak@linux.intel.com>, Igor Lubashev <ilubashe@akamai.com>, Jiri Olsa <jolsa@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Serge Hallyn <serge@hallyn.com>, Song Liu <songliubraving@fb.com>, Stephane Eranian <eranian@google.com>, intel-gfx@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-man@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, Arnaldo Carvalho de Melo <acme@redhat.com> Subject: [PATCH 12/26] parisc/perf: open access for CAP_PERFMON privileged process Date: Mon, 13 Apr 2020 13:51:49 -0300 Message-Id: <20200413165203.1816-13-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200413165203.1816-1-acme@kernel.org> References: <20200413165203.1816-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: <linux-security-module.vger.kernel.org> |
Series |
None
|
expand
|
diff --git a/arch/parisc/kernel/perf.c b/arch/parisc/kernel/perf.c index e1a8fee3ad49..d46b6709ec56 100644 --- a/arch/parisc/kernel/perf.c +++ b/arch/parisc/kernel/perf.c @@ -300,7 +300,7 @@ static ssize_t perf_write(struct file *file, const char __user *buf, else return -EFAULT; - if (!capable(CAP_SYS_ADMIN)) + if (!perfmon_capable()) return -EACCES; if (count != sizeof(uint32_t))