diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/alpha/kernel/entry.S x/arch/alpha/kernel/entry.S --- x-ref/arch/alpha/kernel/entry.S 2003-04-05 00:12:42.000000000 +0200 +++ x/arch/alpha/kernel/entry.S 2003-04-05 05:19:36.000000000 +0200 @@ -993,7 +993,15 @@ sys_call_table: .quad alpha_ni_syscall .quad alpha_ni_syscall /* 220 */ .quad alpha_ni_syscall +#ifdef CONFIG_TUX + .quad __sys_tux +#else +# ifdef CONFIG_TUX_MODULE + .quad sys_tux +# else .quad alpha_ni_syscall +# endif +#endif .quad alpha_ni_syscall .quad alpha_ni_syscall .quad alpha_ni_syscall /* 225 */ diff -urNp --exclude CVS --exclude BitKeeper x-ref/arch/i386/kernel/entry.S x/arch/i386/kernel/entry.S --- x-ref/arch/i386/kernel/entry.S 2003-04-05 05:19:30.000000000 +0200 +++ x/arch/i386/kernel/entry.S 2003-04-05 05:19:36.000000000 +0200 @@ -626,7 +626,15 @@ ENTRY(sys_call_table) .long SYMBOL_NAME(sys_madvise) .long SYMBOL_NAME(sys_getdents64) /* 220 */ .long SYMBOL_NAME(sys_fcntl64) +#ifdef CONFIG_TUX + .long SYMBOL_NAME(__sys_tux) +#else +# ifdef CONFIG_TUX_MODULE + .long SYMBOL_NAME(sys_tux) +# else .long SYMBOL_NAME(sys_ni_syscall) /* reserved for TUX */ +# endif +#endif .long SYMBOL_NAME(sys_ni_syscall) /* Reserved for Security */ .long SYMBOL_NAME(sys_gettid) .long SYMBOL_NAME(sys_readahead) /* 225 */ diff -urNp --exclude CVS --exclude BitKeeper x-ref/net/netsyms.c x/net/netsyms.c --- x-ref/net/netsyms.c 2003-04-05 05:19:35.000000000 +0200 +++ x/net/netsyms.c 2003-04-05 05:20:06.000000000 +0200 @@ -57,7 +57,7 @@ extern __u32 sysctl_rmem_max; extern struct net_proto_family inet_family_ops; -#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE) +#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE) || defined (CONFIG_TUX) || defined (CONFIG_TUX_MODULE) #include #include #include @@ -302,7 +302,7 @@ EXPORT_SYMBOL(ip6_route_output); EXPORT_SYMBOL(ip6_route_me_harder); #endif #endif -#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE) +#if defined (CONFIG_IPV6_MODULE) || defined (CONFIG_KHTTPD) || defined (CONFIG_KHTTPD_MODULE) || defined (CONFIG_TUX) || defined (CONFIG_TUX_MODULE) /* inet functions common to v4 and v6 */ EXPORT_SYMBOL(inet_release); EXPORT_SYMBOL(inet_stream_connect); @@ -596,6 +596,12 @@ EXPORT_SYMBOL(register_gifconf); EXPORT_SYMBOL(softnet_data); +#ifdef CONFIG_TUX_MODULE +EXPORT_SYMBOL(tux_module_lock); +EXPORT_SYMBOL(tux_module); +EXPORT_SYMBOL(sys_tux_ptr); +#endif + #if defined(CONFIG_NET_RADIO) || defined(CONFIG_NET_PCMCIA_RADIO) #include EXPORT_SYMBOL(wireless_send_event); diff -urNp --exclude CVS --exclude BitKeeper x-ref/net/socket.c x/net/socket.c --- x-ref/net/socket.c 2003-04-05 05:19:35.000000000 +0200 +++ x/net/socket.c 2003-04-05 05:19:36.000000000 +0200 @@ -1772,3 +1772,38 @@ int socket_get_info(char *buffer, char * len = 0; return len; } + +#ifdef CONFIG_TUX_MODULE + +int (*sys_tux_ptr) (unsigned int action, user_req_t *u_info) = NULL; + +struct module *tux_module = NULL; +spinlock_t tux_module_lock = SPIN_LOCK_UNLOCKED; + +asmlinkage int sys_tux (unsigned int action, user_req_t *u_info) +{ + int ret; + + if (current->tux_info) + return sys_tux_ptr(action, u_info); + + ret = -ENOSYS; + spin_lock(&tux_module_lock); + if (!tux_module) + goto out_unlock; + __MOD_INC_USE_COUNT(tux_module); + spin_unlock(&tux_module_lock); + + if (!sys_tux_ptr) + TUX_BUG(); + ret = sys_tux_ptr(action, u_info); + + spin_lock(&tux_module_lock); + __MOD_DEC_USE_COUNT(tux_module); +out_unlock: + spin_unlock(&tux_module_lock); + + return ret; +} + +#endif