freebsd-skq/sys/compat/svr4
kib 4208ccbe79 Reorganize syscall entry and leave handling.
Extend struct sysvec with three new elements:
sv_fetch_syscall_args - the method to fetch syscall arguments from
  usermode into struct syscall_args. The structure is machine-depended
  (this might be reconsidered after all architectures are converted).
sv_set_syscall_retval - the method to set a return value for usermode
  from the syscall. It is a generalization of
  cpu_set_syscall_retval(9) to allow ABIs to override the way to set a
  return value.
sv_syscallnames - the table of syscall names.

Use sv_set_syscall_retval in kern_sigsuspend() instead of hardcoding
the call to cpu_set_syscall_retval().

The new functions syscallenter(9) and syscallret(9) are provided that
use sv_*syscall* pointers and contain the common repeated code from
the syscall() implementations for the architecture-specific syscall
trap handlers.

Syscallenter() fetches arguments, calls syscall implementation from
ABI sysent table, and set up return frame. The end of syscall
bookkeeping is done by syscallret().

Take advantage of single place for MI syscall handling code and
implement ptrace_lwpinfo pl_flags PL_FLAG_SCE, PL_FLAG_SCX and
PL_FLAG_EXEC. The SCE and SCX flags notify the debugger that the
thread is stopped at syscall entry or return point respectively.  The
EXEC flag augments SCX and notifies debugger that the process address
space was changed by one of exec(2)-family syscalls.

The i386, amd64, sparc64, sun4v, powerpc and ia64 syscall()s are
changed to use syscallenter()/syscallret(). MIPS and arm are not
converted and use the mostly unchanged syscall() implementation.

Reviewed by:	jhb, marcel, marius, nwhitehorn, stas
Tested by:	marcel (ia64), marius (sparc64), nwhitehorn (powerpc),
	stas (mips)
MFC after:	1 month
2010-05-23 18:32:02 +00:00
..
imgact_svr4.c VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
Makefile
svr4_acl.h
svr4_dirent.h
svr4_errno.h
svr4_exec.h
svr4_fcntl.c Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC 2009-06-05 14:55:22 +00:00
svr4_fcntl.h
svr4_filio.c
svr4_filio.h
svr4_fuser.h
svr4_hrt.h
svr4_ioctl.c de-register. 2009-05-29 05:58:46 +00:00
svr4_ioctl.h Burn TTY ioctl bridges in compat layers. 2009-05-08 20:06:37 +00:00
svr4_ipc.c Change the ABI of some of the structures used by the SYSV IPC API: 2009-06-24 21:10:52 +00:00
svr4_ipc.h
svr4_misc.c Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic 2010-01-12 07:49:34 +00:00
svr4_mman.h
svr4_proto.h As jhb@ pointed out to me, r197057 was incorrect, not least because these 2009-09-10 13:20:27 +00:00
svr4_resource.c de-register. 2009-05-29 05:58:46 +00:00
svr4_resource.h
svr4_siginfo.h
svr4_signal.c de-register. 2009-05-29 05:58:46 +00:00
svr4_signal.h
svr4_socket.c copyinstr(9) takes parameter 'len' as a size_t *, not int *. 2009-05-29 06:04:26 +00:00
svr4_socket.h
svr4_sockio.c Merge the remainder of kern_vimage.c and vimage.h into vnet.c and 2009-08-01 19:26:27 +00:00
svr4_sockio.h
svr4_sockmod.h
svr4_stat.c Rename st_*timespec fields to st_*tim for POSIX 2008 compliance. 2010-03-28 13:13:22 +00:00
svr4_stat.h
svr4_statvfs.h
svr4_stream.c de-register. 2009-05-29 05:58:46 +00:00
svr4_stropts.h
svr4_syscall.h Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
svr4_syscallnames.c Regenerate system call tables to use SVN ids. 2009-05-08 20:16:04 +00:00
svr4_sysconfig.h Add new sysconfig bits, Fix the bogus numbering of the old bits. 2009-05-29 05:37:27 +00:00
svr4_sysent.c Regenerate generated syscall files following changes to struct sysent in 2009-06-01 16:14:38 +00:00
svr4_systeminfo.h
svr4_sysvec.c Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
svr4_termios.c Include <sys/tty.h> instead of <sys/termios.h>. 2009-11-28 16:30:06 +00:00
svr4_termios.h
svr4_time.h
svr4_timod.h
svr4_types.h Last step of splitting up minor and unit numbers: remove minor(). 2009-01-28 17:57:16 +00:00
svr4_ucontext.h
svr4_ulimit.h
svr4_ustat.h
svr4_util.h
svr4_utsname.h
svr4_wait.h
svr4.h
syscalls.conf
syscalls.master Remove unused LIBCOMPAT keyword from syscalls.master. 2010-02-08 10:02:01 +00:00