Skip to contentSkip to conversation

selftests/perf_events: test text_poke permissions

PATCH New Sahaj Chaudhari 1 participant 1 message Oct 7 Kselftest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/perf_events: test text_poke permissions

Verify that a privileged task can open a text-poke perf event while an unprivileged task is denied.

Skip if text-poke is unsupported or perf settings prevent the check.

---
 .../testing/selftests/perf_events/.gitignore  |  1 +
 tools/testing/selftests/perf_events/Makefile  |  2 +-
 .../perf_events/text_poke_permissions.c       | 99 +++++++++++++++++++
 3 files changed, 101 insertions(+), 1 deletion(-)
 create mode 100644 tools/testing/selftests/perf_events/text_poke_permissions.c
tools/testing/selftests/perf_events/.gitignore +1 -0
index 4931b3b6bbd39..2a475f176feed 100644
@@ -3,3 +3,4 @@ sigtrap_threads
 remove_on_exec
 watermark_signal
 mmap
+text_poke_permissions
tools/testing/selftests/perf_events/Makefile +1 -1
index 2e5d85770dfea..02aa6e7c6e9a2 100644
@@ -2,5 +2,5 @@
 CFLAGS += -Wl,-no-as-needed -Wall $(KHDR_INCLUDES)
 LDFLAGS += -lpthread
 
-TEST_GEN_PROGS := sigtrap_threads remove_on_exec watermark_signal mmap
+TEST_GEN_PROGS := sigtrap_threads remove_on_exec watermark_signal mmap text_poke_permissions
 include ../lib.mk
tools/testing/selftests/perf_events/text_poke_permissions.c new file +99 -0

99 lines not on this page · raw message

Signature · 1 line
2.43.0