aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/sysent.h
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2001-12-29 07:13:47 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2001-12-29 07:13:47 +0000
commit21d56e9c33a19f2f97ddf9f009f325b349f8c39c (patch)
tree5fea52eb8edad79619358670508ccdce9203dfdf /sys/sys/sysent.h
parenteddb1f8617eb31dbef5b461dbc989a27453834d0 (diff)
downloadsrc-21d56e9c33a19f2f97ddf9f009f325b349f8c39c.tar.gz
src-21d56e9c33a19f2f97ddf9f009f325b349f8c39c.zip
Make AIO a loadable module.
Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO will use at_exit(9). Add functions at_exec(9), rm_at_exec(9) which function nearly the same as at_exec(9) and rm_at_exec(9), these functions are called on behalf of modules at the time of execve(2) after the image activator has run. Use a modified version of tegge's suggestion via at_exec(9) to close an exploitable race in AIO. Fix SYSCALL_MODULE_HELPER such that it's archetecuterally neutral, the problem was that one had to pass it a paramater indicating the number of arguments which were actually the number of "int". Fix it by using an inline version of the AS macro against the syscall arguments. (AS should be available globally but we'll get to that later.) Add a primative system for dynamically adding kqueue ops, it's really not as sophisticated as it should be, but I'll discuss with jlemon when he's around.
Notes
Notes: svn path=/head/; revision=88633
Diffstat (limited to 'sys/sys/sysent.h')
-rw-r--r--sys/sys/sysent.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h
index c74ee41f6299..e97ad641e5c4 100644
--- a/sys/sys/sysent.h
+++ b/sys/sys/sysent.h
@@ -112,10 +112,12 @@ static moduledata_t name##_mod = { \
}; \
DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE)
-#define SYSCALL_MODULE_HELPER(syscallname, argcount) \
+#define SYSCALL_MODULE_HELPER(syscallname) \
static int syscallname##_syscall = SYS_##syscallname; \
static struct sysent syscallname##_sysent = { \
- argcount, (sy_call_t *)& syscallname \
+ (sizeof(struct syscallname ## _args ) \
+ / sizeof(register_t)), \
+ (sy_call_t *)& syscallname \
}; \
SYSCALL_MODULE(syscallname, \
& syscallname##_syscall, & syscallname##_sysent, \