gramine
gramine copied to clipboard
RFC: Reorganize the repository
Currently this repository has a bit messy layout. Proposed changes:
- Move .h files into "include" directories (now there are symlinks pointing to src/.h)
- Move shared code (between Pal and LibOS) out of the Pal directory ... Please suggest more
- Consistent naming in the SGX PAL for code that runs in and out of the enclave
- PAL/common/unix for common code to any unix host.
- LibOS/shim/test/regression should be moved to LibOS/regression (similar to Pal/regression)
- Pal/src/start.S should be moved to appropriate place. It's not a part of PAL. but startup routine for Pal/{test, regression}
- sort out compile environment. Pal is compiled for Pal target. i.e. Linux, Linux-SGX, FreeBSD LibOS is always compiled for Linux. Currently it's intermixed.
- Rename top-level directories lower-case first letter. Capital-cased should be only "meta" things, like Makefile, README, Documentation, LICENCE etc. That way it is sorted correctly: meta together and actual code together.
- Consistent naming in the SGX PAL for code that runs in and out of the enclave
Including both function and file names. An example of confusing naming: enclave_entry.S contains code which runs inside enclave, sgx_entry.S contains code which runs outside of it.
- LibOS/shim/test/regression should be moved to LibOS/regression (similar to Pal/regression)
I'd prefer LibOS/test/regression (and moving all other tests under LibOS/test).
-
Rename
regressiontests to justtests(or move them one dir up, or find a better name). Currently it seems that all tests which were written by us just land there, regardless of their real type, so this name is misleading. -
Why our LibOS code resides in
shimdirectory? Doesn'tshimmean something different than "the whole LibOS implementation"? -
Why
ScriptsandToolsare different folders? Also,Toolsjust contains GSCE, without even a separate directory inside.
- Change name of chroot filesystem
- Using Clang + LLD with -target, this will allow building the LibOS directly on macOS or FreeBSD.
Also move the PAL regression tests as a LibOS2 one or something? They should only depend on PAL APIs, not ones provided elsewhere.
- gramineproject/graphene#443
- Central
tests/directory with all tests. Possiblytests/libos/test_regression.py,tests/pal/test_regression.pyetc. and binaries kept together with.pyfiles.tests/benchmarkas it is.
- rename cli tools to
graphene-*with kebab-case
I went through the discussion here and almost everything is already done. I extracted two things we still need to do into https://github.com/gramineproject/gramine/issues/1273 and https://github.com/gramineproject/gramine/issues/1274, so that we can close this overloaded issue now.