selftests/perf_events: test text_poke permissions
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.
Signed-off-by Sahaj Chaudhari <[email protected]>
--- .../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
@@ -3,3 +3,4 @@ sigtrap_threads remove_on_exec watermark_signal mmap +text_poke_permissions
tools/testing/selftests/perf_events/Makefile +1 -1
@@ -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