Files
android_kernel_xiaomi_sm8450/include/linux
Tetsuo Handa e4e55b47ed LSM: Revive security_task_alloc() hook and per "struct task_struct" security blob.
We switched from "struct task_struct"->security to "struct cred"->security
in Linux 2.6.29. But not all LSM modules were happy with that change.
TOMOYO LSM module is an example which want to use per "struct task_struct"
security blob, for TOMOYO's security context is defined based on "struct
task_struct" rather than "struct cred". AppArmor LSM module is another
example which want to use it, for AppArmor is currently abusing the cred
a little bit to store the change_hat and setexeccon info. Although
security_task_free() hook was revived in Linux 3.4 because Yama LSM module
wanted to release per "struct task_struct" security blob,
security_task_alloc() hook and "struct task_struct"->security field were
not revived. Nowadays, we are getting proposals of lightweight LSM modules
which want to use per "struct task_struct" security blob.

We are already allowing multiple concurrent LSM modules (up to one fully
armored module which uses "struct cred"->security field or exclusive hooks
like security_xfrm_state_pol_flow_match(), plus unlimited number of
lightweight modules which do not use "struct cred"->security nor exclusive
hooks) as long as they are built into the kernel. But this patch does not
implement variable length "struct task_struct"->security field which will
become needed when multiple LSM modules want to use "struct task_struct"->
security field. Although it won't be difficult to implement variable length
"struct task_struct"->security field, let's think about it after we merged
this patch.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Serge Hallyn <serge@hallyn.com>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Tested-by: Djalal Harouni <tixxdz@gmail.com>
Acked-by: José Bollo <jobol@nonadev.net>
Cc: Paul Moore <paul@paul-moore.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@parisplace.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: James Morris <james.l.morris@oracle.com>
Cc: José Bollo <jobol@nonadev.net>
Signed-off-by: James Morris <james.l.morris@oracle.com>
2017-03-28 11:05:14 +11:00
..
2017-03-07 14:30:38 +01:00
2017-01-24 12:37:43 -08:00
2016-12-22 22:58:37 -05:00
2016-10-19 14:34:36 -04:00
2017-02-10 15:52:24 -05:00
2017-03-02 08:56:04 -07:00
2017-01-25 13:17:47 -05:00
2016-12-08 13:31:11 -05:00
2016-12-27 14:52:47 -05:00
2016-12-08 16:37:33 -08:00
2017-02-24 17:46:55 -08:00
2017-02-04 00:47:59 +01:00
2016-12-05 19:01:16 -05:00
2016-10-28 08:48:16 -06:00
2017-02-27 10:07:47 -08:00
2016-12-05 19:01:16 -05:00
2017-03-12 23:51:34 -07:00
2016-12-25 17:21:22 +01:00
2017-03-22 00:18:22 -07:00
2017-02-11 20:59:41 -05:00
2017-03-22 16:16:17 +01:00
2016-09-14 09:18:09 -06:00
2017-01-05 15:01:55 -06:00
2017-02-01 09:13:45 +01:00
2016-12-12 18:55:06 -08:00
2016-12-25 17:21:23 +01:00
2017-02-24 17:46:57 -08:00
2016-09-27 12:33:47 +02:00
2016-12-06 11:05:46 +01:00
2017-01-12 16:48:26 -05:00
2017-03-01 09:50:58 -08:00
2016-11-16 18:32:02 -05:00
2016-12-12 18:55:07 -08:00
2016-12-06 10:17:03 +02:00
2017-03-02 08:56:04 -07:00
2016-10-31 16:18:30 -04:00
2016-10-14 11:36:59 -07:00
2016-09-27 21:52:00 -04:00
2016-11-15 16:34:27 -08:00
2017-02-13 21:44:09 -05:00
2017-02-27 18:43:46 -08:00
2017-01-09 16:07:38 -05:00
2016-10-05 18:23:36 -04:00
2017-02-03 11:19:34 -05:00
2016-12-25 17:21:22 +01:00
2017-01-10 18:31:55 -08:00
2017-02-03 10:17:02 +01:00
2016-12-09 22:12:21 -05:00
2017-02-10 16:34:17 +00:00
2017-03-21 14:41:46 -07:00
2016-12-12 18:55:08 -08:00
2017-01-11 09:21:41 +01:00
2017-02-02 15:22:18 -05:00