Skip to content

Commit 58ec43f

Browse files
authored
Merge pull request #1148 from c3d/issue/1147-device-location
config-linux: Clarify where device nodes can be created
2 parents 4f38d2d + 3565df5 commit 58ec43f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

config-linux.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ Each entry has the following structure:
133133
More info in [mknod(1)][mknod.1].
134134
* **`path`** *(string, REQUIRED)* - full path to device inside container.
135135
If a [file][] already exists at `path` that does not match the requested device, the runtime MUST generate an error.
136+
The path MAY be anywhere in the container filesystem, notably outside of `/dev`.
136137
* **`major, minor`** *(int64, REQUIRED unless `type` is `p`)* - [major, minor numbers][devices] for the device.
137138
* **`fileMode`** *(uint32, OPTIONAL)* - file mode for the device.
138139
You can also control access to devices [with cgroups](#configLinuxDeviceAllowedlist).
@@ -141,6 +142,14 @@ Each entry has the following structure:
141142

142143
The same `type`, `major` and `minor` SHOULD NOT be used for multiple devices.
143144

145+
Containers MAY NOT access any device node that is not either explicitly
146+
referenced in the **`devices`** array or listed as being part of the
147+
[default devices](#configLinuxDefaultDevices).
148+
Rationale: runtimes based on virtual machines need to be able to adjust the node
149+
devices, and accessing device nodes that were not adjusted could have undefined
150+
behaviour.
151+
152+
144153
### Example
145154

146155
```json

0 commit comments

Comments
 (0)