aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/services.h
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2019-12-13 15:28:38 -0500
committerPaul Moore <paul@paul-moore.com>2019-12-18 21:26:06 -0500
commit5c108d4e18f80be01965792726c81b105fbd677a (patch)
tree5232e3ccd8383887072b4f8f3f7587e8ff237c99 /security/selinux/ss/services.h
parentselinux: clean up selinux_enabled/disabled/enforcing_boot (diff)
downloadlinux-dev-5c108d4e18f80be01965792726c81b105fbd677a.tar.xz
linux-dev-5c108d4e18f80be01965792726c81b105fbd677a.zip
selinux: randomize layout of key structures
Randomize the layout of key selinux data structures. Initially this is applied to the selinux_state, selinux_ss, policydb, and task_security_struct data structures. NB To test/use this mechanism, one must install the necessary build-time dependencies, e.g. gcc-plugin-devel on Fedora, and enable CONFIG_GCC_PLUGIN_RANDSTRUCT in the kernel configuration. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov> Reviewed-by: Kees Cook <keescook@chromium.org> [PM: double semi-colon fixed] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/services.h')
-rw-r--r--security/selinux/ss/services.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/services.h b/security/selinux/ss/services.h
index fc40640a9725..c5896f39e8f6 100644
--- a/security/selinux/ss/services.h
+++ b/security/selinux/ss/services.h
@@ -31,7 +31,7 @@ struct selinux_ss {
struct selinux_map map;
struct page *status_page;
struct mutex status_lock;
-};
+} __randomize_layout;
void services_compute_xperms_drivers(struct extended_perms *xperms,
struct avtab_node *node);