Message ID | 20200420115316.18781-15-acme@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=9mD7=6E=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 AB45C913 for <patchwork-linux-security-module@patchwork.kernel.org>; Mon, 20 Apr 2020 11:54:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 93F792072B for <patchwork-linux-security-module@patchwork.kernel.org>; Mon, 20 Apr 2020 11:54:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383684; bh=9kpEN/lFo7jxjTeW9ri+Y7V19Ly0ojOP0oybPA/ulXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=JhUMUxqJy1TVQ5sNF1qGJEGVUd1QuvMjg96PCXgyiTa8eOyJAXHjlytYaaU+HuczM DrZ2qGtkSQgjXYUoSfcuOsM371E0QwLsQNIs0T6IGRgNtE0A2B21tRQapyMu8Ham0I XZxIhjmQQrKjmjIanAch2VoONb+Uu1gP8z7FdChk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726791AbgDTLyk (ORCPT <rfc822;patchwork-linux-security-module@patchwork.kernel.org>); Mon, 20 Apr 2020 07:54:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:38394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbgDTLyk (ORCPT <rfc822;linux-security-module@vger.kernel.org>); Mon, 20 Apr 2020 07:54:40 -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 618A52071C; Mon, 20 Apr 2020 11:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587383679; bh=9kpEN/lFo7jxjTeW9ri+Y7V19Ly0ojOP0oybPA/ulXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vdstaCdBEPjcbHiBf+qv7kBQk2d78WoaK9DBG7nXclPnVBZQIS/jSCIdibYMBXBdi /vapGFj285gW3uQF8x2sl38L2ryondYx0qsHDsNMEx3/TKkFc7XZOYTMp1eeBJ9Qtk o7R5EIAGKgLsZNmMQrQPxryhBN9ghIkxKJWPlS7U= 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>, 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 14/60] drivers/oprofile: Open access for CAP_PERFMON privileged process Date: Mon, 20 Apr 2020 08:52:30 -0300 Message-Id: <20200420115316.18781-15-acme@kernel.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200420115316.18781-1-acme@kernel.org> References: <20200420115316.18781-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/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index 12ea4a4ad607..6c9edc8bbc95 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c @@ -113,7 +113,7 @@ static int event_buffer_open(struct inode *inode, struct file *file) { int err = -EPERM; - if (!capable(CAP_SYS_ADMIN)) + if (!perfmon_capable()) return -EPERM; if (test_and_set_bit_lock(0, &buffer_opened))