freebsd-nq/sys/amd64/ia32
Konstantin Belousov a37d4032ed Improve the lcall $7,$0 syscall emulation on amd64.
Current code, which copies the potential syscall arguments into the
current frame, puts an arbitrary limit on the number of syscall
arguments.  Apparently, mmap(2) and lseek(2) (?) require larger
number.  But there is an issue that stack is only need to be mapped to
contain the number of arguments required by the syscall, so copying
arbitrary large number of words from the stack is not completely safe.

Use different approach to convert lcall frame into int $0x80 frame in
place, by doing the retl in kernel.  This also allows to stop proceed
vfork case specially, and stop making assumptions about %cs at the
syscall time.

Also, improve comments with the formulations provided by bde.

Reviewed and tested by:	bde
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2018-03-24 12:57:58 +00:00
..
ia32_exception.S Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
ia32_misc.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
ia32_reg.c sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
ia32_signal.c Don't let cpu_set_syscall_retval() clobber exec_setregs(). 2017-11-24 07:35:08 +00:00
ia32_sigtramp.S Improve the lcall $7,$0 syscall emulation on amd64. 2018-03-24 12:57:58 +00:00
ia32_syscall.c Improve the lcall $7,$0 syscall emulation on amd64. 2018-03-24 12:57:58 +00:00