freebsd-skq/sys
Konstantin Belousov afe1a68827 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
..
amd64 Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
arm Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
boot - Set 'dmadat' earlier so that we properly setup the heap if we fail to 2010-05-21 16:58:52 +00:00
bsm
cam Change ad_firmware_geom_adjust() to operate on a struct disk * only and 2010-05-20 12:46:19 +00:00
cddl Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
compat Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
conf Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
contrib Sync run(4) driver from author's site. 2010-05-13 00:19:03 +00:00
crypto
ddb There is not a good reason to have a different prototype for db_printf() 2010-05-11 17:01:14 +00:00
dev Report relative card address to NewBus as location string. 2010-05-23 09:44:48 +00:00
fs Allow the experimental NFSv4 client to use cached attributes 2010-05-18 05:18:21 +00:00
gdb
geom Teach gpart about bootcode on APM. 2010-05-16 22:21:33 +00:00
gnu Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize(). 2010-05-05 16:44:25 +00:00
i386 Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
ia64 Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
isa Fix more style(9) nits that I missed in the previous commit. 2010-05-22 07:44:33 +00:00
kern Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
kgssapi
libkern Switch to our preferred 2-clause BSD license. 2010-04-07 16:50:38 +00:00
mips Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
modules Make mvs_if.c to not be always linked statically into the kernel. 2010-05-17 03:51:57 +00:00
net Ignore failures from removing multicast addresses from the parent (trunk) 2010-05-17 19:36:56 +00:00
net80211 Add new tunable 'net.link.ifqmaxlen' to set default send interface 2010-05-03 07:32:50 +00:00
netatalk
netgraph Fix a race between ngs_rcvmsg() and soclose() which closes the control 2010-05-19 15:06:09 +00:00
netinet This adds back the Iterator to the sctp 2010-05-16 17:03:56 +00:00
netinet6 Fix our version of IPv6 address representation. 2010-05-19 00:35:47 +00:00
netipsec Set SA's natt_type before calling key_mature() in key_add(), 2010-05-05 08:58:58 +00:00
netipx
netnatm
netncp Switch to our preferred 2-clause BSD license. 2010-04-07 16:50:38 +00:00
netsmb Switch to our preferred 2-clause BSD license. 2010-04-07 16:50:38 +00:00
nfs Factor out the code shared between NFS client and server into its own 2010-02-16 20:00:21 +00:00
nfsclient Push down the page queues lock into vm_page_activate(). 2010-05-07 15:49:43 +00:00
nfsserver Patch the regular NFS server so that it returns ESTALE to the client 2010-03-26 01:19:29 +00:00
nlm
opencrypto Add comments trying to explain what bad things happen here, i.e. 2010-01-09 15:43:47 +00:00
pc98 Change ad_firmware_geom_adjust() to operate on a struct disk * only and 2010-05-20 12:46:19 +00:00
pci Add new tunable 'net.link.ifqmaxlen' to set default send interface 2010-05-03 07:32:50 +00:00
powerpc Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
rpc When the regular NFS server replied to a UDP client out of the replay 2010-03-23 23:03:30 +00:00
security Add a case to make sure that internal audit records get converted 2010-05-04 15:29:07 +00:00
sparc64 Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
sun4v Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
sys Reorganize syscall entry and leave handling. 2010-05-23 18:32:02 +00:00
teken Just use <stdint.h> instead of <inttypes.h>. We don't need it here. 2010-04-03 17:22:28 +00:00
tools
ufs ffs_mount: accept and drop userland-only options that can be passed from 2010-05-19 09:32:11 +00:00
vm When waiting for the busy page, do not unlock the object unless unlock 2010-05-20 08:51:01 +00:00
x86 Unify local_apic.c for x86 archs, 2010-05-23 17:45:01 +00:00
xdr
xen don't hold spin lock across free 2010-02-21 01:12:18 +00:00
Makefile