Skip to content

Commit

Permalink
Merge pull request #1148 from c3d/issue/1147-device-location
Browse files Browse the repository at this point in the history
config-linux: Clarify where device nodes can be created
  • Loading branch information
AkihiroSuda authored Feb 15, 2023
2 parents 4f38d2d + 3565df5 commit 58ec43f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Each entry has the following structure:
More info in [mknod(1)][mknod.1].
* **`path`** *(string, REQUIRED)* - full path to device inside container.
If a [file][] already exists at `path` that does not match the requested device, the runtime MUST generate an error.
The path MAY be anywhere in the container filesystem, notably outside of `/dev`.
* **`major, minor`** *(int64, REQUIRED unless `type` is `p`)* - [major, minor numbers][devices] for the device.
* **`fileMode`** *(uint32, OPTIONAL)* - file mode for the device.
You can also control access to devices [with cgroups](#configLinuxDeviceAllowedlist).
Expand All @@ -141,6 +142,14 @@ Each entry has the following structure:

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

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


### Example

```json
Expand Down

0 comments on commit 58ec43f

Please sign in to comment.