Remove the lockdown test
PATCH 1/1 Remove the lockdown test
The lockdown class is about to be removed from the mainline kernel due to the difficulty of ensuring that a relevant subject context is available during each call to the locked_down hook.
Hence remove the lockdown test from the testsuite.
Note that the module_load and perf_event test policy still conditionally provides rules involving the lockdown class so that these tests can still work on older kernels.
--- policy/Makefile | 3 ++- policy/test_lockdown.te | 54 ----------------------------------------- policy/test_policy.if | 17 ------------- tests/Makefile | 4 --- tests/lockdown/Makefile | 2 -- tests/lockdown/test | 47 ----------------------------------- 6 files changed, 2 insertions(+), 125 deletions(-) delete mode 100644 policy/test_lockdown.te delete mode 100644 tests/lockdown/Makefile delete mode 100755 tests/lockdown/test
policy/Makefile +2 -1
@@ -143,8 +143,9 @@ TARGETS += test_perf_event.te endif endif +# Older kernels may still have the legacy lockdown class, so we need to add +# the appropriate rules when the policy declares it. ifeq ($(shell grep -q lockdown $(POLDEV)/include/support/all_perms.spt && echo true),true) -TARGETS += test_lockdown.te export M4PARAM += -Dlockdown_defined endif
policy/test_lockdown.te deleted +0 -54
54 lines not on this page · raw message
policy/test_policy.if +0 -17
@@ -87,20 +87,3 @@ interface(`userdom_search_admin_dir', ` ifdef(`kernel_request_load_module', `', ` dnl interface(`kernel_request_load_module', `') ') - -# We need to open-code these interfaces, because the system-provided ones will -# likely grant the lockdown permissions we want to test. -interface(`testsuite_read_debugfs_nolockdown',` - gen_require(` - type debugfs_t; - ') - - read_files_pattern($1, debugfs_t, debugfs_t) -') -interface(`testsuite_read_tracefs_nolockdown',` - gen_require(` - type tracefs_t; - ') - - read_files_pattern($1, tracefs_t, tracefs_t) -')
tests/Makefile +0 -4
@@ -112,10 +112,6 @@ SUBDIRS += perf_event endif endif -ifeq ($(shell grep -q lockdown $(POLDEV)/include/support/all_perms.spt && echo true),true) -SUBDIRS += lockdown -endif - ifeq ($(shell grep -q filesystem $(POLDEV)/include/support/all_perms.spt && echo true),true) SUBDIRS += $(addprefix filesystem/,$(FILESYSTEMS)) ifeq ($(shell grep -q all_filesystem_perms.*watch $(POLDEV)/include/support/all_perms.spt && echo true),true)
tests/lockdown/Makefile deleted +0 -2
@@ -1,2 +0,0 @@ -all: -clean:
tests/lockdown/test deleted +0 -47
47 lines not on this page · raw message
Signature · 1 line
2.31.1
Quoted 11 lines · Ondrej Mosnacek
The lockdown class is about to be removed from the mainline kernel due to the difficulty of ensuring that a relevant subject context is available during each call to the
locked_downhook.Hence remove the lockdown test from the testsuite.
Note that the
module_loadandperf_eventtest policy still conditionally provides rules involving the lockdown class so that these tests can still work on older kernels.Signed-off-by Ondrej Mosnacek <[email protected]>
The removal is now merged in next, so I went ahead and applied this:
https://github.com/SELinuxProject/selinux-testsuite/commit/bba37c007a0c7a12dd603bdac5e4431796f3e2e1
Signature · 3 lines
Ondrej Mosnacek Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.