Fix ERESTART for lcall $7,$0 syscalls.

The lcall trampoline enters kernel by int $0x80, which sets up invalid
length of the instruction for %rip rewind.

Reviewed by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2018-04-05 11:03:21 +00:00
parent f407f5fb88
commit 2d7e563c39

View File

@ -146,6 +146,7 @@ ia32_fetch_syscall_args(struct thread *td)
frame->tf_rip = eip;
frame->tf_cs = cs;
frame->tf_rsp += 2 * sizeof(u_int32_t);
frame->tf_err = 7; /* size of lcall $7,$0 */
}
#endif