Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ff66c00b
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ff66c00b
编写于
11月 07, 2016
作者:
J
Jonathan Corbet
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'tpm' into docs-next
上级
78566cf1
799a545b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
32 addition
and
38 deletion
+32
-38
Documentation/index.rst
Documentation/index.rst
+1
-0
Documentation/security/index.rst
Documentation/security/index.rst
+7
-0
Documentation/security/tpm/index.rst
Documentation/security/tpm/index.rst
+7
-0
Documentation/security/tpm/tpm_vtpm_proxy.rst
Documentation/security/tpm/tpm_vtpm_proxy.rst
+17
-38
Documentation/security/tpm/xen-tpmfront.txt
Documentation/security/tpm/xen-tpmfront.txt
+0
-0
未找到文件。
Documentation/index.rst
浏览文件 @
ff66c00b
...
...
@@ -57,6 +57,7 @@ needed).
media/index
gpu/index
80211/index
security/index
Indices and tables
==================
...
...
Documentation/security/index.rst
0 → 100644
浏览文件 @
ff66c00b
======================
Security documentation
======================
.. toctree::
tpm/index
Documentation/security/tpm/index.rst
0 → 100644
浏览文件 @
ff66c00b
=====================================
Trusted Platform Module documentation
=====================================
.. toctree::
tpm_vtpm_proxy
Documentation/
tpm/tpm_vtpm_proxy.tx
t
→
Documentation/
security/tpm/tpm_vtpm_proxy.rs
t
浏览文件 @
ff66c00b
=============================================
Virtual TPM Proxy Driver for Linux Containers
=============================================
Authors: Stefan Berger (IBM)
| Authors:
| Stefan Berger <stefanb@linux.vnet.ibm.com>
This document describes the virtual Trusted Platform Module (vTPM)
proxy device driver for Linux containers.
I
NTRODUCTION
------------
I
ntroduction
============
The goal of this work is to provide TPM functionality to each Linux
container. This allows programs to interact with a TPM in a container
the same way they interact with a TPM on the physical system. Each
container gets its own unique, emulated, software TPM.
DESIGN
------
Design
======
To make an emulated software TPM available to each container, the container
management stack needs to create a device pair consisting of a client TPM
character device
/dev/tpmX
(with X=0,1,2...) and a 'server side' file
character device
``/dev/tpmX``
(with X=0,1,2...) and a 'server side' file
descriptor. The former is moved into the container by creating a character
device with the appropriate major and minor numbers while the file descriptor
is passed to the TPM emulator. Software inside the container can then send
TPM commands using the character device and the emulator will receive the
commands via the file descriptor and use it for sending back responses.
To support this, the virtual TPM proxy driver provides a device
/dev/vtpmx
To support this, the virtual TPM proxy driver provides a device
``/dev/vtpmx``
that is used to create device pairs using an ioctl. The ioctl takes as
an input flags for configuring the device. The flags for example indicate
whether TPM 1.2 or TPM 2 functionality is supported by the TPM emulator.
The result of the ioctl are the file descriptor for the 'server side'
as well as the major and minor numbers of the character device that was created.
Besides that the number of the TPM character device is return. If for
example /dev/tpm10 was created, the number (dev_num) 10 is returned.
The following is the data structure of the TPM_PROXY_IOC_NEW_DEV ioctl:
struct vtpm_proxy_new_dev {
__u32 flags; /* input */
__u32 tpm_num; /* output */
__u32 fd; /* output */
__u32 major; /* output */
__u32 minor; /* output */
};
Note that if unsupported flags are passed to the device driver, the ioctl will
fail and errno will be set to EOPNOTSUPP. Similarly, if an unsupported ioctl is
called on the device driver, the ioctl will fail and errno will be set to
ENOTTY.
See /usr/include/linux/vtpm_proxy.h for definitions related to the public interface
of this vTPM device driver.
Besides that the number of the TPM character device is returned. If for
example ``/dev/tpm10`` was created, the number (``dev_num``) 10 is returned.
Once the device has been created, the driver will immediately try to talk
to the TPM. All commands from the driver can be read from the file descriptor
returned by the ioctl. The commands should be responded to immediately.
Depending on the version of TPM the following commands will be sent by the
driver:
UAPI
====
- TPM 1.2:
- the driver will send a TPM_Startup command to the TPM emulator
- the driver will send commands to read the command durations and
interface timeouts from the TPM emulator
- TPM 2:
- the driver will send a TPM2_Startup command to the TPM emulator
.. kernel-doc:: include/uapi/linux/vtpm_proxy.h
The TPM device /dev/tpmX will only appear if all of the relevant commands
were responded to properly.
.. kernel-doc:: drivers/char/tpm/tpm_vtpm_proxy.c
:functions: vtpmx_ioc_new_dev
Documentation/tpm/xen-tpmfront.txt
→
Documentation/
security/
tpm/xen-tpmfront.txt
浏览文件 @
ff66c00b
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录