From e7c021c73967ee59bd66a9653c51f71da78ed337 Mon Sep 17 00:00:00 2001 From: xuce Date: Mon, 19 May 2025 19:16:08 +0800 Subject: [PATCH] moidfy ima_rot doc --- ...50\346\210\267\346\226\207\346\241\243.md" | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git "a/docs/zh/docs/Administration/\345\206\205\346\240\270\345\217\257\344\277\241\346\240\271\346\241\206\346\236\266\347\224\250\346\210\267\346\226\207\346\241\243.md" "b/docs/zh/docs/Administration/\345\206\205\346\240\270\345\217\257\344\277\241\346\240\271\346\241\206\346\236\266\347\224\250\346\210\267\346\226\207\346\241\243.md" index f2835d168..cd2754bb2 100644 --- "a/docs/zh/docs/Administration/\345\206\205\346\240\270\345\217\257\344\277\241\346\240\271\346\241\206\346\236\266\347\224\250\346\210\267\346\226\207\346\241\243.md" +++ "b/docs/zh/docs/Administration/\345\206\205\346\240\270\345\217\257\344\277\241\346\240\271\346\241\206\346\236\266\347\224\250\346\210\267\346\226\207\346\241\243.md" @@ -1,4 +1,4 @@ -# 内核可信根框架 +# 内核可信根框架 ## 概述 @@ -27,7 +27,7 @@ 本特性目前支持哈希扩展类型的度量可信根,即采用若干个度量寄存器(对应一种或多种哈希算法)采用如下形式记录多个度量结果: -``` +```bash value_new = hash(value_old | measure_result) ``` @@ -45,15 +45,15 @@ value_new = hash(value_old | measure_result) 对于每个可信根实例,需要定义如下结构体: -``` +```c struct ima_rot { - const char *name; - int nr_allocated_banks; - struct tpm_bank_info *allocated_banks; + const char *name; + int nr_allocated_banks; + struct tpm_bank_info *allocated_banks; - int (*init)(struct ima_rot *rot); - int (*extend)(struct tpm_digest *digests_arg, const void *args); - int (*calc_boot_aggregate)(struct ima_digest_data *hash); + int (*init)(struct ima_rot *rot); + int (*extend)(struct tpm_digest *digests_arg, const void *args); + int (*calc_boot_aggregate)(struct ima_digest_data *hash); }; ``` @@ -82,11 +82,26 @@ struct ima_rot { 以用户在机密虚机中配置IMA度量使用virtCCA可信根为例,用户可在启动参数中添加如下参数: -``` +```bash ima_rot=virtcca ``` **注意:** 如果环境中仅virtcca可信根可用,无其他可信根(如vTPM)可用,也可不配置该参数。 -配置完成后,首条IMA度量日志(boot aggregate日志)即为virtCCA的RIM的中存储的度量值;每条IMA度量日志的哈希值将在virtCCA的REM[0]中进行哈希扩展。用户可以基于virtCCA提供的远程证明软件栈实现机密虚机中的应用度量结果校验。 +配置完成后,首条IMA度量日志(boot aggregate日志)即为virtCCA的RIM的中存储的度量值;后续扩展IMA度量日志时,用户必须通过自定义IMA策略来指定virtCCA扩展的寄存器,例如通过pcr=4将度量值扩展到virtCCA的REM[3]中,这里给出ima策略示例(该策略表示用来度量所有可执行程序,并将度量值扩展到REM[3]中),其他具体配置可参考文档[**内核完整性度量(IMA)** ](内核完整性度量(IMA).md)。 + +```bash +dont_measure fsmagic=0x9fa0 +dont_measure fsmagic=0x62656572 +dont_measure fsmagic=0x64626720 +dont_measure fsmagic=0x1021994 +dont_measure fsmagic=0x1cd1 +dont_measure fsmagic=0x42494e4d +dont_measure fsmagic=0x73636673 +dont_measure fsmagic=0xf97cff8c +dont_measure fsmagic=0x27e0eb +dont_measure fsmagic=0x6e736673 +measure func=BPRM_CHECK mask=MAY_EXEC pcr=4 +``` +用户可以基于virtCCA提供的远程证明软件栈实现机密虚机中的应用度量结果校验。 -- Gitee