Signal handler#85
Conversation
- Introduce signal handler into libsgxstep - Refactor app/memcmp/main.c to use the library handler
|
Thanks Wojciech, this is great! Linking #52
That would indeed cleanup a lot, so let's merge this as one series.
As this is likely something that many apps will use, I'd be in favor of putting this in the lib indeed, similar to some existing irq counters (eg One further consideration, I think signal handlers won't work anymore for more recent kernels with VDSO for /dev/sgx_enclave. This is atm not really a problem cause we have to pass This whole approach of registering signal handlers was always a big hack.. The SDK also registers its own signal handler and we overwrite that w sgx-step, which is prob fine as long as the enclave does not rely on signal handlers itself.. I think the work you started here to have an abstract libsgxstep interface that applications then use will allow to update this transparently on the longer term eg when using vdso to enter the enclave |
96c6ca6 to
09b379d
Compare
This is step [1/n] for abstracting out the signal handler (including page fault handler).
[2/n] is to take out sigsegv handler from apps to the library as the default.
Question before I push [2/n]:
Should fault counters be held within the library or in the app?