[lkml]   [2019]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH v1 3/3] selftests/x86: Augment SGX selftest to test new __vdso_sgx_enter_enclave() and its callback interface
On Mon, Apr 22, 2019 at 5:37 PM Cedric Xing <> wrote:
> Given the changes to __vdso_sgx_enter_enclave(), the selftest is augmented to
> test the newly added callback interface. This addtional test marks the whole
> enclave range as PROT_READ, and calls mprotect() upon #PFs to add necessary PTE
> permissions per PFEC (#PF Error Code) until the enclave finishes.


What's not tested here is running this code with EFLAGS.TF set and
making sure that it unwinds correctly. Also, Jarkko, unless I missed
something, the vDSO extable code likely has a bug. If you run the
instruction right before ENCLU with EFLAGS.TF set, then do_debug()
will eat the SIGTRAP and skip to the exception handler. Similarly, if
you put an instruction breakpoint on ENCLU, it'll get skipped. Or is
the code actually correct and am I just remembering wrong?


 \ /
  Last update: 2019-04-23 03:29    [W:0.371 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site