android_kernel_xiaomi_sm8350/security/selinux/ss
KaiGai Kohei d9250dea3f SELinux: add boundary support and thread context assignment
The purpose of this patch is to assign per-thread security context
under a constraint. It enables multi-threaded server application
to kick a request handler with its fair security context, and
helps some of userspace object managers to handle user's request.

When we assign a per-thread security context, it must not have wider
permissions than the original one. Because a multi-threaded process
shares a single local memory, an arbitary per-thread security context
also means another thread can easily refer violated information.

The constraint on a per-thread security context requires a new domain
has to be equal or weaker than its original one, when it tries to assign
a per-thread security context.

Bounds relationship between two types is a way to ensure a domain can
never have wider permission than its bounds. We can define it in two
explicit or implicit ways.

The first way is using new TYPEBOUNDS statement. It enables to define
a boundary of types explicitly. The other one expand the concept of
existing named based hierarchy. If we defines a type with "." separated
name like "httpd_t.php", toolchain implicitly set its bounds on "httpd_t".

This feature requires a new policy version.
The 24th version (POLICYDB_VERSION_BOUNDARY) enables to ship them into
kernel space, and the following patch enables to handle it.

Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2008-08-29 00:33:33 +10:00
..
avtab.c selinux: Unify for- and while-loop style 2008-08-15 08:40:47 +10:00
avtab.h SELinux: add more validity checks on policy load 2007-11-08 08:56:23 +11:00
conditional.c selinux: Unify for- and while-loop style 2008-08-15 08:40:47 +10:00
conditional.h selinux: conditional expression type validation was off-by-one 2008-08-07 08:56:16 +10:00
constraint.h
context.h selinux: support deferred mapping of contexts 2008-07-14 15:01:34 +10:00
ebitmap.c selinux: Unify for- and while-loop style 2008-08-15 08:40:47 +10:00
ebitmap.h
hashtab.c selinux: Unify for- and while-loop style 2008-08-15 08:40:47 +10:00
hashtab.h SELinux: hashtab.h whitespace, syntax, and other cleanups 2008-04-28 09:29:04 +10:00
Makefile
mls_types.h SELinux: mls_types.h whitespace, syntax, and other cleanups 2008-04-28 09:29:06 +10:00
mls.c SELinux: Trivial minor fixes that change C null character style 2008-08-05 10:55:30 +10:00
mls.h selinux: support deferred mapping of contexts 2008-07-14 15:01:34 +10:00
policydb.c SELinux: add boundary support and thread context assignment 2008-08-29 00:33:33 +10:00
policydb.h SELinux: add boundary support and thread context assignment 2008-08-29 00:33:33 +10:00
services.c SELinux: add boundary support and thread context assignment 2008-08-29 00:33:33 +10:00
services.h
sidtab.c selinux: Unify for- and while-loop style 2008-08-15 08:40:47 +10:00
sidtab.h selinux: support deferred mapping of contexts 2008-07-14 15:01:34 +10:00
symtab.c
symtab.h