sgx-lkl icon indicating copy to clipboard operation
sgx-lkl copied to clipboard

sgx-lkl-musl code interleaves x86-64 and LKL code

Open davidchisnall opened this issue 4 years ago • 4 comments

Currently, we have a lot of code paths in musl where we've replaced the normal x86-64 versions with LKL versions. We should eventually revisit these and try to clean them up so that we have a clean separation of upstream vs LKL code.

For example, lsds/sgx-lkl-musl#11 (my fault) replaced the assembly to call the clone syscall. We need to extend the build system to allow musl to select the correct version.

We also need to think carefully about code location. We are likely to have at least x86-64 and AArch64 versions of SGX-LKL in the long term, so we need to handle the differences between the two. We will likely want either lkl/{arch} or {arch}/lkl subdirectories for the LKL-specific code.

davidchisnall avatar May 19 '20 07:05 davidchisnall

Does the work related to https://github.com/lsds/sgx-lkl/pull/403 address this issue?

bodzhang avatar Aug 17 '20 13:08 bodzhang

No, #403 makes this worse in the short term.

davidchisnall avatar Aug 17 '20 13:08 davidchisnall

Should this issue be added to "Clean up layering" project and bumped to P1?

bodzhang avatar Aug 17 '20 13:08 bodzhang

No, it's not a layering violation, it just makes merging changes from upstream musl slightly harder.

davidchisnall avatar Aug 17 '20 14:08 davidchisnall