Linux-Security-Module Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v3 0/3] perf: make Perf tool aware of SELinux access control
@ 2020-04-30  7:06 Alexey Budankov
  2020-04-30  7:15 ` [PATCH v3 1/3] perf docs: extend CAP_SYS_ADMIN with CAP_PERFMON where needed Alexey Budankov
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Alexey Budankov @ 2020-04-30  7:06 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Alexander Shishkin, Peter Zijlstra,
	Ingo Molnar, Andi Kleen, linux-kernel, selinux,
	linux-security-module


Changes in v3:
- mention "CAP_PERFMON or CAP_SYS_ADMIN" instead of sole CAP_PERFMON or 
  CAP_SYS_ADMIN capability in the docs and messages to support use case
  of newer Perf tool on kernel w/o CAP_PERFMON
- reverted double new line in "No permission to enable %s event.\n\n"
- updated security.txt content with new messages wording

v2: https://lore.kernel.org/lkml/66f2975b-4a69-b428-7dc5-d9aa40b3c673@linux.intel.com/

Changes in v2:
- implemented minor doc and code changes to substitute CAP_SYS_ADMIN
  with CAP_PERFMON capability;
- introduced Perf doc file with instructions on how to enable and use
  perf_event LSM hooks for mandatory access control to perf_event_open()
  syscall;

v1: https://lore.kernel.org/lkml/b8a0669e-36e4-a0e8-fd35-3dbd890d2170@linux.intel.com/

repo: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core
sha1: ee097e8ee56f8867cbbf45fe2a06f6b9e660c39c


Extend Perf tool with the check of /sys/fs/selinux/enforce value and notify 
in case access to perf_event_open() syscall is restricted by the enforced 
SELinux policy settings. See new added security.txt file for exact steps
how the changes look like and how to test the patch set.

---
Alexey Budankov (3):
  perf docs: extend CAP_SYS_ADMIN with CAP_PERFMON where needed
  perf tool: make Perf tool aware of SELinux access control
  perf docs: introduce security.txt file to document related issues

 tools/perf/Documentation/perf-intel-pt.txt |   2 +-
 tools/perf/Documentation/security.txt      | 237 +++++++++++++++++++++
 tools/perf/util/cloexec.c                  |   4 +-
 tools/perf/util/evsel.c                    |  39 ++--
 4 files changed, 264 insertions(+), 18 deletions(-)
 create mode 100644 tools/perf/Documentation/security.txt

-- 
2.24.1


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH v3 0/3] perf: make Perf tool aware of SELinux access control
@ 2020-04-24  6:45 Alexey Budankov
  2020-04-24  6:51 ` [PATCH v3 3/3] perf docs: introduce security.txt file to document related issues Alexey Budankov
  0 siblings, 1 reply; 13+ messages in thread
From: Alexey Budankov @ 2020-04-24  6:45 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Alexander Shishkin, Peter Zijlstra,
	Ingo Molnar, Andi Kleen, linux-kernel, selinux,
	linux-security-module


Changes in v3:
- mention "CAP_PERFMON or CAP_SYS_ADMIN" instead of sole CAP_PERFMON or 
  CAP_SYS_ADMIN capability in the docs and messages to support use case
  of newer Perf tool on kernel w/o CAP_PERFMON
- reverted double new line in "No permission to enable %s event.\n\n"
- updated security.txt content with new messages wording

v2: https://lore.kernel.org/lkml/66f2975b-4a69-b428-7dc5-d9aa40b3c673@linux.intel.com/

Changes in v2:
- implemented minor doc and code changes to substitute CAP_SYS_ADMIN
  with CAP_PERFMON capability;
- introduced Perf doc file with instructions on how to enable and use
  perf_event LSM hooks for mandatory access control to perf_event_open()
  syscall;

v1: https://lore.kernel.org/lkml/b8a0669e-36e4-a0e8-fd35-3dbd890d2170@linux.intel.com/

repo: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git perf/core
sha1: ee097e8ee56f8867cbbf45fe2a06f6b9e660c39c


Extend Perf tool with the check of /sys/fs/selinux/enforce value and notify 
in case access to perf_event_open() syscall is restricted by the enforced 
SELinux policy settings. See new added security.txt file for exact steps
how the changes look like and how to test the patch set.

---
Alexey Budankov (3):
  perf docs: extend CAP_SYS_ADMIN with CAP_PERFMON where needed
  perf tool: make Perf tool aware of SELinux access control
  perf docs: introduce security.txt file to document related issues

 tools/perf/Documentation/perf-intel-pt.txt |   2 +-
 tools/perf/Documentation/security.txt      | 237 +++++++++++++++++++++
 tools/perf/util/cloexec.c                  |   4 +-
 tools/perf/util/evsel.c                    |  39 ++--
 4 files changed, 264 insertions(+), 18 deletions(-)
 create mode 100644 tools/perf/Documentation/security.txt

-- 
2.24.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, back to index

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30  7:06 [PATCH v3 0/3] perf: make Perf tool aware of SELinux access control Alexey Budankov
2020-04-30  7:15 ` [PATCH v3 1/3] perf docs: extend CAP_SYS_ADMIN with CAP_PERFMON where needed Alexey Budankov
2020-04-30  7:15 ` [PATCH v3 2/3] perf tool: make Perf tool aware of SELinux access control Alexey Budankov
2020-05-18 15:58   ` Arnaldo Carvalho de Melo
2020-05-18 16:43     ` Alexey Budankov
2020-05-19  7:34       ` Alexey Budankov
2020-05-19 18:10         ` Arnaldo Carvalho de Melo
2020-04-30  7:16 ` [PATCH v3 3/3] perf docs: introduce security.txt file to document related issues Alexey Budankov
2020-05-18 15:59   ` Arnaldo Carvalho de Melo
2020-05-18 16:50     ` Alexey Budankov
2020-05-18 17:06       ` Arnaldo Carvalho de Melo
2020-05-18  8:07 ` [PATCH v3 0/3] perf: make Perf tool aware of SELinux access control Alexey Budankov
  -- strict thread matches above, loose matches on Subject: below --
2020-04-24  6:45 Alexey Budankov
2020-04-24  6:51 ` [PATCH v3 3/3] perf docs: introduce security.txt file to document related issues Alexey Budankov

Linux-Security-Module Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-security-module/0 linux-security-module/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-security-module linux-security-module/ https://lore.kernel.org/linux-security-module \
		linux-security-module@vger.kernel.org
	public-inbox-index linux-security-module

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-security-module


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git