Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

fsgsbase not properly re-enabled on wakeup #13

Open
smherwig opened this issue Mar 26, 2020 · 2 comments
Open

fsgsbase not properly re-enabled on wakeup #13

smherwig opened this issue Mar 26, 2020 · 2 comments

Comments

@smherwig
Copy link

I'm using an Intel NUC and running Ubuntu 16.04.

When I suspend and then resume the NUC, and then run Graphene-SGX's (commit 80030b1157da371251f632e325df71e9454b4e55) helloworld test, the application crashes. GDB indicates that the crash occurs from the illegal WRFSBASE instruction that occurs in the inline assembly of Graphene-SGX's (Pal/src/host/Linux-SGX/sgx_api.h) wrfsbase wrapper function.

To reproduce:

# suspend and resume machine

cd ~/src/graphene/LibOS/shim/test/native/
SGX=1 ./pal_loader ./helloworld`

The debug output is: helloworld-debug-log.txt

@smherwig smherwig changed the title fsgsbase not properly re-enabled on wakeup fsgsbase not properly re-enabled on wakeup Mar 26, 2020
@yamahata
Copy link
Contributor

Did you load graphene-sgx driver first, suspend/resume the machine, and then start graphene?
If yes, it's the issue of graphene-sgx driver. Currently it's not aware of power management and it enables fsgsbase in hacky way.
So g-sgx driver needs to be aware of power manager.
Probably notifier for PM_POST_SUSPEND needs to be installed in order to enable fsgsbase on wakeup.

@smherwig
Copy link
Author

That's correct.

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

No branches or pull requests

2 participants