summaryrefslogtreecommitdiffstats
path: root/security/selinux/include
diff options
context:
space:
mode:
authorOndrej Mosnacek <omosnace@redhat.com>2020-08-27 18:27:53 +0200
committerPaul Moore <paul@paul-moore.com>2020-08-31 16:00:14 +0200
commit66ccd2560affc6e653ef7372ea36fb825743d186 (patch)
tree45914d8e221deb583c42bb24e84bc8f4eca0c51e /security/selinux/include
parentselinux: move policy mutex to selinux_state, use in lockdep checks (diff)
downloadlinux-66ccd2560affc6e653ef7372ea36fb825743d186.tar.xz
linux-66ccd2560affc6e653ef7372ea36fb825743d186.zip
selinux: simplify away security_policydb_len()
Remove the security_policydb_len() calls from sel_open_policy() and instead update the inode size from the size returned from security_read_policy(). Since after this change security_policydb_len() is only called from security_load_policy(), remove it entirely and just open-code it there. Also, since security_load_policy() is always called with policy_mutex held, make it dereference the policy pointer directly and drop the unnecessary RCU locking. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/include')
-rw-r--r--security/selinux/include/security.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h
index bbbf7141ccdb..cbdd3c7aff8b 100644
--- a/security/selinux/include/security.h
+++ b/security/selinux/include/security.h
@@ -219,7 +219,6 @@ void selinux_policy_cancel(struct selinux_state *state,
struct selinux_policy *policy);
int security_read_policy(struct selinux_state *state,
void **data, size_t *len);
-size_t security_policydb_len(struct selinux_state *state);
int security_policycap_supported(struct selinux_state *state,
unsigned int req_cap);