summaryrefslogtreecommitdiff
path: root/security/selinux/ss/sidtab.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-04-09 21:51:06 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-04-09 21:51:06 +0300
commit60144b23c94216b4aca6fba90dca9349183f39e1 (patch)
treed8377c1d2896c0c61b955c24bdbceee7789d21c6 /security/selinux/ss/sidtab.h
parent189fefc7a4f0401d0f799de96b772319a6541fc1 (diff)
parent9ad6e9cb39c66366bf7b9aece114aca277981a1f (diff)
downloadlinux-60144b23c94216b4aca6fba90dca9349183f39e1.tar.xz
Merge tag 'selinux-pr-20210409' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux
Pull selinux fixes from Paul Moore: "Three SELinux fixes. These fix known problems relating to (re)loading SELinux policy or changing the policy booleans, and pass our test suite without problem" * tag 'selinux-pr-20210409' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: fix race between old and new sidtab selinux: fix cond_list corruption when changing booleans selinux: make nslot handling in avtab more robust
Diffstat (limited to 'security/selinux/ss/sidtab.h')
-rw-r--r--security/selinux/ss/sidtab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/security/selinux/ss/sidtab.h b/security/selinux/ss/sidtab.h
index 80c744d07ad6..4eff0e49dcb2 100644
--- a/security/selinux/ss/sidtab.h
+++ b/security/selinux/ss/sidtab.h
@@ -86,6 +86,7 @@ struct sidtab {
u32 count;
/* access only under spinlock */
struct sidtab_convert_params *convert;
+ bool frozen;
spinlock_t lock;
#if CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE > 0
@@ -125,6 +126,9 @@ int sidtab_convert(struct sidtab *s, struct sidtab_convert_params *params);
void sidtab_cancel_convert(struct sidtab *s);
+void sidtab_freeze_begin(struct sidtab *s, unsigned long *flags) __acquires(&s->lock);
+void sidtab_freeze_end(struct sidtab *s, unsigned long *flags) __releases(&s->lock);
+
int sidtab_context_to_sid(struct sidtab *s, struct context *context, u32 *sid);
void sidtab_destroy(struct sidtab *s);