Skip to content

Commit e1a37bd

Browse files
JunjunGu1lzha101
authored andcommitted
fix a issue for vdso reported from msft
Signed-off-by: junjungu <junjun.gu@intel.com>
1 parent e636b6c commit e1a37bd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

psw/urts/linux/sig_handler.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,11 @@ static int sgx_urts_vdso_handler(long rdi, long rsi, long rdx, long ursp, long r
353353
return 0;
354354
}
355355
//move the ocall return result to rsi and set rdi to ECMD_ORET for ocall return to trts
356-
__asm__ __volatile__("mov %%rax, %%rsi\n"
357-
"mov %0, %%rdi\n"
356+
__asm__ __volatile__("mov $0, %%rsi\n"
357+
"movl %0, %%esi\n"
358+
"mov %1, %%rdi\n"
358359
:
359-
:"i"(ECMD_ORET)
360+
:"r"(status),"i"(ECMD_ORET)
360361
:"rsi","rdi");
361362
return SE_EENTER;
362363
}

0 commit comments

Comments
 (0)