Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seL4 won't run with the latest Keystone Version #1

Open
swidi opened this issue May 27, 2024 · 0 comments
Open

seL4 won't run with the latest Keystone Version #1

swidi opened this issue May 27, 2024 · 0 comments

Comments

@swidi
Copy link

swidi commented May 27, 2024

Hello,

unfortunately I have encountered quite a few problems with getting seL4 to run with the very latest Keystone version. This project is indeed quite outdated.

  1. The host application source code contains methods that are no longer in the SDK. I have changed the code to the best of my abilities:
...
  params.setFreeMemSize(512*1024*1024);
//params.setUntrustedMem(0x40000000, 1024);
  params.setUntrustedSize(1024);


//enclave.init(argv[1], argv[2], params);
  enclave.init(argv[1], argv[2], argv[3], params);

// All example applications have this code, so I included it as well 
  enclave.registerOcallDispatch(incoming_call_dispatch);                                                                                                      
  edge_call_init_internals(                                                                                                                                   
    (uintptr_t)enclave.getSharedBuffer(), enclave.getSharedBufferSize());       
  enclave.run();
...

Notice how it is no longer possible to specify the adress of the untrusted memory and there is a new parameter for the initialization

  1. The latest Keystone version requires a loader.bin that I cannot find any documentation about. I have changed vault.sh accordingly:
PACKAGE_FILES="build/apps/sel4test-driver/sel4test-driver \
               host/runner $SEL4_KERNEL host/loader.bin"
PACKAGE_SCRIPT="./runner sel4test-driver kernel.elf loader.bin" 

I have taken the loader.bin that the example applications use. However, I am unsure if it is in any way Eyrie-specific and seL4 might require its own loader.bin. Since the source of this loader.bin can be found under the Eyrie subfolder, I am thinking it might be specific. Do you have any more information on this?

  1. The seL4 version specified in the READM actually does not compile due to a multitude of errors. The latest one does.
  2. Still, seL4 does not run in Keystone:
# modprobe keystone-driver
[   15.749007] keystone_driver: loading out-of-tree module taints kernel.
[   15.763076] keystone_enclave: keystone enclave v1.0.0
# ./sel4test/sel4test.ke 
Verifying archive integrity... MD5 checksums are OK. All good.
Uncompressing Keystone vault archive
[   24.006860] keystone_enclave: shared buffer size is not multiple of PAGE_SIZE

After the Uncompression, nothing happens.

So, it seems quite hard to reproduce how to run seL4 or any other Kernel in Keystone. There is no documentation and the example project is outdated and no longer compatible. Can you give me any more info that might help me with getting this to run? Or did I do any mistake in fixing it? Any help is greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant