提交 1b8602d0 编写于 作者: R Roberto Sassu 提交者: Zheng Zengkai

evm: Extend evm= with x509. allow_metadata_writes and complete values

hulk inclusion
category: feature
feature: IMA Digest Lists extension
bugzilla: 46797

-------------------------------------------------

Introduce three new values for evm= kernel option:

x509: enable EVM by setting x509 flag;
allow_metadata_writes: permit metadata modificatons;
complete: don't allow further changes of the EVM status.
Signed-off-by: NRoberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: NTianxing Zhang <zhangtianxing3@huawei.com>
Reviewed-by: NJason Yan <yanaijie@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b2582aac
...@@ -1347,9 +1347,13 @@ ...@@ -1347,9 +1347,13 @@
has equivalent usage. See its documentation for details. has equivalent usage. See its documentation for details.
evm= [EVM] evm= [EVM]
Format: { "fix" } Format: { "fix" | "x509" | "allow_metadata_writes" |
Permit 'security.evm' to be updated regardless of "complete" }
current integrity status. fix: permit 'security.evm' to be updated regardless of
current integrity status;
x509: enable EVM by setting x509 flag;
allow_metadata_writes: permit metadata modificatons;
complete: don't allow further changes of the EVM status.
failslab= failslab=
fail_usercopy= fail_usercopy=
......
...@@ -57,16 +57,22 @@ static struct xattr_list evm_config_default_xattrnames[] = { ...@@ -57,16 +57,22 @@ static struct xattr_list evm_config_default_xattrnames[] = {
LIST_HEAD(evm_config_xattrnames); LIST_HEAD(evm_config_xattrnames);
static int evm_fixmode; static int evm_fixmode;
static int __init evm_set_fixmode(char *str) static int __init evm_set_param(char *str)
{ {
if (strncmp(str, "fix", 3) == 0) if (strncmp(str, "fix", 3) == 0)
evm_fixmode = 1; evm_fixmode = 1;
else if (strncmp(str, "x509", 4) == 0)
evm_initialized |= EVM_INIT_X509;
else if (strncmp(str, "allow_metadata_writes", 21) == 0)
evm_initialized |= EVM_ALLOW_METADATA_WRITES;
else if (strncmp(str, "complete", 8) == 0)
evm_initialized |= EVM_SETUP_COMPLETE;
else else
pr_err("invalid \"%s\" mode", str); pr_err("invalid \"%s\" mode", str);
return 0; return 0;
} }
__setup("evm=", evm_set_fixmode); __setup("evm=", evm_set_param);
static void __init evm_init_config(void) static void __init evm_init_config(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册