Giter VIP home page Giter VIP logo

Comments (3)

cpriebe avatar cpriebe commented on May 28, 2024

There are two issues with the pre-packaged Alpine OpenJDK:

  1. It uses 'execve' under certain circumstances which SGX-LKL currently does not support.
  2. It requires file-backed mmap support which (this version of ) SGX-LKL currently does not support.

You can get around the first issue by making sure the LD_LIBRARY_PATH starts with a specific prefix which the JVM checks against when deciding whether to rerun via execve. The second issue requires changes to SGX-LKL. Memory-mapping files is obviously not the best idea in a memory-restricted environment such as Intel SGX enclaves but it's possible to disable most of the memory-mapped I/O via runtime parameters. The remaining mappings still need to be supported by SGX-LKL.

Anyway, we actually do have a fix for both issues internally that allows SGX-LKL to run with the official Alpine OpenJDK8 JRE. It needs a bit of cleaning up but I will try to do that and push the change in the next few days.

from sgx-lkl.

avigail-oron avatar avigail-oron commented on May 28, 2024

Thank you!

from sgx-lkl.

cpriebe avatar cpriebe commented on May 28, 2024

With the most recent commit, SGX-LKL now supports the Alpine-packaged OpenJDK8 JRE. The HelloWorld example and the sgx-lkl-java wrapper have been updated accordingly.

Two important notes on this:

  1. The LD_LIBRARY_PATH has to be set and has to start with /usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64:/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64 in order to prevent the JVM from re-executing java via execve.
  2. File-mapped mmap has to be specifically enabled for SGX-LKL. This is necessary because the JVM will mmap a small portion of the runtime library rt.jar.

Both of these requirements are incorporated into the the sgx-lkl-java tool.

from sgx-lkl.

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.