Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host-ctr: Unmask /sys/firmware from host containers #2573

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions sources/host-ctr/cmd/host-ctr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,20 @@ func runCtr(containerdSocket string, namespace string, containerID string, sourc
oci.WithHostNamespace(runtimespec.NetworkNamespace),
oci.WithHostHostsFile,
oci.WithHostResolvconf,
// Unmask `/sys/firmware` by passing an alternate list of masked paths
// List is based on the DefaultUnixSpec's MaskedPaths for Linux
// (https://github.com/containerd/containerd/blob/e9af808/oci/spec.go#L164)
oci.WithMaskedPaths([]string{
"/proc/acpi",
"/proc/asound",
jpculp marked this conversation as resolved.
Show resolved Hide resolved
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
}),
// Pass proxy environment variables to this container
withProxyEnv(),
// Add a default set of mounts regardless of the container type
Expand Down