gramine icon indicating copy to clipboard operation
gramine copied to clipboard

RFC: Reorganize the repository

Open boryspoplawski opened this issue 6 years ago • 10 comments

Currently this repository has a bit messy layout. Proposed changes:

  1. Move .h files into "include" directories (now there are symlinks pointing to src/.h)
  2. Move shared code (between Pal and LibOS) out of the Pal directory ... Please suggest more

boryspoplawski avatar Aug 05 '19 14:08 boryspoplawski

  1. Consistent naming in the SGX PAL for code that runs in and out of the enclave
  2. PAL/common/unix for common code to any unix host.

donporter avatar Aug 05 '19 14:08 donporter

  1. LibOS/shim/test/regression should be moved to LibOS/regression (similar to Pal/regression)

dimakuv avatar Aug 05 '19 17:08 dimakuv

  1. Pal/src/start.S should be moved to appropriate place. It's not a part of PAL. but startup routine for Pal/{test, regression}
  2. 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.

yamahata avatar Aug 05 '19 20:08 yamahata

  1. 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.

woju avatar Aug 06 '19 15:08 woju

  1. 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.

  1. 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).

  1. Rename regression tests to just tests (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.

  2. Why our LibOS code resides in shim directory? Doesn't shim mean something different than "the whole LibOS implementation"?

  3. Why Scripts and Tools are different folders? Also, Tools just contains GSCE, without even a separate directory inside.

mkow avatar Aug 06 '19 16:08 mkow

  1. Change name of chroot filesystem

boryspoplawski avatar Aug 08 '19 17:08 boryspoplawski

  1. 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.

woachk avatar Sep 23 '19 15:09 woachk

  1. gramineproject/graphene#443

woju avatar Oct 18 '19 11:10 woju

  1. Central tests/ directory with all tests. Possibly tests/libos/test_regression.py, tests/pal/test_regression.py etc. and binaries kept together with .py files. tests/benchmark as it is.

woju avatar Jan 18 '21 21:01 woju

  1. rename cli tools to graphene-* with kebab-case

woju avatar Mar 22 '21 20:03 woju

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.

mkow avatar Apr 09 '23 21:04 mkow