- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I was trying to execute the EREPORT instruction using inline assembly. I intend to give a NULL value to RBX and RCX (as sgx_target_info_t and sgx_report_data_t can be NULL). RDX contains the address where the REPORT will be written. The following is my code snippet.
sgx_report_t report;
unsigned long *addr = &report;
asm("xor %rbx,%rbx");
asm("xor %rcx,%rcx");
asm volatile("mov %0,%%rdx": :"r" (addr) );
asm("xor %eax,%eax");
asm("enclu");
Please tell me where I am getting wrong. Thanks in advance.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
There is some error in your inline assembly language code.Can you please specify at what point you are receiving the segmentation fault and does asm command work in your enclave code since it suggests to use _asm and you cannot directly assign &report to unsigned long .

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page