History log of /freebsd-9.3-release/sys/kern/kern_syscalls.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 214181 21-Oct-2010 delphij

Call chainevh callback when we are invoked with neither MOD_LOAD nor
MOD_UNLOAD. This makes it possible to add custom hooks for other module
events.

Return EOPNOTSUPP when there is no callback available.

Pointed out by: jhb
Reviewed by: jhb
MFC after: 1 month


# 214125 21-Oct-2010 delphij

In syscall_module_handler(): all switch branches return, remove
unreached code as pointed out in a Chinese forum [1].

[1] http://www.freebsdchina.org/forum/viewtopic.php?t=50619

Pointed out by: btw616 <btw s qq com>
MFC after: 1 month


# 209579 28-Jun-2010 kib

Count number of threads that enter and leave dynamically registered
syscalls. On the dynamic syscall deregistration, wait until all
threads leave the syscall code. This somewhat increases the safety
of the loadable modules unloading.

Reviewed by: jhb
Tested by: pho
MFC after: 1 month


# 205321 19-Mar-2010 kib

Introduce SYSCALL_INIT_HELPER and SYSCALL32_INIT_HELPER macros and
neccessary support functions to allow registering dynamically loaded
syscalls from the MOD_LOAD handlers. Helpers handle registration
failures semi-automatically.

Reviewed by: jhb
MFC after: 2 weeks


# 183156 18-Sep-2008 jhb

Various style fixes. 7 space indent is just odd.


# 160882 01-Aug-2006 jhb

Make system call modules a bit more robust:
- If we fail to register the system call during MOD_LOAD, then note that
so that we don't try to deregister it or invoke the chained event handler
during the subsequent MOD_UNLOAD event. Doing the deregister when the
register failed could result in trashing system call entries.
- Add a SI_SUB_SYSCALLS just before starting up init and use that to
register syscall modules instead of SI_SUB_DRIVERS. Registering system
calls as late as possible increases the chances that any other module
event handlers or SYSINITs in a module are executed to initialize the
data in a kld before a syscall dependent on that data is able to be
invoked.

MFC after: 3 days


# 132199 15-Jul-2004 phk

Do a pass over all modules in the kernel and make them return EOPNOTSUPP
for unknown events.

A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".


# 116182 10-Jun-2003 obrien

Use __FBSDID().


# 92547 18-Mar-2002 arr

- Lock down the ``module'' structure by adding an SX lock that is used by
all the global bits of ``module'' data. This commit adds a few generic
macros, MOD_SLOCK, MOD_XLOCK, etc., that are meant to be used as ways
of accessing the SX lock. It is also the first step in helping to lock
down the kernel linker and module systems.

Reviewed by: jhb, jake, smp@


# 83366 12-Sep-2001 julian

KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after: ha ha ha ha


# 69449 01-Dec-2000 alfred

sysvipc loadable.

new syscall entry lkmressys - "reserved loadable syscall"

Make syscall_register allow overwriting of such entries (lkmressys).


# 52128 11-Oct-1999 peter

Trim unused options (or #ifdef for undoc options).

Submitted by: phk


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48269 27-Jun-1999 dfr

Call the chained module handler before unregistering the syscall so that
errors can be detected.

Submitted by: "A.Yu.Isupov" <isupov@moonhe.jinr.ru>
PR: kern/12239


# 42756 17-Jan-1999 peter

Move lkmnosys() from kern_lkm.c to here.


# 42435 09-Jan-1999 dfr

Implement a mechanism for a module to report a small amount of module
specific data back to the user via kldstat(2). Use that mechanism in
the syscall handler to report the syscall number used.


# 42433 09-Jan-1999 dfr

Implement support for adding syscalls in KLD modules.

Submitted by: Assar Westerlund <assar@sics.se>