Giter Club home page Giter Club logo

Comments (7)

chiache avatar chiache commented on May 28, 2024

Hi,

System calls made from the binaries are restricted by the SECCOMP filter (described in our original paper: http://www.oscar.cs.stonybrook.edu/papers/files/tsai14graphene.pdf), when running on Linux hosts. If Graphene is running inside an enclave, any system calls will cause #GP as you predict. System calls in enclaves will be handled in the future.

Thanks for the advice about adding the explanation in the Wiki. We will make the edit in the near future.

from graphene.

jarkkojs avatar jarkkojs commented on May 28, 2024

One more adventurous way to get this issue sorted out would be to somehow extend seccomp to allow user space handlers for system calls. In practice it would be non-trivial problem to find an upstreamable solution. Binary patching is doable and there exist a proof of concept for that i.e. Chromium. It's described here briefly: https://lwn.net/Articles/347547/. With Chromium of course the problem was more trivial because they control how the code is generated. You might think that this is a niche use case but think about statically linked binaries. They are completely ruled out. And one good application for Graphene might actually be to run some statically linked legacy binary.

from graphene.

jarkkojs avatar jarkkojs commented on May 28, 2024

I'm not saying that Graphene is unusable without support for various ways of doing a direct syscall. All I'm saying is that it's an obvious limitation :)

from graphene.

chiache avatar chiache commented on May 28, 2024

Thanks for the comment. Indeed, one of main reasons for us to add SECCOMP filter is to support static binaries, and certainly there are non-trivial amount of them. Graphene is not using binary patching now, but it is a feature we will actively explore in the future.

from graphene.

jarkkojs avatar jarkkojs commented on May 28, 2024

Hey, I wasn't aware that there was SECCOMP_RET_PTRACE. And it was added back in 2012 (commit fb0fadf9b).That is quite cool. I just read the seccomp documentation and found this out. Sorry for being ignorant in that part. That's why my previous comments about seccomp must have sounded like bit trippy :) I guess this is what you are using for non-SGX use case? Of course this doesn't sort out SGX part but stil is a great thing to have.

from graphene.

jarkkojs avatar jarkkojs commented on May 28, 2024

This can be safely closed after SGX related corner issues have been put into wiki page!

from graphene.

mkow avatar mkow commented on May 28, 2024

This whole thread seems to be greatly outdated so I'm closing it (static binary support was reworked and probably will change even more soon). Also, sandboxing support in Graphene was deprecated. If you want a two-way sandbox then just use a proper security sandbox and run Graphene inside.

from graphene.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.