요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=============================
Virtual TPM interface for Xen
=============================
Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
This document describes the virtual Trusted Platform Module (vTPM) subsystem for
Xen. The reader is assumed to have familiarity with building and installing Xen,
Linux, and a basic understanding of the TPM and vTPM concepts.
Introduction
------------
The goal of this work is to provide a TPM functionality to a virtual guest
operating system (in Xen terms, a DomU). This allows programs to interact with
a TPM in a virtual system the same way they interact with a TPM on the physical
system. Each guest gets its own unique, emulated, software TPM. However, each
of the vTPM's secrets (Keys, NVRAM, etc) are managed by a vTPM Manager domain,
which seals the secrets to the Physical TPM. If the process of creating each of
these domains (manager, vTPM, and guest) is trusted, the vTPM subsystem extends
the chain of trust rooted in the hardware TPM to virtual machines in Xen. Each
major component of vTPM is implemented as a separate domain, providing secure
separation guaranteed by the hypervisor. The vTPM domains are implemented in
mini-os to reduce memory and processor overhead.
This mini-os vTPM subsystem was built on top of the previous vTPM work done by
IBM and Intel corporation.
Design Overview
---------------
The architecture of vTPM is described below::
+------------------+
| 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:
The Linux based guest that wants to use a vTPM. There may be
more than one of these.
* xen-tpmfront.ko:
Linux kernel virtual TPM frontend driver. This driver
provides vTPM access to a Linux-based DomU.
* mini-os/tpmback:
Mini-os TPM backend driver. The Linux frontend driver
connects to this backend driver to facilitate communications
between the Linux DomU and its vTPM. This driver is also
used by vtpmmgr-stubdom to communicate with vtpm-stubdom.
* vtpm-stubdom:
A mini-os stub domain that implements a vTPM. There is a
one to one mapping between running vtpm-stubdom instances and
logical vtpms on the system. The vTPM Platform Configuration
Registers (PCRs) are normally all initialized to zero.
* mini-os/tpmfront:
Mini-os TPM frontend driver. The vTPM mini-os domain
vtpm-stubdom uses this driver to communicate with
vtpmmgr-stubdom. This driver is also used in mini-os
domains such as pv-grub that talk to the vTPM domain.
* vtpmmgr-stubdom:
A mini-os domain that implements the vTPM manager. There is
only one vTPM manager and it should be running during the
entire lifetime of the machine. This domain regulates
access to the physical TPM on the system and secures the
persistent state of each vTPM.
* mini-os/tpm_tis:
Mini-os TPM version 1.2 TPM Interface Specification (TIS)
driver. This driver used by vtpmmgr-stubdom to talk directly to
the hardware TPM. Communication is facilitated by mapping
hardware memory pages into vtpmmgr-stubdom.
* Hardware TPM:
The physical TPM that is soldered onto the motherboard.
Integration With Xen
--------------------
Support for the vTPM driver was added in Xen using the libxl toolstack in Xen
4.3. See the Xen documentation (docs/misc/vtpm.txt) for details on setting up
the vTPM and vTPM Manager stub domains. Once the stub domains are running, a
vTPM device is set up in the same manner as a disk or network device in the
domain's configuration file.
In order to use features such as IMA that require a TPM to be loaded prior to
the initrd, the xen-tpmfront driver must be compiled in to the kernel. If not
using such features, the driver can be compiled as a module and will be loaded
as usual.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
문서 범위와 전제 지식
1-10이 문서는 Xen의 가상 신뢰 플랫폼 모듈(vTPM) 서브시스템을 설명한다. 저자는 JHUAPL의 Matthew Fioravante와 NSA의 Daniel De Graaf이다.
독자는 Xen과 Linux를 빌드하고 설치하는 방법에 익숙하며, TPM과 vTPM의 기본 개념을 이해하고 있다고 가정한다.
다루는 시스템과 독자에게 요구되는 배경지식을 구분한다.
=============================
Virtual TPM interface for Xen
=============================
Authors: Matthew Fioravante (JHUAPL), Daniel De Graaf (NSA)
This document describes the virtual Trusted Platform Module (vTPM) subsystem for
Xen. The reader is assumed to have familiarity with building and installing Xen,
Linux, and a basic understanding of the TPM and vTPM concepts.
vTPM의 목표와 신뢰 사슬
11-29이 작업의 목표는 Xen에서 DomU라고 부르는 가상 게스트 운영체제에 TPM 기능을 제공하는 것이다. 프로그램은 가상 시스템의 TPM을 물리 시스템의 TPM과 같은 방식으로 사용할 수 있다.
각 게스트는 서로 고유한 에뮬레이션 소프트웨어 TPM을 하나씩 받는다. 그러나 각 vTPM의 비밀 정보인 Keys, NVRAM 등은 vTPM Manager 도메인이 관리하며, 이 도메인은 비밀 정보를 Physical TPM에 seal한다.
Manager, vTPM, guest 도메인을 만드는 절차를 신뢰할 수 있다면 vTPM 서브시스템은 hardware TPM에 뿌리를 둔 신뢰 사슬을 Xen 가상 머신까지 확장한다. 주요 구성 요소는 각각 별도 도메인으로 구현되어 hypervisor가 보장하는 보안 격리를 얻는다.
vTPM 도메인은 메모리와 프로세서 오버헤드를 줄이기 위해 mini-os로 구현되었다. 이 mini-os vTPM 서브시스템은 IBM과 Intel Corporation이 앞서 수행한 vTPM 작업 위에 구축되었다.
물리 TPM의 신뢰를 격리된 Xen 도메인으로 전달하는 조건을 보여 준다.
게스트별 자원과 시스템 공용 자원의 책임을 나눈다.
Introduction
------------
The goal of this work is to provide a TPM functionality to a virtual guest
operating system (in Xen terms, a DomU). This allows programs to interact with
a TPM in a virtual system the same way they interact with a TPM on the physical
system. Each guest gets its own unique, emulated, software TPM. However, each
of the vTPM's secrets (Keys, NVRAM, etc) are managed by a vTPM Manager domain,
which seals the secrets to the Physical TPM. If the process of creating each of
these domains (manager, vTPM, and guest) is trusted, the vTPM subsystem extends
the chain of trust rooted in the hardware TPM to virtual machines in Xen. Each
major component of vTPM is implemented as a separate domain, providing secure
separation guaranteed by the hypervisor. The vTPM domains are implemented in
mini-os to reduce memory and processor overhead.
This mini-os vTPM subsystem was built on top of the previous vTPM work done by
IBM and Intel corporation.
DomU에서 Hardware TPM까지의 구조
30-68vTPM 요청은 Linux DomU의 `xen-tpmfront`에서 시작해 게스트 전용 `vtpm-stubdom`으로 전달되고, 이어서 시스템 공용 `vtpmmgr-stubdom`을 거쳐 Hardware TPM에 도달한다. 원문의 위아래 화살표는 이 경로가 요청과 응답을 모두 운반하는 양방향 통신임을 나타낸다.
첫 번째 `mini-os/tpmback`은 Linux frontend와 `vtpm-stubdom` 사이를 잇는다. `vtpm-stubdom` 안의 `mini-os/tpmfront`는 Manager 쪽 `mini-os/tpmback`에 연결되고, Manager의 `mini-os/tpm_tis`가 최종적으로 물리 TPM과 통신한다.
원문의 ASCII 계층을 같은 순서의 구조화 도식으로 옮겼다. 각 단계 사이는 요청과 응답이 오간다.
frontend와 backend가 어느 도메인 경계를 연결하는지 정리한다.
Design Overview
---------------
The architecture of vTPM is described below::
+------------------+
| 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 |
+------------------+
게스트와 vTPM 도메인 구성 요소
69-88Linux DomU는 vTPM을 사용하려는 Linux 기반 게스트이며 여러 개가 존재할 수 있다. `xen-tpmfront.ko`는 Linux 기반 DomU가 vTPM에 접근하도록 하는 Linux kernel 가상 TPM frontend driver다.
`mini-os/tpmback`은 mini-os TPM backend driver다. Linux frontend가 이 backend에 연결되어 Linux DomU와 해당 vTPM 사이의 통신을 중계한다. 같은 driver는 `vtpmmgr-stubdom`이 `vtpm-stubdom`과 통신할 때도 사용된다.
`vtpm-stubdom`은 vTPM을 구현하는 mini-os stub domain이다. 실행 중인 `vtpm-stubdom` 인스턴스와 시스템의 논리 vTPM 사이에는 일대일 대응 관계가 있다. vTPM Platform Configuration Registers(PCRs)는 일반적으로 모두 0으로 초기화된다.
DomU 요청이 게스트별 논리 vTPM에 도착할 때까지의 역할을 구분한다.
Linux 프로그램의 TPM 요청이 게스트 전용 vTPM 구현에 전달된다.
* Linux DomU:
The Linux based guest that wants to use a vTPM. There may be
more than one of these.
* xen-tpmfront.ko:
Linux kernel virtual TPM frontend driver. This driver
provides vTPM access to a Linux-based DomU.
* mini-os/tpmback:
Mini-os TPM backend driver. The Linux frontend driver
connects to this backend driver to facilitate communications
between the Linux DomU and its vTPM. This driver is also
used by vtpmmgr-stubdom to communicate with vtpm-stubdom.
* vtpm-stubdom:
A mini-os stub domain that implements a vTPM. There is a
one to one mapping between running vtpm-stubdom instances and
logical vtpms on the system. The vTPM Platform Configuration
Registers (PCRs) are normally all initialized to zero.
Manager와 물리 TPM 구성 요소
89-111`mini-os/tpmfront`는 mini-os TPM frontend driver다. vTPM mini-os 도메인인 `vtpm-stubdom`이 이를 사용해 `vtpmmgr-stubdom`과 통신한다. 또한 `pv-grub`처럼 vTPM 도메인과 통신하는 다른 mini-os 도메인도 이 driver를 사용한다.
`vtpmmgr-stubdom`은 vTPM Manager를 구현하는 mini-os domain이다. vTPM Manager는 하나만 존재하며 시스템이 살아 있는 동안 내내 실행되어야 한다. 이 도메인은 시스템의 physical TPM 접근을 조절하고 각 vTPM의 persistent state를 보호한다.
`mini-os/tpm_tis`는 TPM 1.2 TPM Interface Specification(TIS)용 mini-os driver다. `vtpmmgr-stubdom`은 이 driver로 hardware TPM과 직접 통신하며, hardware memory pages를 Manager 도메인에 mapping해 통신한다. Hardware TPM은 motherboard에 납땜된 물리 TPM이다.
시스템 공용 Manager와 물리 장치 사이의 책임 및 수명을 정리한다.
게스트별 vTPM 상태를 시스템 공용 Manager가 물리 TPM에 연결한다.
* mini-os/tpmfront:
Mini-os TPM frontend driver. The vTPM mini-os domain
vtpm-stubdom uses this driver to communicate with
vtpmmgr-stubdom. This driver is also used in mini-os
domains such as pv-grub that talk to the vTPM domain.
* vtpmmgr-stubdom:
A mini-os domain that implements the vTPM manager. There is
only one vTPM manager and it should be running during the
entire lifetime of the machine. This domain regulates
access to the physical TPM on the system and secures the
persistent state of each vTPM.
* mini-os/tpm_tis:
Mini-os TPM version 1.2 TPM Interface Specification (TIS)
driver. This driver used by vtpmmgr-stubdom to talk directly to
the hardware TPM. Communication is facilitated by mapping
hardware memory pages into vtpmmgr-stubdom.
* Hardware TPM:
The physical TPM that is soldered onto the motherboard.
Xen 통합과 driver 빌드 방식
112-124vTPM driver 지원은 Xen 4.3에서 libxl toolstack을 통해 Xen에 추가되었다. vTPM과 vTPM Manager stub domain을 설정하는 자세한 방법은 Xen 문서 `docs/misc/vtpm.txt`를 참조한다.
stub domain이 실행 중이면 도메인 configuration file에서 disk 또는 network device를 설정하는 것과 같은 방식으로 vTPM device를 설정한다.
TPM이 initrd보다 먼저 로드되어야 하는 IMA 같은 기능을 사용하려면 `xen-tpmfront` driver를 kernel에 built-in으로 컴파일해야 한다. 그런 기능을 사용하지 않으면 driver를 module로 컴파일해 일반적인 방식으로 로드할 수 있다.
TPM이 필요한 시점에 따라 built-in과 module을 선택한다.
stub domain 준비부터 DomU 사용까지의 통합 순서다.
Integration With Xen
--------------------
Support for the vTPM driver was added in Xen using the libxl toolstack in Xen
4.3. See the Xen documentation (docs/misc/vtpm.txt) for details on setting up
the vTPM and vTPM Manager stub domains. Once the stub domains are running, a
vTPM device is set up in the same manner as a disk or network device in the
domain's configuration file.
In order to use features such as IMA that require a TPM to be loaded prior to
the initrd, the xen-tpmfront driver must be compiled in to the kernel. If not
using such features, the driver can be compiled as a module and will be loaded
as usual.
요약·해설
xen-tpmfront.rst:1-124Xen vTPM은 DomU마다 고유한 vtpm-stubdom을 제공하고, 시스템 전체에 하나뿐인 vtpmmgr-stubdom이 Keys·NVRAM·영속 상태를 Physical TPM에 연결해 보호합니다. xen-tpmfront부터 mini-os의 frontend/backend와 TPM TIS driver까지 이어지는 양방향 경로, 각 도메인의 수명과 대응 관계, Xen 4.3 libxl 설정 및 IMA 사용 시 built-in 빌드 조건을 함께 설명합니다.