Skip to content

Commit 8d5e2e9

Browse files
committed
Use a more restrictive XRSTOR mask.
For some reason, using -1 causes a SEGV on some newer processors. This is a temporary work around until the exact cause is known.
1 parent 811642c commit 8d5e2e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/e9patch/e9loader_elf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ void e9handler(int sig, siginfo_t *info, ucontext_t *ctx,
258258
asm volatile (
259259
"mov %%rcx,%%fs:0x40\n" // trampoline
260260
"xor %%edx,%%edx\n"
261-
"mov $-1,%%rax\n"
261+
"mov $0x3FFFF,%%eax\n"
262262
"xrstor (%%rsi)\n" // restore xsave state
263263
"mov (%%rbx),%%r8\n"
264264
"mov 0x08(%%rbx),%%r9\n"

0 commit comments

Comments
 (0)