All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] Add all Chinese translations in the tpm directory
@ 2025-01-23  5:17 Shuo Zhao
  2025-01-23  5:17 ` [PATCH v3 1/7] docs/zh_CN: Add tpm index Chinese translation Shuo Zhao
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Add all Chinese translations in the tpm directory.

Shuo Zhao (7):
  docs/zh_CN: Add tpm index Chinese translation
  docs/zh_CN: Add tpm tpm_event_log Chinese translation
  docs/zh_CN: Add tpm tpm-security Chinese translation
  docs/zh_CN: Add tpm tpm_tis Chinese translation
  docs/zh_CN: Add tpm tpm_vtpm_proxy Chinese translation
  docs/zh_CN: Add tpm xen-tpmfront Chinese translation
  docs/zh_CN: Add tpm tpm_ftpm_tee Chinese translation

 .../translations/zh_CN/security/index.rst     |   2 +-
 .../translations/zh_CN/security/tpm/index.rst |  20 +++
 .../zh_CN/security/tpm/tpm-security.rst       | 151 ++++++++++++++++++
 .../zh_CN/security/tpm/tpm_event_log.rst      |  49 ++++++
 .../zh_CN/security/tpm/tpm_ftpm_tee.rst       |  31 ++++
 .../zh_CN/security/tpm/tpm_tis.rst            |  43 +++++
 .../zh_CN/security/tpm/tpm_vtpm_proxy.rst     |  51 ++++++
 .../zh_CN/security/tpm/xen-tpmfront.rst       | 114 +++++++++++++
 8 files changed, 460 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/index.rst
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm-security.rst
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_tis.rst
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst
 create mode 100644 Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst

-- 
2.47.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3 1/7] docs/zh_CN: Add tpm index Chinese translation
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
@ 2025-01-23  5:17 ` Shuo Zhao
  2025-01-24  6:58   ` Yanteng Si
  2025-01-23  5:17 ` [PATCH v3 2/7] docs/zh_CN: Add tpm tpm_event_log " Shuo Zhao
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Translate .../security/tpm/index.rst into Chinese

Update the translation through commit 1d479e3cd652
("Documentation: tpm: Add TPM security docs toctree entry")

Reviewed-by: Alex Shi <alexs@kernel.org>
Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
---
 .../translations/zh_CN/security/index.rst     |  2 +-
 .../translations/zh_CN/security/tpm/index.rst | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/index.rst

diff --git a/Documentation/translations/zh_CN/security/index.rst b/Documentation/translations/zh_CN/security/index.rst
index 38e9ce7cf471..0aacecabf0c0 100644
--- a/Documentation/translations/zh_CN/security/index.rst
+++ b/Documentation/translations/zh_CN/security/index.rst
@@ -19,6 +19,7 @@
    lsm
    sak
    siphash
+   tpm/index
    digsig
    landlock
 
@@ -29,6 +30,5 @@ TODOLIST:
 * lsm-development
 * SCTP
 * self-protection
-* tpm/index
 * secrets/index
 * ipe
diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
new file mode 100644
index 000000000000..a55d0a7bbc0f
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/tpm/index.rst
@@ -0,0 +1,22 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/security/tpm/index.rst
+
+:翻译:
+ 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
+
+================
+可信平台模块文档
+================
+
+.. toctree::
+
+
+TODOLIST:
+*   tpm_event_log
+*   tpm-security
+*   tpm_tis
+*   tpm_vtpm_proxy
+*   xen-tpmfront
+*   tpm_ftpm_tee
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 2/7] docs/zh_CN: Add tpm tpm_event_log Chinese translation
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
  2025-01-23  5:17 ` [PATCH v3 1/7] docs/zh_CN: Add tpm index Chinese translation Shuo Zhao
@ 2025-01-23  5:17 ` Shuo Zhao
  2025-01-24  7:01   ` Yanteng Si
  2025-01-23  5:17 ` [PATCH v3 3/7] docs/zh_CN: Add tpm tpm-security " Shuo Zhao
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Translate .../security/tpm/tpm_event_log.rst into Chinese.

Update the translation through commit 2ef5a7f1482c
("tpm: Document UEFI event log quirks")

Reviewed-by: Alex Shi <alexs@kernel.org>
Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
---
 .../translations/zh_CN/security/tpm/index.rst |  2 +-
 .../zh_CN/security/tpm/tpm_event_log.rst      | 49 +++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst

diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
index a55d0a7bbc0f..f324bd4dd093 100644
--- a/Documentation/translations/zh_CN/security/tpm/index.rst
+++ b/Documentation/translations/zh_CN/security/tpm/index.rst
@@ -12,9 +12,9 @@
 
 .. toctree::
 
+   tpm_event_log
 
 TODOLIST:
-*   tpm_event_log
 *   tpm-security
 *   tpm_tis
 *   tpm_vtpm_proxy
diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst b/Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst
new file mode 100644
index 000000000000..9c173291ac3e
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst
@@ -0,0 +1,49 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/security/tpm/tpm_event_log.rst
+
+:翻译:
+ 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
+
+===========
+TPM事件日志
+===========
+
+本文档简要介绍了什么是TPM日志,以及它是如何从预启动固件移交到操作系统的。
+
+介绍
+====
+
+预启动固件维护一个事件日志,每当它将某些内容哈希到任何一个PCR寄存器时,该
+日志会添加新条目。这些事件按类型分类,并包含哈希后的PCR寄存器值。通常,预
+启动固件会哈希那些即将移交执行权或与启动过程相关的组件。
+
+其主要应用是远程认证,而它之所以有用的原因在[1]中第一部分很好地阐述了:
+
+认证用于向挑战者提供有关平台状态的信息。然而,PCR的内容难以解读;因此,当
+PCR内容附有测量日志时,认证通常会更有用。尽管测量日志本身并不可信,但它们
+包含比PCR内容更为丰富的信息集。PCR内容用于对测量日志进行验证。
+
+UEFI事件日志
+============
+
+UEFI提供的事件日志有一些比较奇怪的特性。
+
+在调用ExitBootServices()之前,Linux EFI引导加载程序会将事件日志复制到由
+引导加载程序自定义的配置表中。不幸的是,通过ExitBootServices()生成的事件
+并不会出现在这个表里。
+
+固件提供了一个所谓的最终事件配置表排序来解决这个问题。事件会在第一次调用
+EFI_TCG2_PROTOCOL.GetEventLog()后被镜像到这个表中。
+
+这引出了另一个问题:无法保证它不会在 Linux EFI stub 开始运行之前被调用。
+因此,在 stub 运行时,它需要计算并将最终事件表的大小保存到自定义配置表中,
+以便TPM驱动程序可以在稍后连接来自自定义配置表和最终事件表的两个事件日志时
+跳过这些事件。
+
+参考文献
+========
+
+- [1] https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/
+- [2] The final concatenation is done in drivers/char/tpm/eventlog/efi.c
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 3/7] docs/zh_CN: Add tpm tpm-security Chinese translation
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
  2025-01-23  5:17 ` [PATCH v3 1/7] docs/zh_CN: Add tpm index Chinese translation Shuo Zhao
  2025-01-23  5:17 ` [PATCH v3 2/7] docs/zh_CN: Add tpm tpm_event_log " Shuo Zhao
@ 2025-01-23  5:17 ` Shuo Zhao
  2025-01-24  9:19   ` Yanteng Si
  2025-01-23  5:17 ` [PATCH v3 4/7] docs/zh_CN: Add tpm tpm_tis " Shuo Zhao
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Translate .../security/tpm/tpm-security.rst into Chinese

Update the translation through commit 3d2daf9d592e
("Documentation: add tpm-security.rst")

Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
---
 .../translations/zh_CN/security/tpm/index.rst |   2 +-
 .../zh_CN/security/tpm/tpm-security.rst       | 151 ++++++++++++++++++
 2 files changed, 152 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm-security.rst

diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
index f324bd4dd093..46cdf7c1a1c1 100644
--- a/Documentation/translations/zh_CN/security/tpm/index.rst
+++ b/Documentation/translations/zh_CN/security/tpm/index.rst
@@ -13,9 +13,9 @@
 .. toctree::
 
    tpm_event_log
+   tpm-security
 
 TODOLIST:
-*   tpm-security
 *   tpm_tis
 *   tpm_vtpm_proxy
 *   xen-tpmfront
diff --git a/Documentation/translations/zh_CN/security/tpm/tpm-security.rst b/Documentation/translations/zh_CN/security/tpm/tpm-security.rst
new file mode 100644
index 000000000000..26818d28c98f
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/tpm/tpm-security.rst
@@ -0,0 +1,151 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/security/tpm/tpm-security.rst
+
+:翻译:
+ 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
+
+TPM安全
+=======
+
+本文档的目的是描述我们如何使内核使用TPM在面对外部窥探和数据包篡改
+攻击(文献中称为被动和主动中间人攻击)时保持合理的稳健性。当前的
+安全文档适用于TPM2.0。
+
+介绍
+----
+
+TPM通常是一个通过某种低带宽总线连接到PC的独立芯片。虽然有一些
+例外,例如Intel PTT,它是运行在靠近CPU的软件环境中的软件TPM,
+容易受到不同类型的攻击,但目前大多数强化的安全环境要求使用独立
+硬件TPM,这是本文讨论的使用场景。
+
+总线上的窥探和篡改攻击
+----------------------
+
+当前的技术状态允许使用 `TPM Genie`_ 硬件中间人,这是一种简单的外部设备,可以在
+任何系统或笔记本电脑上几秒钟内安装。最近成功演示了针对 `Windows Bitlocker TPM`_
+系统的攻击。最近同样的攻击针对 `基于TPM的Linux磁盘加密`_ 方案也遭到了同样的攻击。
+下一阶段的研究似乎是入侵总线上现有的设备以充当中间人,因此攻击者需要物理访问几
+秒钟的要求可能不再存在。然而,本文档的目标是尽可能在这种环境下保护TPM的机密性和
+完整性,并尝试确保即使我们不能防止攻击,至少可以检测到它。
+
+不幸的是,大多数TPM功能,包括硬件重置功能,都能被能够访问总线的攻击
+者控制,因此下面我们将讨论一些可能出现的干扰情况。
+
+测量(PCR)完整性
+-----------------
+
+由于攻击者可以向TPM发送自己的命令,他们可以发送任意的PCR扩展,从而破
+坏测量系统,这将是一种烦人的拒绝服务攻击。然而,针对密封到信任测量中
+的实体,有两类更严重的攻击。
+
+1. 攻击者可以拦截来自系统的所有PCR扩展,并完全替换为自己的值,产生
+   一个未篡改状态的重现,这会使PCR测量证明状态是可信的,并释放密钥。
+
+2. 攻击者可能会在某个时刻重置TPM,清除PCR,然后发送自己的测量,从而
+   有效地覆盖TPM已经完成的启动时间测量。
+
+第一种攻击可以通过始终对PCR扩展和读取命令进行HMAC保护来防止,这意味着
+如果没有在响应中产生可检测的HMAC失败,则测量值无法被替换。然而第二种
+攻击只能通过依赖某种机制来检测,这种机制会在TPM重置后发生变化。
+
+秘密保护
+--------
+
+某些进出TPM的信息,如密钥密封、私钥导入和随机数生成容易被拦截,而仅仅
+使用HMAC保护无法防止这种情况。因此,对于这些类型的命令,我们必须使用
+请求和响应加密来防止秘密信息的泄露。
+
+与TPM建立初始信任
+-----------------
+
+为了从一开始就提供安全性,必须建立一个初始的共享或非对称秘密,并且该
+秘钥必须对攻击者不可知。最明显的途径是使用背书和存储种子,这些可以用
+来派生非对称密钥。然而,使用这些密钥很困难,因为将它们传递给内核的唯
+一方法是通过命令行,这需要在启动系统中进行广泛的支持,而且无法保证任
+何一个层次不会有任何形式的授权。
+
+Linux内核选择的机制是从空种子使用标准的存储种子参数派生出主椭圆曲线
+密钥。空种子有两个优势:首先该层次物理上无法具有授权,因此我们始终可
+以使用它;其次空种子在TPM重置时会发生变化,这意味着如果我们在当天开始
+时基于空种子建立信任,如果TPM重置且种子变化,则所有派生的密钥进行加盐
+处理的会话都将失败。
+
+显然,在没有任何其他共享秘密的情况下使用空种子,我们必须创建并读取初始
+公钥,这当然可能会被总线中间人拦截并替换。然而,TPM有一个密钥认证机制
+(使用EK背书证书,创建认证身份密钥,并用该密钥认证空种子主密钥),但由
+于它过于复杂,无法在内核中运行,因此我们保留空主密钥名称的副本,通过
+sysfs导出,以便用户空间在启动时进行完整的认证。这里的明确保证是,如果空
+主密钥认证成功,那么从当天开始的所有TPM交易都是安全的;如果认证失败,则
+说明系统上有中间人(并且任何在启动期间使用的秘密可能已被泄露)。
+
+信任堆叠
+--------
+
+在当前的空主密钥场景中,TPM必须在交给下一个使用者之前完全清除。然而,
+内核将派生出的空种子密钥的名称传递给用户空间,用户空间可以通过认证来
+验证该名称。因此,这种名称传递链也可以用于各个启动组件之间(通过未指
+定的机制)。例如grub可以使用空种子方案来实现安全性,并将名称交给内核。
+内核可以派生出密钥和名称,并确定如果它们与交接的版本不同,则表示发生
+了篡改。因此可以通过名称传递将任意启动组件(从UEFI到grub到内核)串联
+起来,只要每个后续组件知道如何收集该名称,并根据其派生的密钥进行验证。
+
+会话属性
+--------
+
+所有内核使用的TPM命令都允许会话。HMAC会话可用于检查请求和响应的完整性,
+而解密和加密标志可用于保护参数和响应。HMAC和加密密钥通常是从共享授权秘
+钥推导出来的,但对于许多内核操作来说,这些密钥是已知的(通常为空)。因
+此内核使用空主密钥作为盐密钥来创建每个HMAC会话,这样就为会话密钥的派生
+提供了加密输入。因此内核仅需创建一次空主密钥(作为一个易失的TPM句柄),
+并将其保存在tpm_chip中,用于每次在内核中使用TPM时。由于内核资源管理器缺
+乏去间隙化,当前每次操作都需要创建和销毁会话,但未来可能会将单个会话重用
+用于内核中的HMAC、加密和解密会话。
+
+保护类型
+--------
+
+对于每个内核操作,我们使用空主密钥加盐的HMAC来保护完整性。此外我们使用参数
+加密来保护密钥密封,并使用参数解密来保护密钥解封和随机数生成。
+
+空主密钥认证在用户空间的实现
+============================
+
+每个TPM都会附带几个X.509证书,通常用于主背书密钥。本文档假设存在椭圆曲线
+版本的证书,位于01C00002,但也同样适用于RSA证书(位于01C00001)。
+
+认证的第一步是使用 `TCG EK Credential Profile`_ 模板进行主密钥的创建,该
+模板允许将生成的主密钥与证书中的主密钥进行比较(公钥必须匹配)。需要注意
+的是,生成EK主密钥需要EK层级密码,但EC主密钥的预生成版本应位于81010002,
+并且可以无需密钥授权对其执行TPM2_ReadPublic()操作。接下来,证书本身必须
+经过验证,以确保其可以追溯到制造商根证书(该根证书应公开在制造商网站上)。
+完成此步骤后将在TPM内部生成一个认证密钥(AK),并使用TPM2_MakeCredential、
+AK的名称和EK公钥加密一个秘密。然后TPM执行TPM2_ActivateCredential,只有在
+TPM、EK和AK之间的绑定关系成立时,才能恢复秘密。现在,生成的AK可以用于对由
+内核导出的空主密钥进行认证。由于TPM2_MakeCredential/ActivateCredential操作
+相对复杂,下面将描述一种涉及外部生成私钥的简化过程。
+
+这个过程是通常基于隐私CA认证过程的简化缩写。假设此时认证由TPM所有者进行,
+所有者只能访问所有者层次。所有者创建一个外部公/私钥对(假设是椭圆曲线),
+并使用内部包装过程将私钥进行封装以便导入,该私钥被其父级由EC派生的存储主密
+钥保护。TPM2_Import()操作使用一个以EK主密钥为盐值的参数解密HMAC会话(这也不
+需要EK密钥授权),意味着内部封装密钥是加密参数,因此除非TPM拥有认证的EK,否
+则无法执行导入操作。如果该命令成功执行并且HMAC在返回时通过验证,我们就知道
+我们有一个只为认证TPM加载的私钥副本。现在该密钥已加载到TPM中,并且存储主密
+钥已被清除(以释放空间用于生成空密钥)。
+
+现在根据 `TCG TPM v2.0 Provisioning Guidance`_ 中的存储配置生成空EC主密钥;
+该密钥的名称(即公钥区域的哈希值)被计算出来并与内核在/sys/class/tpm/tpm0/null_name
+中提供的空种子名称进行比较。如果名称不匹配,TPM就被认为是受损的。如果名称匹配,
+用户执行TPM2_Certify(),使用空主密钥作为对象句柄,使用加载的私钥作为签名句柄,
+并提供随机的合格数据。返回的certifyInfo的签名将与加载的私钥的公钥部分进行验证,
+并检查合格数据以防止重放。如果所有测试都通过,用户就可以确信TPM的完整性和隐私
+性在整个内核启动过程中得到了保护。
+
+.. _TPM Genie: https://www.nccgroup.trust/globalassets/about-us/us/documents/tpm-genie.pdf
+.. _Windows Bitlocker TPM: https://dolosgroup.io/blog/2021/7/9/from-stolen-laptop-to-inside-the-company-network
+.. _基于TPM的Linux磁盘加密: https://www.secura.com/blog/tpm-sniffing-attacks-against-non-bitlocker-targets
+.. _TCG EK Credential Profile: https://trustedcomputinggroup.org/resource/tcg-ek-credential-profile-for-tpm-family-2-0/
+.. _TCG TPM v2.0 Provisioning Guidance: https://trustedcomputinggroup.org/resource/tcg-tpm-v2-0-provisioning-guidance/
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 4/7] docs/zh_CN: Add tpm tpm_tis Chinese translation
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
                   ` (2 preceding siblings ...)
  2025-01-23  5:17 ` [PATCH v3 3/7] docs/zh_CN: Add tpm tpm-security " Shuo Zhao
@ 2025-01-23  5:17 ` Shuo Zhao
  2025-01-24  9:20   ` Yanteng Si
  2025-01-23  5:17 ` [PATCH v3 5/7] docs/zh_CN: Add tpm tpm_vtpm_proxy " Shuo Zhao
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Translate .../security/tpm/tpm_tis.rst into Chinese.

Update the translation through commit 8a55256a8462
("Documentation: tpm_tis")

Reviewed-by: Alex Shi <alexs@kernel.org>
Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
---
 .../translations/zh_CN/security/tpm/index.rst |  2 +-
 .../zh_CN/security/tpm/tpm_tis.rst            | 43 +++++++++++++++++++
 2 files changed, 44 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_tis.rst

diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
index 46cdf7c1a1c1..4ee8881a41a4 100644
--- a/Documentation/translations/zh_CN/security/tpm/index.rst
+++ b/Documentation/translations/zh_CN/security/tpm/index.rst
@@ -14,9 +14,9 @@
 
    tpm_event_log
    tpm-security
+   tpm_tis
 
 TODOLIST:
-*   tpm_tis
 *   tpm_vtpm_proxy
 *   xen-tpmfront
 *   tpm_ftpm_tee
diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_tis.rst b/Documentation/translations/zh_CN/security/tpm/tpm_tis.rst
new file mode 100644
index 000000000000..0fb009f93e10
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/tpm/tpm_tis.rst
@@ -0,0 +1,43 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/security/tpm/tpm_tis.rst
+
+:翻译:
+ 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
+
+TPM FIFO接口驱动
+================
+
+TCG PTP规范定义了两种接口类型:FIFO和CRB。前者基于顺序的读写操作,
+后者基于包含完整命令或响应的缓冲区。
+
+FIFO(先进先出)接口被tpm_tis_core依赖的驱动程序使用。最初,Linux只
+有一个名为tpm_tis的驱动,覆盖了内存映射(即 MMIO)接口,但后来它被
+扩展以支持TCG标准所支持的其他物理接口。
+
+由于历史原因,最初的MMIO驱动被称为tpm_tis,而FIFO驱动的框架被命名为
+tpm_tis_core。在tpm_tis中的“tis”后缀来自TPM接口规范,这是针对TPM1.x
+芯片的硬件接口规范。
+
+通信基于一个由TPM芯片通过硬件总线或内存映射共享的20KiB 缓冲区,具体
+取决于物理接线。该缓冲区进一步分为五个相等大小的4KiB缓冲区,为CPU和
+TPM之间的通信提供等效的寄存器集。这些通信端点在TCG术语中称为localities。
+
+当内核想要向TPM芯片发送命令时,它首先通过在TPM_ACCESS寄存器中设置
+requestUse位来保留locality0。当访问被授予时,该位由芯片清除。一旦完成
+通信,内核会写入TPM_ACCESS.activeLocality位。这告诉芯片该本地性已被
+释放。
+
+待处理的本地性由芯片按优先级降序逐个服务,一次一个:
+
+- Locality0优先级最低。
+- Locality5优先级最高。
+
+关于localities的更多信息和含义,请参阅TCG PC客户端平台TPM 配置文件规范的第3.2节。
+
+参考文献
+========
+
+TCG PC客户端平台TPM配置文件(PTP)规范
+https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 5/7] docs/zh_CN: Add tpm tpm_vtpm_proxy Chinese translation
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
                   ` (3 preceding siblings ...)
  2025-01-23  5:17 ` [PATCH v3 4/7] docs/zh_CN: Add tpm tpm_tis " Shuo Zhao
@ 2025-01-23  5:17 ` Shuo Zhao
  2025-01-24  9:21   ` Yanteng Si
  2025-01-23  5:17 ` [PATCH v3 6/7] docs/zh_CN: Add tpm xen-tpmfront " Shuo Zhao
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Translate .../security/tpm/tpm_vtpm_proxy.rst into Chinese.

Update the translation through commit 799a545bb938
("tpm: move documentation under Documentation/security")

Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
---
 .../translations/zh_CN/security/tpm/index.rst |  2 +-
 .../zh_CN/security/tpm/tpm_vtpm_proxy.rst     | 51 +++++++++++++++++++
 2 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst

diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
index 4ee8881a41a4..dd80816f8af8 100644
--- a/Documentation/translations/zh_CN/security/tpm/index.rst
+++ b/Documentation/translations/zh_CN/security/tpm/index.rst
@@ -15,8 +15,8 @@
    tpm_event_log
    tpm-security
    tpm_tis
+   tpm_vtpm_proxy
 
 TODOLIST:
-*   tpm_vtpm_proxy
 *   xen-tpmfront
 *   tpm_ftpm_tee
diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst b/Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst
new file mode 100644
index 000000000000..bc92cfb684c3
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst
@@ -0,0 +1,51 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/security/tpm/tpm_vtpm_proxy.rst
+
+:翻译:
+ 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
+
+==========================
+Linux容器的虚拟TPM代理驱动
+==========================
+
+| 作者:
+| Stefan Berger <stefanb@linux.vnet.ibm.com>
+
+本文档描述了用于Linux容器的虚拟可信平台模块(vTPM)代理设备驱动。
+
+介绍
+====
+
+这项工作的目标是为每个Linux容器提供TPM功能。这使得程序能够像与物理系统
+上的TPM交互一样,与容器中的TPM进行交互。每个容器都会获得一个唯一的、模
+拟的软件TPM。
+
+设计
+====
+
+为了使每个容器都能使用模拟的软件TPM,容器管理栈需要创建一对设备,其中
+包括一个客户端TPM字符设备 ``/dev/tpmX`` (X=0,1,2...)和一个‘服务器端’
+文件描述符。当文件描述符传被递给TPM模拟器时,前者通过创建具有适当主次
+设备号的字符设备被移入容器,然后,容器内的软件可以使用字符设备发送TPM
+命令,模拟器将通过文件描述符接收这些命令,并用它来发送响应。
+
+为了支持这一点,虚拟TPM代理驱动程序提供了一个设备 ``/dev/vtpmx`` ,该设备
+用于通过ioctl创建设备对。ioctl将其作为配置设备的输入标志,例如这些标志指示
+TPM模拟器是否支持TPM1.2或TPM2功能。ioctl的结果是返回‘服务器端’的文件描述符
+以及创建的字符设备的主次设备号。此外,还会返回TPM字符设备的编号。例如,如果
+创建了 ``/dev/tpm10`` ,则返回编号( ``dev_num`` )10。
+
+一旦设备被创建,驱动程序将立即尝试与TPM进行通信。来自驱动程序的所有命令
+都可以从ioctl返回的文件描述符中读取。这些命令应该立即得到响应。
+
+UAPI
+====
+
+该API在以下内核代码中:
+
+include/uapi/linux/vtpm_proxy.h
+drivers/char/tpm/tpm_vtpm_proxy.c
+
+函数:vtpmx_ioc_new_dev
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 6/7] docs/zh_CN: Add tpm xen-tpmfront Chinese translation
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
                   ` (4 preceding siblings ...)
  2025-01-23  5:17 ` [PATCH v3 5/7] docs/zh_CN: Add tpm tpm_vtpm_proxy " Shuo Zhao
@ 2025-01-23  5:17 ` Shuo Zhao
  2025-01-24  9:23   ` Yanteng Si
  2025-01-23  5:17 ` [PATCH v3 7/7] docs/zh_CN: Add tpm tpm_ftpm_tee " Shuo Zhao
  2025-02-04 16:54 ` [PATCH v3 0/7] Add all Chinese translations in the tpm directory Jonathan Corbet
  7 siblings, 1 reply; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Translate .../security/tpm/xen-tpmfront.rst into Chinese.

Update the translation through commit 9e255e2b9afe
("Documentation: drop optional BOMs")

Reviewed-by: Alex Shi <alexs@kernel.org>
Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
---
 .../translations/zh_CN/security/tpm/index.rst |   2 +-
 .../zh_CN/security/tpm/xen-tpmfront.rst       | 114 ++++++++++++++++++
 2 files changed, 115 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst

diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
index dd80816f8af8..bf95200ca586 100644
--- a/Documentation/translations/zh_CN/security/tpm/index.rst
+++ b/Documentation/translations/zh_CN/security/tpm/index.rst
@@ -16,7 +16,7 @@
    tpm-security
    tpm_tis
    tpm_vtpm_proxy
+   xen-tpmfront
 
 TODOLIST:
-*   xen-tpmfront
 *   tpm_ftpm_tee
diff --git a/Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst b/Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst
new file mode 100644
index 000000000000..fa085d98a99b
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst
@@ -0,0 +1,114 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/security/tpm/xen-tpmfront.rst
+
+:翻译:
+ 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
+
+================
+Xen的虚拟TPM接口
+================
+
+作者:Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
+
+本文档描述了用于Xen的虚拟可信平台模块(vTPM)子系统。假定读者熟悉
+Xen和Linux的构建和安装,并对TPM和vTPM概念有基本的理解。
+
+介绍
+----
+
+这项工作的目标是为虚拟客户操作系统(在Xen中称为DomU)提供TPM功能。这使得
+程序能够像与物理系统上的TPM交互一样,与虚拟系统中的TPM进行交互。每个客户
+操作系统都会获得一个唯一的、模拟的软件TPM。然而,vTPM的所有秘密(如密钥、
+NVRAM 等)由vTPM管理域进行管理,该域将这些秘密封存到物理TPM中。如果创建这
+些域(管理域、vTPM域和客户域)的过程是可信的,vTPM子系统就能将根植于硬件
+TPM的信任链扩展到Xen中的虚拟机。vTPM的每个主要组件都作为一个独立的域实现,
+从而通过虚拟机监控程序(hypervisor)提供安全隔离。
+
+这个mini-os vTPM 子系统是建立在IBM和Intel公司之前的vTPM工作基础上的。
+
+
+设计概述
+--------
+
+vTPM的架构描述如下::
+
+  +------------------+
+  |    Linux DomU    | ...
+  |       |  ^       |
+  |       v  |       |
+  |   xen-tpmfront   |
+  +------------------+
+          |  ^
+          v  |
+  +------------------+
+  | mini-os/tpmback  |
+  |       |  ^       |
+  |       v  |       |
+  |  vtpm-stubdom    | ...
+  |       |  ^       |
+  |       v  |       |
+  | mini-os/tpmfront |
+  +------------------+
+          |  ^
+          v  |
+  +------------------+
+  | mini-os/tpmback  |
+  |       |  ^       |
+  |       v  |       |
+  | vtpmmgr-stubdom  |
+  |       |  ^       |
+  |       v  |       |
+  | mini-os/tpm_tis  |
+  +------------------+
+          |  ^
+          v  |
+  +------------------+
+  |   Hardware TPM   |
+  +------------------+
+
+* Linux DomU:
+               希望使用vTPM的基于Linux的客户机。可能有多个这样的实例。
+
+* xen-tpmfront.ko:
+               Linux内核虚拟TPM前端驱动程序。该驱动程序为基于Linux的DomU提供
+               vTPM访问。
+
+* mini-os/tpmback:
+               Mini-os TPM后端驱动程序。Linux前端驱动程序通过该后端驱动程序连
+               接,以便在Linux DomU和其vTPM之间进行通信。该驱动程序还被
+               vtpmmgr-stubdom用于与vtpm-stubdom通信。
+
+* vtpm-stubdom:
+               一个实现vTPM的mini-os存根域。每个正在运行的vtpm-stubdom实例与系统
+               上的逻辑vTPM之间有一一对应的关系。vTPM平台配置寄存器(PCRs)通常都
+               初始化为零。
+
+* mini-os/tpmfront:
+               Mini-os TPM前端驱动程序。vTPM mini-os域vtpm-stubdom使用该驱动程序
+               与vtpmmgr-stubdom通信。此驱动程序还用于与vTPM域通信的mini-os域,例
+               如 pv-grub。
+
+* vtpmmgr-stubdom:
+               一个实现vTPM管理器的mini-os域。系统中只有一个vTPM管理器,并且在整个
+               机器生命周期内应一直运行。此域调节对系统中物理TPM的访问,并确保每个
+               vTPM的持久状态。
+
+* mini-os/tpm_tis:
+               Mini-osTPM1.2版本TPM 接口规范(TIS)驱动程序。该驱动程序由vtpmmgr-stubdom
+               用于直接与硬件TPM通信。通信通过将硬件内存页映射到vtpmmgr-stubdom来实现。
+
+* 硬件TPM:
+               固定在主板上的物理 TPM。
+
+与Xen的集成
+-----------
+
+vTPM驱动程序的支持已在Xen4.3中通过libxl工具堆栈添加。有关设置vTPM和vTPM
+管理器存根域的详细信息,请参见Xen文档(docs/misc/vtpm.txt)。一旦存根域
+运行,与磁盘或网络设备相同,vTPM设备将在域的配置文件中进行设置
+
+为了使用诸如IMA(完整性测量架构)等需要在initrd之前加载TPM的功能,必须将
+xen-tpmfront驱动程序编译到内核中。如果不使用这些功能,驱动程序可以作为
+模块编译,并像往常一样加载。
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 7/7] docs/zh_CN: Add tpm tpm_ftpm_tee Chinese translation
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
                   ` (5 preceding siblings ...)
  2025-01-23  5:17 ` [PATCH v3 6/7] docs/zh_CN: Add tpm xen-tpmfront " Shuo Zhao
@ 2025-01-23  5:17 ` Shuo Zhao
  2025-01-24  9:24   ` Yanteng Si
  2025-02-04 16:54 ` [PATCH v3 0/7] Add all Chinese translations in the tpm directory Jonathan Corbet
  7 siblings, 1 reply; 16+ messages in thread
From: Shuo Zhao @ 2025-01-23  5:17 UTC (permalink / raw)
  To: alexs, si.yanteng, corbet
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Translate .../security/tpm/tpm_ftpm_tee.rst into Chinese.

Update the translation through commit e8bd417aab0c
("tpm/tpm_ftpm_tee: Document fTPM TEE driver")

Reviewed-by: Alex Shi <alexs@kernel.org>
Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
---
 .../translations/zh_CN/security/tpm/index.rst |  4 +--
 .../zh_CN/security/tpm/tpm_ftpm_tee.rst       | 31 +++++++++++++++++++
 2 files changed, 32 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst

diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
index bf95200ca586..707646590647 100644
--- a/Documentation/translations/zh_CN/security/tpm/index.rst
+++ b/Documentation/translations/zh_CN/security/tpm/index.rst
@@ -17,6 +17,4 @@
    tpm_tis
    tpm_vtpm_proxy
    xen-tpmfront
-
-TODOLIST:
-*   tpm_ftpm_tee
+   tpm_ftpm_tee
diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst b/Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst
new file mode 100644
index 000000000000..5901eee32563
--- /dev/null
+++ b/Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst
@@ -0,0 +1,31 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: ../../disclaimer-zh_CN.rst
+
+:Original: Documentation/security/tpm/tpm_ftpm_tee.rst
+
+:翻译:
+ 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
+
+===========
+固件TPM驱动
+===========
+
+本文档描述了固件可信平台模块(fTPM)设备驱动。
+
+介绍
+====
+
+该驱动程序是用于ARM的TrustZone环境中实现的固件的适配器。该驱动
+程序允许程序以与硬件TPM相同的方式与TPM进行交互。
+
+设计
+====
+
+该驱动程序充当一个薄层,传递命令到固件实现的TPM并接收其响应。驱动
+程序本身并不包含太多逻辑,更像是固件与内核/用户空间之间的一个管道。
+
+固件本身基于以下论文:
+https://www.microsoft.com/en-us/research/wp-content/uploads/2017/06/ftpm1.pdf
+
+当驱动程序被加载时,它会向用户空间暴露 ``/dev/tpmX`` 字符设备,允许
+用户空间通过该设备与固件TPM进行通信。
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 1/7] docs/zh_CN: Add tpm index Chinese translation
  2025-01-23  5:17 ` [PATCH v3 1/7] docs/zh_CN: Add tpm index Chinese translation Shuo Zhao
@ 2025-01-24  6:58   ` Yanteng Si
  0 siblings, 0 replies; 16+ messages in thread
From: Yanteng Si @ 2025-01-24  6:58 UTC (permalink / raw)
  To: Shuo Zhao, alexs, corbet; +Cc: zhaoyuehui, zhangwei, maoyuxian, linux-doc




在 2025/1/23 13:17, Shuo Zhao 写道:
> Translate .../security/tpm/index.rst into Chinese
>
> Update the translation through commit 1d479e3cd652
> ("Documentation: tpm: Add TPM security docs toctree entry")
>
> Reviewed-by: Alex Shi <alexs@kernel.org>
> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>

Thanks,
Yanteng
> ---
>   .../translations/zh_CN/security/index.rst     |  2 +-
>   .../translations/zh_CN/security/tpm/index.rst | 22 +++++++++++++++++++
>   2 files changed, 23 insertions(+), 1 deletion(-)
>   create mode 100644 Documentation/translations/zh_CN/security/tpm/index.rst
>
> diff --git a/Documentation/translations/zh_CN/security/index.rst b/Documentation/translations/zh_CN/security/index.rst
> index 38e9ce7cf471..0aacecabf0c0 100644
> --- a/Documentation/translations/zh_CN/security/index.rst
> +++ b/Documentation/translations/zh_CN/security/index.rst
> @@ -19,6 +19,7 @@
>      lsm
>      sak
>      siphash
> +   tpm/index
>      digsig
>      landlock
>   
> @@ -29,6 +30,5 @@ TODOLIST:
>   * lsm-development
>   * SCTP
>   * self-protection
> -* tpm/index
>   * secrets/index
>   * ipe
> diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
> new file mode 100644
> index 000000000000..a55d0a7bbc0f
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/security/tpm/index.rst
> @@ -0,0 +1,22 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/security/tpm/index.rst
> +
> +:翻译:
> + 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
> +
> +================
> +可信平台模块文档
> +================
> +
> +.. toctree::
> +
> +
> +TODOLIST:
> +*   tpm_event_log
> +*   tpm-security
> +*   tpm_tis
> +*   tpm_vtpm_proxy
> +*   xen-tpmfront
> +*   tpm_ftpm_tee


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/7] docs/zh_CN: Add tpm tpm_event_log Chinese translation
  2025-01-23  5:17 ` [PATCH v3 2/7] docs/zh_CN: Add tpm tpm_event_log " Shuo Zhao
@ 2025-01-24  7:01   ` Yanteng Si
  0 siblings, 0 replies; 16+ messages in thread
From: Yanteng Si @ 2025-01-24  7:01 UTC (permalink / raw)
  To: Shuo Zhao, alexs, corbet; +Cc: zhaoyuehui, zhangwei, maoyuxian, linux-doc




在 2025/1/23 13:17, Shuo Zhao 写道:
> Translate .../security/tpm/tpm_event_log.rst into Chinese.
>
> Update the translation through commit 2ef5a7f1482c
> ("tpm: Document UEFI event log quirks")
>
> Reviewed-by: Alex Shi <alexs@kernel.org>
> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>

Thanks,
Yanteng
> ---
>   .../translations/zh_CN/security/tpm/index.rst |  2 +-
>   .../zh_CN/security/tpm/tpm_event_log.rst      | 49 +++++++++++++++++++
>   2 files changed, 50 insertions(+), 1 deletion(-)
>   create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst
>
> diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
> index a55d0a7bbc0f..f324bd4dd093 100644
> --- a/Documentation/translations/zh_CN/security/tpm/index.rst
> +++ b/Documentation/translations/zh_CN/security/tpm/index.rst
> @@ -12,9 +12,9 @@
>   
>   .. toctree::
>   
> +   tpm_event_log
>   
>   TODOLIST:
> -*   tpm_event_log
>   *   tpm-security
>   *   tpm_tis
>   *   tpm_vtpm_proxy
> diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst b/Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst
> new file mode 100644
> index 000000000000..9c173291ac3e
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst
> @@ -0,0 +1,49 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/security/tpm/tpm_event_log.rst
> +
> +:翻译:
> + 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
> +
> +===========
> +TPM事件日志
> +===========
> +
> +本文档简要介绍了什么是TPM日志,以及它是如何从预启动固件移交到操作系统的。
> +
> +介绍
> +====
> +
> +预启动固件维护一个事件日志,每当它将某些内容哈希到任何一个PCR寄存器时,该
> +日志会添加新条目。这些事件按类型分类,并包含哈希后的PCR寄存器值。通常,预
> +启动固件会哈希那些即将移交执行权或与启动过程相关的组件。
> +
> +其主要应用是远程认证,而它之所以有用的原因在[1]中第一部分很好地阐述了:
> +
> +认证用于向挑战者提供有关平台状态的信息。然而,PCR的内容难以解读;因此,当
> +PCR内容附有测量日志时,认证通常会更有用。尽管测量日志本身并不可信,但它们
> +包含比PCR内容更为丰富的信息集。PCR内容用于对测量日志进行验证。
> +
> +UEFI事件日志
> +============
> +
> +UEFI提供的事件日志有一些比较奇怪的特性。
> +
> +在调用ExitBootServices()之前,Linux EFI引导加载程序会将事件日志复制到由
> +引导加载程序自定义的配置表中。不幸的是,通过ExitBootServices()生成的事件
> +并不会出现在这个表里。
> +
> +固件提供了一个所谓的最终事件配置表排序来解决这个问题。事件会在第一次调用
> +EFI_TCG2_PROTOCOL.GetEventLog()后被镜像到这个表中。
> +
> +这引出了另一个问题:无法保证它不会在 Linux EFI stub 开始运行之前被调用。
> +因此,在 stub 运行时,它需要计算并将最终事件表的大小保存到自定义配置表中,
> +以便TPM驱动程序可以在稍后连接来自自定义配置表和最终事件表的两个事件日志时
> +跳过这些事件。
> +
> +参考文献
> +========
> +
> +- [1] https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/
> +- [2] The final concatenation is done in drivers/char/tpm/eventlog/efi.c


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 3/7] docs/zh_CN: Add tpm tpm-security Chinese translation
  2025-01-23  5:17 ` [PATCH v3 3/7] docs/zh_CN: Add tpm tpm-security " Shuo Zhao
@ 2025-01-24  9:19   ` Yanteng Si
  0 siblings, 0 replies; 16+ messages in thread
From: Yanteng Si @ 2025-01-24  9:19 UTC (permalink / raw)
  To: Shuo Zhao, alexs, corbet; +Cc: zhaoyuehui, zhangwei, maoyuxian, linux-doc




在 2025/1/23 13:17, Shuo Zhao 写道:
> Translate .../security/tpm/tpm-security.rst into Chinese
>
> Update the translation through commit 3d2daf9d592e
> ("Documentation: add tpm-security.rst")
>
> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>

Thanks,
Yanteng
> ---
>   .../translations/zh_CN/security/tpm/index.rst |   2 +-
>   .../zh_CN/security/tpm/tpm-security.rst       | 151 ++++++++++++++++++
>   2 files changed, 152 insertions(+), 1 deletion(-)
>   create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm-security.rst
>
> diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
> index f324bd4dd093..46cdf7c1a1c1 100644
> --- a/Documentation/translations/zh_CN/security/tpm/index.rst
> +++ b/Documentation/translations/zh_CN/security/tpm/index.rst
> @@ -13,9 +13,9 @@
>   .. toctree::
>   
>      tpm_event_log
> +   tpm-security
>   
>   TODOLIST:
> -*   tpm-security
>   *   tpm_tis
>   *   tpm_vtpm_proxy
>   *   xen-tpmfront
> diff --git a/Documentation/translations/zh_CN/security/tpm/tpm-security.rst b/Documentation/translations/zh_CN/security/tpm/tpm-security.rst
> new file mode 100644
> index 000000000000..26818d28c98f
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/security/tpm/tpm-security.rst
> @@ -0,0 +1,151 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/security/tpm/tpm-security.rst
> +
> +:翻译:
> + 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
> +
> +TPM安全
> +=======
> +
> +本文档的目的是描述我们如何使内核使用TPM在面对外部窥探和数据包篡改
> +攻击(文献中称为被动和主动中间人攻击)时保持合理的稳健性。当前的
> +安全文档适用于TPM2.0。
> +
> +介绍
> +----
> +
> +TPM通常是一个通过某种低带宽总线连接到PC的独立芯片。虽然有一些
> +例外,例如Intel PTT,它是运行在靠近CPU的软件环境中的软件TPM,
> +容易受到不同类型的攻击,但目前大多数强化的安全环境要求使用独立
> +硬件TPM,这是本文讨论的使用场景。
> +
> +总线上的窥探和篡改攻击
> +----------------------
> +
> +当前的技术状态允许使用 `TPM Genie`_ 硬件中间人,这是一种简单的外部设备,可以在
> +任何系统或笔记本电脑上几秒钟内安装。最近成功演示了针对 `Windows Bitlocker TPM`_
> +系统的攻击。最近同样的攻击针对 `基于TPM的Linux磁盘加密`_ 方案也遭到了同样的攻击。
> +下一阶段的研究似乎是入侵总线上现有的设备以充当中间人,因此攻击者需要物理访问几
> +秒钟的要求可能不再存在。然而,本文档的目标是尽可能在这种环境下保护TPM的机密性和
> +完整性,并尝试确保即使我们不能防止攻击,至少可以检测到它。
> +
> +不幸的是,大多数TPM功能,包括硬件重置功能,都能被能够访问总线的攻击
> +者控制,因此下面我们将讨论一些可能出现的干扰情况。
> +
> +测量(PCR)完整性
> +-----------------
> +
> +由于攻击者可以向TPM发送自己的命令,他们可以发送任意的PCR扩展,从而破
> +坏测量系统,这将是一种烦人的拒绝服务攻击。然而,针对密封到信任测量中
> +的实体,有两类更严重的攻击。
> +
> +1. 攻击者可以拦截来自系统的所有PCR扩展,并完全替换为自己的值,产生
> +   一个未篡改状态的重现,这会使PCR测量证明状态是可信的,并释放密钥。
> +
> +2. 攻击者可能会在某个时刻重置TPM,清除PCR,然后发送自己的测量,从而
> +   有效地覆盖TPM已经完成的启动时间测量。
> +
> +第一种攻击可以通过始终对PCR扩展和读取命令进行HMAC保护来防止,这意味着
> +如果没有在响应中产生可检测的HMAC失败,则测量值无法被替换。然而第二种
> +攻击只能通过依赖某种机制来检测,这种机制会在TPM重置后发生变化。
> +
> +秘密保护
> +--------
> +
> +某些进出TPM的信息,如密钥密封、私钥导入和随机数生成容易被拦截,而仅仅
> +使用HMAC保护无法防止这种情况。因此,对于这些类型的命令,我们必须使用
> +请求和响应加密来防止秘密信息的泄露。
> +
> +与TPM建立初始信任
> +-----------------
> +
> +为了从一开始就提供安全性,必须建立一个初始的共享或非对称秘密,并且该
> +秘钥必须对攻击者不可知。最明显的途径是使用背书和存储种子,这些可以用
> +来派生非对称密钥。然而,使用这些密钥很困难,因为将它们传递给内核的唯
> +一方法是通过命令行,这需要在启动系统中进行广泛的支持,而且无法保证任
> +何一个层次不会有任何形式的授权。
> +
> +Linux内核选择的机制是从空种子使用标准的存储种子参数派生出主椭圆曲线
> +密钥。空种子有两个优势:首先该层次物理上无法具有授权,因此我们始终可
> +以使用它;其次空种子在TPM重置时会发生变化,这意味着如果我们在当天开始
> +时基于空种子建立信任,如果TPM重置且种子变化,则所有派生的密钥进行加盐
> +处理的会话都将失败。
> +
> +显然,在没有任何其他共享秘密的情况下使用空种子,我们必须创建并读取初始
> +公钥,这当然可能会被总线中间人拦截并替换。然而,TPM有一个密钥认证机制
> +(使用EK背书证书,创建认证身份密钥,并用该密钥认证空种子主密钥),但由
> +于它过于复杂,无法在内核中运行,因此我们保留空主密钥名称的副本,通过
> +sysfs导出,以便用户空间在启动时进行完整的认证。这里的明确保证是,如果空
> +主密钥认证成功,那么从当天开始的所有TPM交易都是安全的;如果认证失败,则
> +说明系统上有中间人(并且任何在启动期间使用的秘密可能已被泄露)。
> +
> +信任堆叠
> +--------
> +
> +在当前的空主密钥场景中,TPM必须在交给下一个使用者之前完全清除。然而,
> +内核将派生出的空种子密钥的名称传递给用户空间,用户空间可以通过认证来
> +验证该名称。因此,这种名称传递链也可以用于各个启动组件之间(通过未指
> +定的机制)。例如grub可以使用空种子方案来实现安全性,并将名称交给内核。
> +内核可以派生出密钥和名称,并确定如果它们与交接的版本不同,则表示发生
> +了篡改。因此可以通过名称传递将任意启动组件(从UEFI到grub到内核)串联
> +起来,只要每个后续组件知道如何收集该名称,并根据其派生的密钥进行验证。
> +
> +会话属性
> +--------
> +
> +所有内核使用的TPM命令都允许会话。HMAC会话可用于检查请求和响应的完整性,
> +而解密和加密标志可用于保护参数和响应。HMAC和加密密钥通常是从共享授权秘
> +钥推导出来的,但对于许多内核操作来说,这些密钥是已知的(通常为空)。因
> +此内核使用空主密钥作为盐密钥来创建每个HMAC会话,这样就为会话密钥的派生
> +提供了加密输入。因此内核仅需创建一次空主密钥(作为一个易失的TPM句柄),
> +并将其保存在tpm_chip中,用于每次在内核中使用TPM时。由于内核资源管理器缺
> +乏去间隙化,当前每次操作都需要创建和销毁会话,但未来可能会将单个会话重用
> +用于内核中的HMAC、加密和解密会话。
> +
> +保护类型
> +--------
> +
> +对于每个内核操作,我们使用空主密钥加盐的HMAC来保护完整性。此外我们使用参数
> +加密来保护密钥密封,并使用参数解密来保护密钥解封和随机数生成。
> +
> +空主密钥认证在用户空间的实现
> +============================
> +
> +每个TPM都会附带几个X.509证书,通常用于主背书密钥。本文档假设存在椭圆曲线
> +版本的证书,位于01C00002,但也同样适用于RSA证书(位于01C00001)。
> +
> +认证的第一步是使用 `TCG EK Credential Profile`_ 模板进行主密钥的创建,该
> +模板允许将生成的主密钥与证书中的主密钥进行比较(公钥必须匹配)。需要注意
> +的是,生成EK主密钥需要EK层级密码,但EC主密钥的预生成版本应位于81010002,
> +并且可以无需密钥授权对其执行TPM2_ReadPublic()操作。接下来,证书本身必须
> +经过验证,以确保其可以追溯到制造商根证书(该根证书应公开在制造商网站上)。
> +完成此步骤后将在TPM内部生成一个认证密钥(AK),并使用TPM2_MakeCredential、
> +AK的名称和EK公钥加密一个秘密。然后TPM执行TPM2_ActivateCredential,只有在
> +TPM、EK和AK之间的绑定关系成立时,才能恢复秘密。现在,生成的AK可以用于对由
> +内核导出的空主密钥进行认证。由于TPM2_MakeCredential/ActivateCredential操作
> +相对复杂,下面将描述一种涉及外部生成私钥的简化过程。
> +
> +这个过程是通常基于隐私CA认证过程的简化缩写。假设此时认证由TPM所有者进行,
> +所有者只能访问所有者层次。所有者创建一个外部公/私钥对(假设是椭圆曲线),
> +并使用内部包装过程将私钥进行封装以便导入,该私钥被其父级由EC派生的存储主密
> +钥保护。TPM2_Import()操作使用一个以EK主密钥为盐值的参数解密HMAC会话(这也不
> +需要EK密钥授权),意味着内部封装密钥是加密参数,因此除非TPM拥有认证的EK,否
> +则无法执行导入操作。如果该命令成功执行并且HMAC在返回时通过验证,我们就知道
> +我们有一个只为认证TPM加载的私钥副本。现在该密钥已加载到TPM中,并且存储主密
> +钥已被清除(以释放空间用于生成空密钥)。
> +
> +现在根据 `TCG TPM v2.0 Provisioning Guidance`_ 中的存储配置生成空EC主密钥;
> +该密钥的名称(即公钥区域的哈希值)被计算出来并与内核在/sys/class/tpm/tpm0/null_name
> +中提供的空种子名称进行比较。如果名称不匹配,TPM就被认为是受损的。如果名称匹配,
> +用户执行TPM2_Certify(),使用空主密钥作为对象句柄,使用加载的私钥作为签名句柄,
> +并提供随机的合格数据。返回的certifyInfo的签名将与加载的私钥的公钥部分进行验证,
> +并检查合格数据以防止重放。如果所有测试都通过,用户就可以确信TPM的完整性和隐私
> +性在整个内核启动过程中得到了保护。
> +
> +.. _TPM Genie: https://www.nccgroup.trust/globalassets/about-us/us/documents/tpm-genie.pdf
> +.. _Windows Bitlocker TPM: https://dolosgroup.io/blog/2021/7/9/from-stolen-laptop-to-inside-the-company-network
> +.. _基于TPM的Linux磁盘加密: https://www.secura.com/blog/tpm-sniffing-attacks-against-non-bitlocker-targets
> +.. _TCG EK Credential Profile: https://trustedcomputinggroup.org/resource/tcg-ek-credential-profile-for-tpm-family-2-0/
> +.. _TCG TPM v2.0 Provisioning Guidance: https://trustedcomputinggroup.org/resource/tcg-tpm-v2-0-provisioning-guidance/


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 4/7] docs/zh_CN: Add tpm tpm_tis Chinese translation
  2025-01-23  5:17 ` [PATCH v3 4/7] docs/zh_CN: Add tpm tpm_tis " Shuo Zhao
@ 2025-01-24  9:20   ` Yanteng Si
  0 siblings, 0 replies; 16+ messages in thread
From: Yanteng Si @ 2025-01-24  9:20 UTC (permalink / raw)
  To: Shuo Zhao, alexs, corbet; +Cc: zhaoyuehui, zhangwei, maoyuxian, linux-doc




在 2025/1/23 13:17, Shuo Zhao 写道:
> Translate .../security/tpm/tpm_tis.rst into Chinese.
>
> Update the translation through commit 8a55256a8462
> ("Documentation: tpm_tis")
>
> Reviewed-by: Alex Shi <alexs@kernel.org>
> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>

Thanks,
Yanteng
> ---
>   .../translations/zh_CN/security/tpm/index.rst |  2 +-
>   .../zh_CN/security/tpm/tpm_tis.rst            | 43 +++++++++++++++++++
>   2 files changed, 44 insertions(+), 1 deletion(-)
>   create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_tis.rst
>
> diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
> index 46cdf7c1a1c1..4ee8881a41a4 100644
> --- a/Documentation/translations/zh_CN/security/tpm/index.rst
> +++ b/Documentation/translations/zh_CN/security/tpm/index.rst
> @@ -14,9 +14,9 @@
>   
>      tpm_event_log
>      tpm-security
> +   tpm_tis
>   
>   TODOLIST:
> -*   tpm_tis
>   *   tpm_vtpm_proxy
>   *   xen-tpmfront
>   *   tpm_ftpm_tee
> diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_tis.rst b/Documentation/translations/zh_CN/security/tpm/tpm_tis.rst
> new file mode 100644
> index 000000000000..0fb009f93e10
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/security/tpm/tpm_tis.rst
> @@ -0,0 +1,43 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/security/tpm/tpm_tis.rst
> +
> +:翻译:
> + 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
> +
> +TPM FIFO接口驱动
> +================
> +
> +TCG PTP规范定义了两种接口类型:FIFO和CRB。前者基于顺序的读写操作,
> +后者基于包含完整命令或响应的缓冲区。
> +
> +FIFO(先进先出)接口被tpm_tis_core依赖的驱动程序使用。最初,Linux只
> +有一个名为tpm_tis的驱动,覆盖了内存映射(即 MMIO)接口,但后来它被
> +扩展以支持TCG标准所支持的其他物理接口。
> +
> +由于历史原因,最初的MMIO驱动被称为tpm_tis,而FIFO驱动的框架被命名为
> +tpm_tis_core。在tpm_tis中的“tis”后缀来自TPM接口规范,这是针对TPM1.x
> +芯片的硬件接口规范。
> +
> +通信基于一个由TPM芯片通过硬件总线或内存映射共享的20KiB 缓冲区,具体
> +取决于物理接线。该缓冲区进一步分为五个相等大小的4KiB缓冲区,为CPU和
> +TPM之间的通信提供等效的寄存器集。这些通信端点在TCG术语中称为localities。
> +
> +当内核想要向TPM芯片发送命令时,它首先通过在TPM_ACCESS寄存器中设置
> +requestUse位来保留locality0。当访问被授予时,该位由芯片清除。一旦完成
> +通信,内核会写入TPM_ACCESS.activeLocality位。这告诉芯片该本地性已被
> +释放。
> +
> +待处理的本地性由芯片按优先级降序逐个服务,一次一个:
> +
> +- Locality0优先级最低。
> +- Locality5优先级最高。
> +
> +关于localities的更多信息和含义,请参阅TCG PC客户端平台TPM 配置文件规范的第3.2节。
> +
> +参考文献
> +========
> +
> +TCG PC客户端平台TPM配置文件(PTP)规范
> +https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 5/7] docs/zh_CN: Add tpm tpm_vtpm_proxy Chinese translation
  2025-01-23  5:17 ` [PATCH v3 5/7] docs/zh_CN: Add tpm tpm_vtpm_proxy " Shuo Zhao
@ 2025-01-24  9:21   ` Yanteng Si
  0 siblings, 0 replies; 16+ messages in thread
From: Yanteng Si @ 2025-01-24  9:21 UTC (permalink / raw)
  To: Shuo Zhao, alexs, corbet; +Cc: zhaoyuehui, zhangwei, maoyuxian, linux-doc




在 2025/1/23 13:17, Shuo Zhao 写道:
> Translate .../security/tpm/tpm_vtpm_proxy.rst into Chinese.
>
> Update the translation through commit 799a545bb938
> ("tpm: move documentation under Documentation/security")
>
> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>

Thanks,
Yanteng
> ---
>   .../translations/zh_CN/security/tpm/index.rst |  2 +-
>   .../zh_CN/security/tpm/tpm_vtpm_proxy.rst     | 51 +++++++++++++++++++
>   2 files changed, 52 insertions(+), 1 deletion(-)
>   create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst
>
> diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
> index 4ee8881a41a4..dd80816f8af8 100644
> --- a/Documentation/translations/zh_CN/security/tpm/index.rst
> +++ b/Documentation/translations/zh_CN/security/tpm/index.rst
> @@ -15,8 +15,8 @@
>      tpm_event_log
>      tpm-security
>      tpm_tis
> +   tpm_vtpm_proxy
>   
>   TODOLIST:
> -*   tpm_vtpm_proxy
>   *   xen-tpmfront
>   *   tpm_ftpm_tee
> diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst b/Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst
> new file mode 100644
> index 000000000000..bc92cfb684c3
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst
> @@ -0,0 +1,51 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/security/tpm/tpm_vtpm_proxy.rst
> +
> +:翻译:
> + 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
> +
> +==========================
> +Linux容器的虚拟TPM代理驱动
> +==========================
> +
> +| 作者:
> +| Stefan Berger <stefanb@linux.vnet.ibm.com>
> +
> +本文档描述了用于Linux容器的虚拟可信平台模块(vTPM)代理设备驱动。
> +
> +介绍
> +====
> +
> +这项工作的目标是为每个Linux容器提供TPM功能。这使得程序能够像与物理系统
> +上的TPM交互一样,与容器中的TPM进行交互。每个容器都会获得一个唯一的、模
> +拟的软件TPM。
> +
> +设计
> +====
> +
> +为了使每个容器都能使用模拟的软件TPM,容器管理栈需要创建一对设备,其中
> +包括一个客户端TPM字符设备 ``/dev/tpmX`` (X=0,1,2...)和一个‘服务器端’
> +文件描述符。当文件描述符传被递给TPM模拟器时,前者通过创建具有适当主次
> +设备号的字符设备被移入容器,然后,容器内的软件可以使用字符设备发送TPM
> +命令,模拟器将通过文件描述符接收这些命令,并用它来发送响应。
> +
> +为了支持这一点,虚拟TPM代理驱动程序提供了一个设备 ``/dev/vtpmx`` ,该设备
> +用于通过ioctl创建设备对。ioctl将其作为配置设备的输入标志,例如这些标志指示
> +TPM模拟器是否支持TPM1.2或TPM2功能。ioctl的结果是返回‘服务器端’的文件描述符
> +以及创建的字符设备的主次设备号。此外,还会返回TPM字符设备的编号。例如,如果
> +创建了 ``/dev/tpm10`` ,则返回编号( ``dev_num`` )10。
> +
> +一旦设备被创建,驱动程序将立即尝试与TPM进行通信。来自驱动程序的所有命令
> +都可以从ioctl返回的文件描述符中读取。这些命令应该立即得到响应。
> +
> +UAPI
> +====
> +
> +该API在以下内核代码中:
> +
> +include/uapi/linux/vtpm_proxy.h
> +drivers/char/tpm/tpm_vtpm_proxy.c
> +
> +函数:vtpmx_ioc_new_dev


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 6/7] docs/zh_CN: Add tpm xen-tpmfront Chinese translation
  2025-01-23  5:17 ` [PATCH v3 6/7] docs/zh_CN: Add tpm xen-tpmfront " Shuo Zhao
@ 2025-01-24  9:23   ` Yanteng Si
  0 siblings, 0 replies; 16+ messages in thread
From: Yanteng Si @ 2025-01-24  9:23 UTC (permalink / raw)
  To: Shuo Zhao, alexs, corbet; +Cc: zhaoyuehui, zhangwei, maoyuxian, linux-doc




在 2025/1/23 13:17, Shuo Zhao 写道:
> Translate .../security/tpm/xen-tpmfront.rst into Chinese.
>
> Update the translation through commit 9e255e2b9afe
> ("Documentation: drop optional BOMs")
>
> Reviewed-by: Alex Shi <alexs@kernel.org>
> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>

Thanks,
Yanteng
> ---
>   .../translations/zh_CN/security/tpm/index.rst |   2 +-
>   .../zh_CN/security/tpm/xen-tpmfront.rst       | 114 ++++++++++++++++++
>   2 files changed, 115 insertions(+), 1 deletion(-)
>   create mode 100644 Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst
>
> diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
> index dd80816f8af8..bf95200ca586 100644
> --- a/Documentation/translations/zh_CN/security/tpm/index.rst
> +++ b/Documentation/translations/zh_CN/security/tpm/index.rst
> @@ -16,7 +16,7 @@
>      tpm-security
>      tpm_tis
>      tpm_vtpm_proxy
> +   xen-tpmfront
>   
>   TODOLIST:
> -*   xen-tpmfront
>   *   tpm_ftpm_tee
> diff --git a/Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst b/Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst
> new file mode 100644
> index 000000000000..fa085d98a99b
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst
> @@ -0,0 +1,114 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/security/tpm/xen-tpmfront.rst
> +
> +:翻译:
> + 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
> +
> +================
> +Xen的虚拟TPM接口
> +================
> +
> +作者:Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
> +
> +本文档描述了用于Xen的虚拟可信平台模块(vTPM)子系统。假定读者熟悉
> +Xen和Linux的构建和安装,并对TPM和vTPM概念有基本的理解。
> +
> +介绍
> +----
> +
> +这项工作的目标是为虚拟客户操作系统(在Xen中称为DomU)提供TPM功能。这使得
> +程序能够像与物理系统上的TPM交互一样,与虚拟系统中的TPM进行交互。每个客户
> +操作系统都会获得一个唯一的、模拟的软件TPM。然而,vTPM的所有秘密(如密钥、
> +NVRAM 等)由vTPM管理域进行管理,该域将这些秘密封存到物理TPM中。如果创建这
> +些域(管理域、vTPM域和客户域)的过程是可信的,vTPM子系统就能将根植于硬件
> +TPM的信任链扩展到Xen中的虚拟机。vTPM的每个主要组件都作为一个独立的域实现,
> +从而通过虚拟机监控程序(hypervisor)提供安全隔离。
> +
> +这个mini-os vTPM 子系统是建立在IBM和Intel公司之前的vTPM工作基础上的。
> +
> +
> +设计概述
> +--------
> +
> +vTPM的架构描述如下::
> +
> +  +------------------+
> +  |    Linux DomU    | ...
> +  |       |  ^       |
> +  |       v  |       |
> +  |   xen-tpmfront   |
> +  +------------------+
> +          |  ^
> +          v  |
> +  +------------------+
> +  | mini-os/tpmback  |
> +  |       |  ^       |
> +  |       v  |       |
> +  |  vtpm-stubdom    | ...
> +  |       |  ^       |
> +  |       v  |       |
> +  | mini-os/tpmfront |
> +  +------------------+
> +          |  ^
> +          v  |
> +  +------------------+
> +  | mini-os/tpmback  |
> +  |       |  ^       |
> +  |       v  |       |
> +  | vtpmmgr-stubdom  |
> +  |       |  ^       |
> +  |       v  |       |
> +  | mini-os/tpm_tis  |
> +  +------------------+
> +          |  ^
> +          v  |
> +  +------------------+
> +  |   Hardware TPM   |
> +  +------------------+
> +
> +* Linux DomU:
> +               希望使用vTPM的基于Linux的客户机。可能有多个这样的实例。
> +
> +* xen-tpmfront.ko:
> +               Linux内核虚拟TPM前端驱动程序。该驱动程序为基于Linux的DomU提供
> +               vTPM访问。
> +
> +* mini-os/tpmback:
> +               Mini-os TPM后端驱动程序。Linux前端驱动程序通过该后端驱动程序连
> +               接,以便在Linux DomU和其vTPM之间进行通信。该驱动程序还被
> +               vtpmmgr-stubdom用于与vtpm-stubdom通信。
> +
> +* vtpm-stubdom:
> +               一个实现vTPM的mini-os存根域。每个正在运行的vtpm-stubdom实例与系统
> +               上的逻辑vTPM之间有一一对应的关系。vTPM平台配置寄存器(PCRs)通常都
> +               初始化为零。
> +
> +* mini-os/tpmfront:
> +               Mini-os TPM前端驱动程序。vTPM mini-os域vtpm-stubdom使用该驱动程序
> +               与vtpmmgr-stubdom通信。此驱动程序还用于与vTPM域通信的mini-os域,例
> +               如 pv-grub。
> +
> +* vtpmmgr-stubdom:
> +               一个实现vTPM管理器的mini-os域。系统中只有一个vTPM管理器,并且在整个
> +               机器生命周期内应一直运行。此域调节对系统中物理TPM的访问,并确保每个
> +               vTPM的持久状态。
> +
> +* mini-os/tpm_tis:
> +               Mini-osTPM1.2版本TPM 接口规范(TIS)驱动程序。该驱动程序由vtpmmgr-stubdom
> +               用于直接与硬件TPM通信。通信通过将硬件内存页映射到vtpmmgr-stubdom来实现。
> +
> +* 硬件TPM:
> +               固定在主板上的物理 TPM。
> +
> +与Xen的集成
> +-----------
> +
> +vTPM驱动程序的支持已在Xen4.3中通过libxl工具堆栈添加。有关设置vTPM和vTPM
> +管理器存根域的详细信息,请参见Xen文档(docs/misc/vtpm.txt)。一旦存根域
> +运行,与磁盘或网络设备相同,vTPM设备将在域的配置文件中进行设置
> +
> +为了使用诸如IMA(完整性测量架构)等需要在initrd之前加载TPM的功能,必须将
> +xen-tpmfront驱动程序编译到内核中。如果不使用这些功能,驱动程序可以作为
> +模块编译,并像往常一样加载。


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 7/7] docs/zh_CN: Add tpm tpm_ftpm_tee Chinese translation
  2025-01-23  5:17 ` [PATCH v3 7/7] docs/zh_CN: Add tpm tpm_ftpm_tee " Shuo Zhao
@ 2025-01-24  9:24   ` Yanteng Si
  0 siblings, 0 replies; 16+ messages in thread
From: Yanteng Si @ 2025-01-24  9:24 UTC (permalink / raw)
  To: Shuo Zhao, alexs, corbet; +Cc: zhaoyuehui, zhangwei, maoyuxian, linux-doc




在 2025/1/23 13:17, Shuo Zhao 写道:
> Translate .../security/tpm/tpm_ftpm_tee.rst into Chinese.
>
> Update the translation through commit e8bd417aab0c
> ("tpm/tpm_ftpm_tee: Document fTPM TEE driver")
>
> Reviewed-by: Alex Shi <alexs@kernel.org>
> Signed-off-by: Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
Reviewed-by: Yanteng Si <si.yanteng@linux.dev>

Thanks,
Yanteng
> ---
>   .../translations/zh_CN/security/tpm/index.rst |  4 +--
>   .../zh_CN/security/tpm/tpm_ftpm_tee.rst       | 31 +++++++++++++++++++
>   2 files changed, 32 insertions(+), 3 deletions(-)
>   create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst
>
> diff --git a/Documentation/translations/zh_CN/security/tpm/index.rst b/Documentation/translations/zh_CN/security/tpm/index.rst
> index bf95200ca586..707646590647 100644
> --- a/Documentation/translations/zh_CN/security/tpm/index.rst
> +++ b/Documentation/translations/zh_CN/security/tpm/index.rst
> @@ -17,6 +17,4 @@
>      tpm_tis
>      tpm_vtpm_proxy
>      xen-tpmfront
> -
> -TODOLIST:
> -*   tpm_ftpm_tee
> +   tpm_ftpm_tee
> diff --git a/Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst b/Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst
> new file mode 100644
> index 000000000000..5901eee32563
> --- /dev/null
> +++ b/Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst
> @@ -0,0 +1,31 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +.. include:: ../../disclaimer-zh_CN.rst
> +
> +:Original: Documentation/security/tpm/tpm_ftpm_tee.rst
> +
> +:翻译:
> + 赵硕 Shuo Zhao <zhaoshuo@cqsoftware.com.cn>
> +
> +===========
> +固件TPM驱动
> +===========
> +
> +本文档描述了固件可信平台模块(fTPM)设备驱动。
> +
> +介绍
> +====
> +
> +该驱动程序是用于ARM的TrustZone环境中实现的固件的适配器。该驱动
> +程序允许程序以与硬件TPM相同的方式与TPM进行交互。
> +
> +设计
> +====
> +
> +该驱动程序充当一个薄层,传递命令到固件实现的TPM并接收其响应。驱动
> +程序本身并不包含太多逻辑,更像是固件与内核/用户空间之间的一个管道。
> +
> +固件本身基于以下论文:
> +https://www.microsoft.com/en-us/research/wp-content/uploads/2017/06/ftpm1.pdf
> +
> +当驱动程序被加载时,它会向用户空间暴露 ``/dev/tpmX`` 字符设备,允许
> +用户空间通过该设备与固件TPM进行通信。


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 0/7] Add all Chinese translations in the tpm directory
  2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
                   ` (6 preceding siblings ...)
  2025-01-23  5:17 ` [PATCH v3 7/7] docs/zh_CN: Add tpm tpm_ftpm_tee " Shuo Zhao
@ 2025-02-04 16:54 ` Jonathan Corbet
  7 siblings, 0 replies; 16+ messages in thread
From: Jonathan Corbet @ 2025-02-04 16:54 UTC (permalink / raw)
  To: Shuo Zhao, alexs, si.yanteng
  Cc: zhaoyuehui, zhaoshuo, zhangwei, maoyuxian, linux-doc

Shuo Zhao <zhaoshuo@cqsoftware.com.cn> writes:

> Add all Chinese translations in the tpm directory.
>
> Shuo Zhao (7):
>   docs/zh_CN: Add tpm index Chinese translation
>   docs/zh_CN: Add tpm tpm_event_log Chinese translation
>   docs/zh_CN: Add tpm tpm-security Chinese translation
>   docs/zh_CN: Add tpm tpm_tis Chinese translation
>   docs/zh_CN: Add tpm tpm_vtpm_proxy Chinese translation
>   docs/zh_CN: Add tpm xen-tpmfront Chinese translation
>   docs/zh_CN: Add tpm tpm_ftpm_tee Chinese translation
>
>  .../translations/zh_CN/security/index.rst     |   2 +-
>  .../translations/zh_CN/security/tpm/index.rst |  20 +++
>  .../zh_CN/security/tpm/tpm-security.rst       | 151 ++++++++++++++++++
>  .../zh_CN/security/tpm/tpm_event_log.rst      |  49 ++++++
>  .../zh_CN/security/tpm/tpm_ftpm_tee.rst       |  31 ++++
>  .../zh_CN/security/tpm/tpm_tis.rst            |  43 +++++
>  .../zh_CN/security/tpm/tpm_vtpm_proxy.rst     |  51 ++++++
>  .../zh_CN/security/tpm/xen-tpmfront.rst       | 114 +++++++++++++
>  8 files changed, 460 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/translations/zh_CN/security/tpm/index.rst
>  create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm-security.rst
>  create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_event_log.rst
>  create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_ftpm_tee.rst
>  create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_tis.rst
>  create mode 100644 Documentation/translations/zh_CN/security/tpm/tpm_vtpm_proxy.rst
>  create mode 100644 Documentation/translations/zh_CN/security/tpm/xen-tpmfront.rst

I have applied the set, thanks.

jon

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-02-04 16:54 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-23  5:17 [PATCH v3 0/7] Add all Chinese translations in the tpm directory Shuo Zhao
2025-01-23  5:17 ` [PATCH v3 1/7] docs/zh_CN: Add tpm index Chinese translation Shuo Zhao
2025-01-24  6:58   ` Yanteng Si
2025-01-23  5:17 ` [PATCH v3 2/7] docs/zh_CN: Add tpm tpm_event_log " Shuo Zhao
2025-01-24  7:01   ` Yanteng Si
2025-01-23  5:17 ` [PATCH v3 3/7] docs/zh_CN: Add tpm tpm-security " Shuo Zhao
2025-01-24  9:19   ` Yanteng Si
2025-01-23  5:17 ` [PATCH v3 4/7] docs/zh_CN: Add tpm tpm_tis " Shuo Zhao
2025-01-24  9:20   ` Yanteng Si
2025-01-23  5:17 ` [PATCH v3 5/7] docs/zh_CN: Add tpm tpm_vtpm_proxy " Shuo Zhao
2025-01-24  9:21   ` Yanteng Si
2025-01-23  5:17 ` [PATCH v3 6/7] docs/zh_CN: Add tpm xen-tpmfront " Shuo Zhao
2025-01-24  9:23   ` Yanteng Si
2025-01-23  5:17 ` [PATCH v3 7/7] docs/zh_CN: Add tpm tpm_ftpm_tee " Shuo Zhao
2025-01-24  9:24   ` Yanteng Si
2025-02-04 16:54 ` [PATCH v3 0/7] Add all Chinese translations in the tpm directory Jonathan Corbet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.