ima: add support for arch specific policies

Builtin IMA policies can be enabled on the boot command line, and replaced
with a custom policy, normally during early boot in the initramfs. Build
time IMA policy rules were recently added. These rules are automatically
enabled on boot and persist after loading a custom policy.

There is a need for yet another type of policy, an architecture specific
policy, which is derived at runtime during kernel boot, based on the
runtime secure boot flags.  Like the build time policy rules, these rules
persist after loading a custom policy.

This patch adds support for loading an architecture specific IMA policy.

Signed-off-by: Nayna Jain <nayna@linux.ibm.com>
Co-Developed-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Nayna Jain
2018-10-09 23:00:36 +05:30
committed by Mimi Zohar
parent c52657d93b
commit 6191706246
2 changed files with 75 additions and 2 deletions

View File

@@ -39,6 +39,11 @@ static inline bool arch_ima_get_secureboot(void)
}
#endif
static inline const char * const *arch_get_ima_policy(void)
{
return NULL;
}
#else
static inline int ima_bprm_check(struct linux_binprm *bprm)
{