Tutorial Hello, world! QEMU [runtime] page fault

261 views
Skip to first unread message

Nigel Cole

unread,
Feb 24, 2021, 10:24:50 AM2/24/21
to Keystone Enclave Forum
Hello!

I have QEMU running and pass the tests using "make run-tests", it also works running ./tests.ke in QEMU. When running "./hello/hello.ke" i get:

# ./hello/hello.ke
Verifying archive integrity... All good.
Uncompressing Keystone Enclave Package
[runtime] page fault at 0x2ada6 on 0x0 (scause: 0xd)

I used ./fast-setup.sh, complied everything in a created build directory and ran the tests which works. The page fault is consistent.

Followed all steps in http://docs.keystone-enclave.org/en/dev/Getting-Started/Tutorials/Build-Enclave-App-Hello-World.html. Copied to overlay root and ran "make image" which seems to work since QEMU has the root files when i run the QEMU script. Using dev branch.

Dayeol Lee

unread,
Feb 24, 2021, 12:06:42 PM2/24/21
to Nigel Cole, Keystone Enclave Forum
Could you blow up the entire <build dir>/examples directory and try again?
I've also encountered this issue before when I switched the branch from master to dev.
I think it's due to the old runtime version.
If it still doesn't work please let me know :D

Thanks,
Dayeol

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/32fb081f-8af9-48d5-9bb0-acbcdd394841n%40googlegroups.com.

Nigel Cole

unread,
Feb 25, 2021, 8:34:04 AM2/25/21
to Keystone Enclave Forum
Hi!

I deleted the whole <build dir>/examples directory. Ran "make hello-package" in <build dir>, then "cp examples/hello/hello.ke ./overlay/root" and "make image" before running the qemu script. This doesn't work unfortunately :/

I am able to run ./tests.ke and ./hello-native.ke but ./hello.ke does not work. I also tried reinstalling everything but that didn't help. 

I am new to Keystone and was also wondering if "make image" should always included old files, even if I remove them from the overlay/root directory. But this probably is something I should check buildroot for.

Thanks in advance! :D

Ryan Luna

unread,
Feb 28, 2021, 7:44:07 PM2/28/21
to Keystone Enclave Forum
Hi,

I have this same issue. I have tried the suggested fix but did not work.

Dayeol Lee

unread,
Mar 1, 2021, 1:18:55 PM3/1/21
to Ryan Luna, Nigel Cole, Keystone Enclave Forum
Hi,

I was able to reproduce the issue.
I think this is a new issue after our toolchain bump.
Please keep an eye on it!

Thanks,
Dayeol


Ryan Luna

unread,
Mar 1, 2021, 4:47:16 PM3/1/21
to Keystone Enclave Forum
Awesome! Will do.

Thank you Dayeol.

Nigel Cole

unread,
Mar 1, 2021, 5:34:22 PM3/1/21
to Ryan Luna, Keystone Enclave Forum
Thank you Dayeol! :)

You received this message because you are subscribed to a topic in the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/keystone-enclave-forum/BuWB_zu2-HA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/403b28fb-56f9-4322-9131-91a08cdec8bdn%40googlegroups.com.

肆月

unread,
Apr 5, 2021, 11:03:30 PM4/5/21
to Keystone Enclave Forum
Hello!

I encountered this issue using the master branch, too. So if it's the problem about the new libc, how can I make the example hello work?

Thanks in advance!

Dayeol Lee

unread,
Apr 20, 2021, 1:40:15 PM4/20/21
to Keystone Enclave Forum
glibc is currently broken in v1.0.0.
Please manually compile the enclave app (in this case hello) with musl and run the enclave manaully.

Thanks,
Dayeol

Li

unread,
May 31, 2021, 2:43:06 PM5/31/21
to Keystone Enclave Forum
Hi all,
I used the prebuilt musl toolchain, and I changed the gnu to musl here:

After that I built the hello world, however when I try to run the enclave, it cannot find ./hello-runner. Has anyone else gotten this problem when compiling the hello app with Musl?

# insmod keystone-driver.ko
[   11.102290] keystone_driver: loading out-of-tree module taints kernel.
[   11.117492] keystone_enclave: keystone enclave v1.0.0
# ./musl/hello.ke

Verifying archive integrity... All good.
Uncompressing Keystone Enclave Package
./musl/hello.ke: line 514: ./hello-runner: No such file or directory
# ls musl/
CMakeFiles           eyrie-rt             hello.ke
Makefile             hello                pkg
cmake_install.cmake  hello-runner         runtime



Thank you in advance
Reply all
Reply to author
Forward
0 new messages