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

seccomp: handle arch inversion #2274

Conversation

brauner
Copy link
Member

@brauner brauner commented Apr 13, 2018

This commit deals with different kernel and userspace layouts and nesting. Here
are three examples:

  1. 64bit kernel and 64bit userspace running 32bit containers
  2. 64bit kernel and 32bit userspace running 64bit containers
  3. 64bit kernel and 64bit userspace running 32bit containers running 64bit containers

Two things to lookout for:

  1. The compat arch that is detected might have already been present in the main
    context. So check that it actually hasn't been and only then add it.
  2. The contexts don't need merging if the architectures are the same and also can't be.
    With these changes I can run all crazy/weird combinations with proper seccomp
    isolation.

Closes #654.

Link: https://bugs.chromium.org/p/chromium/issues/detail?id=832366
Reported-by: Chirantan Ekbote chirantan@chromium.org
Reported-by: Sonny Rao sonnyrao@chromium.org
Signed-off-by: Christian Brauner christian.brauner@ubuntu.com

This commit deals with different kernel and userspace layouts and nesting. Here
are three examples:
1. 64bit kernel and 64bit userspace running 32bit containers
2. 64bit kernel and 32bit userspace running 64bit containers
3. 64bit kernel and 64bit userspace running 32bit containers running 64bit containers
Two things to lookout for:
1. The compat arch that is detected might have already been present in the main
   context. So check that it actually hasn't been and only then add it.
2. The contexts don't need merging if the architectures are the same and also can't be.
With these changes I can run all crazy/weird combinations with proper seccomp
isolation.

Closes lxc#654.

Link: https://bugs.chromium.org/p/chromium/issues/detail?id=832366
Reported-by: Chirantan Ekbote <chirantan@chromium.org>
Reported-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
@brauner brauner requested a review from hallyn April 13, 2018 12:15
@hallyn
Copy link
Member

hallyn commented Apr 13, 2018

Thanks very much for doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants