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

mantle/qemu: neuter virtiofsd seccomp filtering #3636

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Sep 26, 2023

By default, virtiofsd uses seccomp to allow only some syscalls to be proxied from the guest. In the theme of --sandbox=none, let's also neuter seccomp filtering for our virtiofs usage; the workloads we run in the supermin/dev VMs are trusted.

Incidentally, this avoids issues like #3635, where some syscalls were accidentally missing from the allow list. In this case, new libostree code[1] running in the supermin VM when building the legacy oscontainer calls out to fstatfs over virtiofs, which maps to the blocked fstatfs64 syscall on ppc64le. (I've opened an upstream patch[2] to fix this, but we don't strictly need it.)

Closes: #3635

By default, `virtiofsd` uses seccomp to allow only some syscalls to be
proxied from the guest. In the theme of `--sandbox=none`, let's also
neuter seccomp filtering for our virtiofs usage; the workloads we run in
the supermin/dev VMs are trusted.

Incidentally, this avoids issues like coreos#3635, where some syscalls
were accidentally missing from the allow list. In this case, new
libostree code[[1]] running in the supermin VM when building the
legacy oscontainer calls out to `fstatfs` over virtiofs, which maps to
the blocked `fstatfs64` syscall on ppc64le. (I've opened an upstream
patch[[2]] to fix this, but we don't strictly need it.)

Closes: coreos#3635

[1]: ostreedev/ostree@ba9c9de
[2]: https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/200
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow. Nice investigation!

@cgwalters cgwalters enabled auto-merge (rebase) September 26, 2023 16:28
Copy link
Member

@dustymabe dustymabe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Nice digging!

@cgwalters cgwalters merged commit 87fc693 into coreos:main Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.15-9.2] legacy-oscontainer build killed due to unexpected EOF on ppc64le
3 participants