Skip to content

Idea: host-OS-independence with alternate syscall interface #7

Closed

Description

@adamierymenko

I have an idea for this that builds on an idea I've had for a long time but have never had (and probably will not have) the time to implement.

The idea is to pseudo-virtualize Linux binaries by rebuilding them to call a function in user-space instead of executing CPU-level syscalls. This would require apps to be rebuilt from source, making it effectively a different "hardware architecture" (e.g. x86_64-uvirt or something) from standard Linux, but would otherwise be fully compatible. This would eliminate the ptrace requirement to make it portable and also might be faster.

It seems like it would be borderline trivial to do this with gVisor.

This would open up the possibility of embedding Linux hosts inside anything including desktop and mobile apps or server processes for other OSes like Windows. You could port, desktop-ify, or even mobile-ify any complex Linux application.

Activity

  1. littleq0903 commented on May 3, 2018

    @littleq0903

    it would be like what WSL does in Windows.

  2. hugelgupf commented on May 3, 2018

    @hugelgupf
    Contributor

    If you ported gVisor to other OS', i.e. came up with a kvm-like platforms using an OS X / Windows / whatever hypervisor, and moved some Linux-specific bits in the sentry around, you wouldn't even need to modify the binaries you want to run.

    You could have to rebuild if you want to skip the hypervisor/syscall-interception-platform and move only the Linux-specific bits around. But that's kind of a totally different project than what gVisor is targeted at.

  3. bluecmd commented on May 5, 2018

    @bluecmd

    Isn't the point of gVisor to secure untrusted workloads though? If so, that is stopping the unknown software from embedding syscalls and not play nice?

  4. adamierymenko commented on May 7, 2018

    @adamierymenko
    Author

    @hugelgupf Yes that could work, but the thought I had was to make it possible to run Linux environments anywhere with no elevated permissions.

  5. fvoznika commented on Aug 23, 2018

    @fvoznika
    Member

    Closing old bugs. Please reopen if you'd like to continue the discussion.

  6. archerbroler commented on Feb 26, 2019

    @archerbroler

    bluepill can be done on win too. perhaps its not such hard to port gvisor to win.

  7. amscanne commented on Feb 26, 2019

    @amscanne
    Contributor

    I'm not familiar with the Windows hypervisor APIs, is there good reference documentation?

  8. added a commit that references this issue on May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions