Skip to content

Commit 6b416b2

Browse files
philipandarossphilipson
authored andcommitted
FAQ.md: remove outdated info, fix factual errors
Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
1 parent 45109ed commit 6b416b2

File tree

1 file changed

+67
-118
lines changed

1 file changed

+67
-118
lines changed

docs/FAQ.md

Lines changed: 67 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,57 @@
11
# TrenchBoot FAQ
22

3-
1. [Why use Trenchboot?](#1-why-use-trenchboot-background-info)
3+
1. [Why use TrenchBoot?](#1-why-use-trenchboot-background-info)
44
2. [How does TrenchBoot work?](
55
#2-how-does-trenchboot-work-trenchboot-architecture)
6-
3. [How to use Trenchboot?](#3-how-to-use-trenchboot-practical-usage)
7-
4. [Why does TrenchBoot use an intermediate launcher?](
8-
#4-why-does-trenchboot-use-an-intermediate-launcher)
9-
5. [What are the benefits of measurement over signature validation?](
10-
#5-what-are-the-benefits-of-measurement-over-signature-validation)
11-
6. [What do I need to incorporate TrenchBoot into my system?](
12-
#6-what-do-i-need-to-incorporate-trenchboot-into-my-system)
13-
7. [Where do I start if I want to help with contributions?](
14-
#7-where-do-i-start-if-i-want-to-help-with-contributions)
15-
8. [Where to find the sources?](#8-trenchboot-sources)
16-
9. [Various GitHub and further documentation links](
17-
#9-various-github-and-further-documentation-links)
18-
19-
## 1. Why use Trenchboot? (background info)
6+
3. [Why does TrenchBoot use an intermediate launcher?](
7+
#3-why-does-trenchboot-use-an-intermediate-launcher)
8+
4. [What are the benefits of measurement over signature validation?](
9+
#4-what-are-the-benefits-of-measurement-over-signature-validation)
10+
5. [What do I need to incorporate TrenchBoot into my system?](
11+
#5-what-do-i-need-to-incorporate-trenchboot-into-my-system)
12+
6. [Where do I start if I want to help with contributions?](
13+
#6-where-do-i-start-if-i-want-to-help-with-contributions)
14+
15+
## 1. Why use TrenchBoot? (background info)
2016

2117
### What is Trust?
2218

23-
Trust is when the computer does something on our behalf and we have to trust it
24-
with our data. A trusted component is that which always behaves in an expected
25-
manner. To make a component "trusted", you must establish some root of trust.
26-
A Root of Trust Measurement is the process of measuring (hashing) components on
27-
a system to validate their integrity. When establishing a root of trust, there
28-
are two primary schools of thought: Static Root of Trust Measurements and
29-
Dynamic Root of Trust Measurements.
19+
Like our [Glossary](./theory/Glossary.md#trust) says,
20+
trust is an assured reliance on the properties, ability, strength, or truth of
21+
an entity. If we assume any information or property is true without measuring
22+
and proving it, we need to trust it. This might include the belief, that our
23+
computer will behave in an expected way, that it won't leak our data, that it
24+
won't do something we didn't intend to do.
25+
26+
When establishing the trust of system components there are two primary schools
27+
of thought: Static Root of Trust for Measurement (SRTM) and Dynamic Root of Trust
28+
for Measurement (DRTM).
3029

3130
### SRTM
3231

33-
SRTM takes place at system boot from firmware / bios. This process requires
34-
measurements of the entire boot sequence at once. This is both a good and a
35-
bad thing, because any changes to any part of the process (including even
36-
bios settings) would cause the entire system to need to be remeasured. SRTM
37-
Starts with Core Root of Trust for Measurement (CRTM), and works its way up the chain where
38-
each link verifies the next. In other words, SRTM starts by measuring the bios
39-
boot block and then moves on to measure the rest of the bios.
32+
SRTM Starts with Core Root of Trust for Measurement (CRTM), and works its way
33+
up the chain where each link verifies the next. In other words, SRTM starts by
34+
measuring the BIOS boot block and then moves on to measure the rest of the BIOS.
35+
SRTM has a few problems:
36+
37+
- Large TCB (Trusted Computing Base) - the more software as a part of the chain
38+
of trust, the more potential vectors of attack.
39+
- Takes place before boot - reassuring the validity of the chain of trust
40+
requires a reboot.
41+
- Only provides load-time integrity assurance - the integrity was maintained
42+
during boot, but there is no guarantee it will stay like that.
4043

4144
### DRTM
4245

4346
DRTM aims to address shortcomings of SRTM. DRTM creates trusted environment from
44-
an untrusted state. Essentially what this means is that regardless of weather
47+
an untrusted state. Essentially what this means is that regardless of whether
4548
or not computer was booted from trusted software, it uses hardware to ensure
46-
that no malicious software has been run. For this reason, DRTM takes place
47-
after boot, as opposed to SRTM, which takes place pre-boot. Intel's solution
48-
for DRTM is TXT, which utilizes special instructions on the processor (SMX).
49-
AMD's solution for DRTM is called SKINIT. Trenchboot provides a solution for
50-
setting up DRTM for an arbitrary platform.
49+
that no malicious software, which may or may not have been run before the
50+
dynamic launch, can impact software started after the dynamic launch. For this
51+
reason, DRTM takes place after boot, as opposed to SRTM, which takes place
52+
pre-boot. Intel's solution for DRTM is TXT, which utilizes special instructions
53+
on the processor (SMX). AMD's solution for DRTM is called SKINIT. TrenchBoot
54+
provides a solution for setting up DRTM for an arbitrary platform.
5155

5256
### Typical Measured Launch Process
5357

@@ -68,7 +72,11 @@ The process for carrying out DTRM depends on your system:
6872
time DRTM sequence is initiated
6973
- Most DRTM systems support only one attestation action
7074

71-
## 2. How does TrenchBoot work? (trenchboot architecture)
75+
Trenchboot is meant to solve these, and many other problems by providing a
76+
universal framework for building integrity of software components in the
77+
process of booting a computer system.
78+
79+
## 2. How does TrenchBoot work? (TrenchBoot architecture)
7280

7381
### Architecture Overview
7482

@@ -82,78 +90,37 @@ appropriate for the given hardware. The intermediate phase analyzes the
8290
information collected in the bootstrap phase to decide if it wants to continue
8391
booting and pass control to the target OS, or if it wants to stop immediately.
8492
If desired, additional evidence/measurements can be gathered in this phase. Once
85-
the integrity of the system is verified the TrenchBoot kernel passes off
86-
control to the actual desired OS to initiate the runtime phase.
93+
the integrity of the system is verified the TrenchBoot kernel passes off
94+
control to the actual desired OS to initiate the runtime phase.
8795

8896
### Bootstrap Phase - GRUB
8997

90-
Typically, when attempting to establish a DRTM, TBoot is loaded in order to
91-
carry out TXT on Intel, or SKINIT is used on AMD. TrenchBoot instead utilizes
92-
its own system, which is a custom version of GRUB that has commands built in to
93-
carry out a TrenchBoot "Secure Launch". This customized GRUB introduces the
94-
`slaunch` and `slaunch_module` commands. A working example of the TrenchBoot
95-
GRUB can be found at
96-
[https://github.com/3mdeb/meta-trenchboot](
97-
https://github.com/3mdeb/meta-trenchboot).
98-
The custom GRUB works with Linux and Multiboot2 boot protocols for both Intel
99-
and AMD devices, but only in case of legacy boot, without support for UEFI
100-
(although it's available on a separate branch).
98+
TrenchBoot utilizes its own system to carry out TXT on Intel, or SKINIT on AMD,
99+
which is a custom version of GRUB that has commands built in to carry out a
100+
TrenchBoot _Secure Launch_. Those commands are `slaunch` and `slaunch_module`.
101+
102+
The custom GRUB works with:
103+
104+
- Linux boot protocol (Intel only, legacy and UEFI),
105+
- Multiboot2 boot protocol (both Intel and AMD, but only legacy boot).
106+
107+
Support for [AMD Linux](https://github.com/TrenchBoot/trenchboot-issues/milestone/8)
108+
and [Multiboot2 UEFI](https://github.com/TrenchBoot/trenchboot-issues/milestone/11)
109+
will be added later.
101110

102111
### Intermediate Phase - Linux Kernel / U-ROOT (Initramfs)
103112

104113
The intermediate phase processes information collected in the bootstrap phase
105114
and converts it into normalized data. This data is eventually used to determine
106-
whether to boot into the target OS. The kernel and u-root initramfs
107-
together make up Trenchboot's "Security Engine", which is an intermediate
108-
mini-OS that serves to process data gathered by that bootstrap phase. During the
115+
whether to boot into the target OS. The kernel and u-root initramfs together
116+
make up TrenchBoot's _Security Engine_, which is an intermediate mini-OS that
117+
serves to process data gathered by that bootstrap phase. During the
109118
intermediate phase, the kernel and initramfs work together to measure block
110119
devices, individual files, SMBUS/DMI information and provides unseal based,
111-
external device and network based attestation. Trenchboot calls this
112-
functionality secure launch (aka slaunch). The table in section 4 lists the
113-
specific repo and branch to use when building the kernel or u-root.
114-
115-
## 3. How to use Trenchboot? (practical usage)
116-
117-
### Trenchboot GRUB TXT Config with Serial Communication
118-
119-
*Note: ACM modules can be downloaded from [Intel's site][acm-download] (look for
120-
"Production SINIT ACM Download").*
121-
122-
[acm-download]: https://www.intel.com/content/www/us/en/developer/articles/tool/intel-trusted-execution-technology.html
120+
external device and network based attestation. TrenchBoot calls this
121+
functionality secure launch (aka slaunch).
123122

124-
```text
125-
menuentry 'TrenchBoot' {
126-
savedefault
127-
load_video
128-
set gfxpayload=keep
129-
insmod gzio
130-
insmod part_msdos
131-
insmod ext2
132-
set root='hd0,msdos1'
133-
multiboot2 /boot/slboot.gz loglvl=all serial=115200,8n1,0x3f8 logging=serial,memory
134-
module2 /boot/vmlinuz-trenchboot root=UUID=<your block uuid> ro intel_iommu=on loglevel=7 console=ttyS0,115200 nokaslr
135-
slaunch
136-
slaunch_module /boot/<your acm>.bin
137-
}
138-
```
139-
140-
### Testing the System
141-
142-
QEMU has been tested to boot fully into u-root while simulating the Trenchboot
143-
kernel.
144-
QEMU For external u-root
145-
146-
```bash
147-
qemu-systemx86_64 -kernel <kernel repo>/arch/x86/boot/bzImage -initrd /tmp/initramfs.linux_amd64.cpio -append console=ttyS0,38400 -serial file:serial.out
148-
```
149-
150-
QEMU with u-root built-in
151-
152-
```bash
153-
qemu-systemx86_64 -kernel <kernel location>
154-
```
155-
156-
## 4. Why does TrenchBoot use an intermediate launcher?
123+
## 3. Why does TrenchBoot use an intermediate launcher?
157124

158125
For Linux systems doing both verified (secure) and measured boot, there is an
159126
intermediary that handles the security enforcement. For verified boot it is the
@@ -164,7 +131,7 @@ that the UEFI shim also serves as a trust delegation point that transitions
164131
from Microsoft Authority to Distribution/Installer/No Authority. The response
165132
why this is not of concern will be addressed in the next question.
166133

167-
## 5. What are the benefits of measurement over signature validation?
134+
## 4. What are the benefits of measurement over signature validation?
168135

169136
It is important to understand that one solution is not necessarily more
170137
beneficial over the other. Measurement and Verification each have their merits
@@ -179,7 +146,7 @@ a strong assertion to correctness that can be repeatedly extended and verified.
179146
It therefore relies on the ability to know what correct is and to securely
180147
verify measurement with expected correctness.
181148

182-
## 6. What do I need to incorporate TrenchBoot into my system?
149+
## 5. What do I need to incorporate TrenchBoot into my system?
183150

184151
TrenchBoot is a framework that allows you to build a Linux kernel with a
185152
tailored, embedded initramfs that functions as an intermediate loader to launch
@@ -188,27 +155,9 @@ engine components you desire, provide any necessary configurations, and build
188155
an instance of the loader. After that, you configure your system boot to launch
189156
the loader.
190157

191-
## 7. Where do I start if I want to help with contributions?
158+
## 6. Where do I start if I want to help with contributions?
192159

193160
The [TrenchBoot Blueprints](./blueprints/index.md)
194161
are how feature requests are collected for the project. Check if there is a
195162
blueprint that is of your interest, if not, submit a blueprint via a pull
196163
request for a feature you would like to see implemented.
197-
198-
## 8. Trenchboot Sources
199-
200-
For trenchboot sources see [Blueprints page](./blueprints/index.md) and
201-
TrenchBoot's [GitHub page](https://github.com/TrenchBoot).
202-
203-
## 9. Various GitHub and further documentation links
204-
205-
- Yocto recipes for building a bootable image with customized TrenchBoot
206-
components (EFI and legacy GRUB2, Linux, ACM/SKL) and tpm2 tools (2024,
207-
September 4) &ndash;
208-
[github.com/3mdeb/meta-trenchboot](https://github.com/3mdeb/meta-trenchboot)
209-
210-
- TrenchBoot informative talk
211-
The Linux Foundation. (2019, October 1). *TrenchBoot - How to Nicely Boot System
212-
with Intel TXT and AMD SVM* &ndash;
213-
[youtube.com/watch?v=DbpCU9iSi4g](
214-
https://www.youtube.com/watch?v=DbpCU9iSi4g)

0 commit comments

Comments
 (0)