Giter Club home page Giter Club logo

Comments (3)

adombeck avatar adombeck commented on June 8, 2024

The backtrace is not helpful:

(gdb) bt
#0  0x000055fefeaf5994 in async_exit_pointer ()
#1  0x0000000000000000 in ?? ()

The instruction triggering this seems to be ENCLU:

(gdb) layout asm
[...]
   │0x55fefeaf595b <pal_printf+139>         leaveq                                                      │
   │0x55fefeaf595c <pal_printf+140>         retq                                                        │
   │0x55fefeaf595d <sgx_ecall>              lea    0x43(%rip),%rdx        # 0x55fefeaf59a7 <sgx_entry>  │
   │0x55fefeaf5964 <sgx_ecall+7>            mov    $0xffffffffffffffe8,%r8                              │
   │0x55fefeaf596b <sgx_ecall+14>           mov    %fs:0x0,%rcx                                         │
   │0x55fefeaf5974 <sgx_ecall+23>           lea    (%rcx,%r8,1),%r8                                     │
   │0x55fefeaf5978 <sgx_ecall+27>           mov    $0xfffffffffffffff0,%rbx                             │
   │0x55fefeaf597f <sgx_ecall+34>           mov    %fs:(%rbx),%rbx                                      │
   │0x55fefeaf5983 <sgx_ecall+38>           lea    0xa(%rip),%rcx        # 0x55fefeaf5994 <async_exit_po│
   │0x55fefeaf598a <sgx_ecall+45>           mov    $0x2,%rax                                            │
   │0x55fefeaf5991 <sgx_ecall+52>           enclu                                                       │
  >│0x55fefeaf5994 <async_exit_pointer>     enclu 
[...]

from graphene.

chiache avatar chiache commented on June 8, 2024

The occurrence of SIGILL is mostly benign. it happens when the unmodified applications or libc contain restricted instructions like CPUID or RTDSC. Graphene-SGX can handle these instructions through its exception handlers.

When using regular gdb, the execution will be blocked by SIGILL and show the backtrace at async_exit_pointer(). To avoid this problem, it is suggested to use the debugger given by Graphene (Pal/src/host/Linux-SGX/debugger/gdb) instead of the regular gdb.

from graphene.

donporter avatar donporter commented on June 8, 2024

Are you using the patched gdb included with Graphene (under Pal/src/host/Linux-SGX/debugger), or regular? The sgx-enabled gdb can give more visibility into what is happening.

If your code is really doing an enclu in the enclave, that probably won't work. I suspect this is the debugger's view from outside the enclave.

from graphene.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.