You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-device-attach/3.bounce_buffers.md
+16-18Lines changed: 16 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,46 +10,44 @@ layout: learningpathall
10
10
11
11
Bounce buffers are temporary memory areas used when a device cannot perform DMA on the original buffer.
12
12
13
-
Common reasons for this include:
13
+
Common reasons include:
14
14
15
-
- The original buffer is not physically contiguous
16
-
- The buffer resides in memory not accessible by the device
17
-
- The buffer does not meet the device alignment or boundary constraints
15
+
- The original buffer is not physically contiguous.
16
+
- The buffer resides in memory not accessible by the device.
17
+
- The buffer does not meet the device alignment or boundary constraints.
18
18
19
19
## Why use bounce buffers?
20
20
21
-
Data bounces between:
21
+
Data *bounces* between:
22
22
23
23
- The original buffer in user space or kernel space
24
24
- The DMA-capable bounce buffer used for device I/O
25
25
26
-
This indirection allows the transfer to proceed when the original buffer is unsuitable for DMA.
26
+
This indirection allows data transfer to proceed when the original buffer is unsuitable for DMA.
27
27
28
28
## CCA Realms, VirtIO, and bounce buffers
29
29
30
-
A defining feature of a Realm is that its memory (Realm memory) is cryptographically isolated from both the Normal and Secure Worlds.
30
+
A defining feature of a Realm is that its memory (Realm memory) is cryptographically isolated from both Normal Secure Worlds:
31
31
32
32
This means:
33
33
34
-
- Realm memory is encrypted with unique keys
35
-
- Non-Realm entities (host OS, hypervisor) cannot directly read or
36
-
write to Realm memory
37
-
- Direct Memory Access (DMA) from peripherals or untrusted drivers cannot
38
-
access Realm data
34
+
- Realm memory is encrypted with unique keys.
35
+
- The host OS and hypervisor cannot directly read or write Realm memory.
36
+
- Direct Memory Access (DMA) from peripherals or untrusted drivers cannot access Realm data.
39
37
40
-
This design ensures confidentiality but presents a challenge: how can a Realm exchange data with untrusted components such as host network stacks or storage subsystems? The practical answer is to use bounce buffers as intermediaries - exchanging data securely with untrusted components (for example, network stacks, storage subsystems).
38
+
This isolation ensures confidentiality but requires a secure way to exchange data with untrusted components such as host network stacks or storage subsystems. Bounce buffers provide this mechanism.
41
39
42
-
###How are bounce buffers used with RME?
40
+
## How are bounce buffers used with RME?
43
41
44
-
Bounce buffers are used with RME to export and import data:
42
+
With RME, Realms use bounce buffers to export and import data.
45
43
46
-
For exporting data:
44
+
**Exporting data**:
47
45
- A Realm application prepares data (for example, the results of computation)
48
46
- It copies the data from protected Realm memory into a bounce buffer
49
47
- The Realm notifies the untrusted host or hypervisor
50
48
- The host retrieves the data from the bounce buffer
51
49
52
-
For importing Data:
50
+
**Importing data**:
53
51
- The host places data into a bounce buffer
54
52
- The Realm is notified and validates the source
55
53
- The Realm copies the data from the bounce buffer into protected memory
@@ -60,7 +58,7 @@ This pattern preserves confidentiality and integrity of Realm data because:
60
58
- Incoming data can be validated and sanitized before import
61
59
- Only data explicitly copied out leaves Realm protection
62
60
63
-
###Does a bounce buffer preserve confidentiality?
61
+
## Does a bounce buffer preserve confidentiality?
64
62
65
63
A bounce buffer preserves the confidentiality of other Realm data because only the explicitly shared region is exposed. However, the transferred data is outside Realm protection once it leaves. Use protocol-level encryption such as TLS for network traffic to keep that data confidential in transit.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/cca-device-attach/4.lab-observe-bounce-buffers.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ layout: learningpathall
8
8
9
9
## See a Realm's bounce buffers in action
10
10
11
-
You will confirm bounce buffer usage using the Key Broker demo from the [CCA Essentials Learning Path](/learning-paths/servers-and-cloud-computing/cca-essentials/example/).
11
+
In this exercise, you’ll run the CCA Key Broker demo inside a Realm and use kernel tracing to confirm that bounce buffers (SWIOTLB) are used for VirtIO network I/O. You will confirm bounce buffer usage using the Key Broker demo from the [CCA Essentials Learning Path](/learning-paths/servers-and-cloud-computing/cca-essentials/example/).
12
12
13
-
###Start the Key Broker Server (KBS)
13
+
## Start the Key Broker server (KBS)
14
14
15
-
Pull the docker container image with the pre-built KBS, and run the container:
15
+
Pull the Docker container image with the pre-built KBS, and run the container:
@@ -54,12 +54,12 @@ INFO Actix runtime found; starting in Actix runtime
54
54
INFO starting service: "actix-web-service-172.17.0.2:8088", workers: 16, listening on: 172.17.0.2:8088
55
55
```
56
56
57
-
###Get into a Realm
57
+
## Get into a Realm guest
58
58
59
59
With the Key Broker Server running in one terminal, open up a new terminal in
60
60
which you will run the Key Broker Client (KBC). The intent is to confirm that the data transmitted over the network (through `virtio_net`) are indeed using bounce buffers.
61
61
62
-
Pull the docker container image with the pre-built KBC, and then run the container:
62
+
Pull the Docker container image with the pre-built KBC, and then run the container:
0 commit comments