xref: /titanic_41/usr/src/uts/intel/ia32/ml/modstubs.s (revision 1816cb7076d3ec8a78ef9ac9f895574e13c43645)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26
27#include <sys/asm_linkage.h>
28
29#if defined(__lint)
30
31char stubs_base[1], stubs_end[1];
32
33#else	/* __lint */
34
35#include "assym.h"
36
37/*
38 * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!!
39 *
40 *	For functions which are either STUBs or WSTUBs the actual function
41 *	need to be called using 'call' instruction because of preamble and
42 *	postamble (i.e mod_hold_stub and mod_release_stub) around the
43 *	function call. Due to this we need to copy arguments for the
44 *	real function. On Intel we can't tell how many arguments are there
45 *	on the stack so we have to either copy everything between esp and
46 *	ebp or copy only a fixed number (MAXNARG - defined here) for
47 *	all the stub functions. Currently we are using MAXNARG (it is a kludge
48 *	but worth it?!).
49 *
50 *	NOTE: Use NO_UNLOAD_STUBs if the module is NOT unloadable once it is
51 *	      loaded.
52 */
53#define	MAXNARG	10
54
55/*
56 * WARNING: there is no check for forgetting to write END_MODULE,
57 * and if you do, the kernel will most likely crash.  Be careful
58 *
59 * This file assumes that all of the contributions to the data segment
60 * will be contiguous in the output file, even though they are separated
61 * by pieces of text.  This is safe for all assemblers I know of now...
62 */
63
64/*
65 * This file uses ansi preprocessor features:
66 *
67 * 1. 	#define mac(a) extra_ ## a     -->   mac(x) expands to extra_a
68 * The old version of this is
69 *      #define mac(a) extra_/.*.*./a
70 * but this fails if the argument has spaces "mac ( x )"
71 * (Ignore the dots above, I had to put them in to keep this a comment.)
72 *
73 * 2.   #define mac(a) #a             -->    mac(x) expands to "x"
74 * The old version is
75 *      #define mac(a) "a"
76 *
77 * For some reason, the 5.0 preprocessor isn't happy with the above usage.
78 * For now, we're not using these ansi features.
79 *
80 * The reason is that "the 5.0 ANSI preprocessor" is built into the compiler
81 * and is a tokenizing preprocessor. This means, when confronted by something
82 * other than C token generation rules, strange things occur. In this case,
83 * when confronted by an assembly file, it would turn the token ".globl" into
84 * two tokens "." and "globl". For this reason, the traditional, non-ANSI
85 * preprocessor is used on assembly files.
86 *
87 * It would be desirable to have a non-tokenizing cpp (accp?) to use for this.
88 */
89
90/*
91 * This file contains the stubs routines for modules which can be autoloaded.
92 */
93
94#if defined(__amd64)
95
96/*
97 * See the 'struct mod_modinfo' definition to see what this declaration
98 * is trying to achieve here.
99 */
100#define	MODULE(module,namespace)	\
101	.data;				\
102module/**/_modname:			\
103	.string	"namespace/module";	\
104	SET_SIZE(module/**/_modname);	\
105	.align	CPTRSIZE;		\
106	.globl	module/**/_modinfo;	\
107	.type	module/**/_modinfo, @object;	\
108module/**/_modinfo:			\
109	.quad	module/**/_modname;	\
110	.quad	0	/* storage for modctl pointer */
111
112	/* then mod_stub_info structures follow until a mods_func_adr is 0 */
113
114/* this puts a 0 where the next mods_func_adr would be */
115#define	END_MODULE(module)		\
116	.data;				\
117	.align	CPTRSIZE;		\
118	.quad 0;			\
119	SET_SIZE(module/**/_modinfo)
120
121/*
122 * The data section in the stub_common macro is the
123 * mod_stub_info structure for the stub function
124 */
125
126#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak)		\
127	ENTRY(fcnname);							\
128	leaq	fcnname/**/_info(%rip), %rax;				\
129	cmpl	$0, MODS_FLAG(%rax);			/* weak? */	\
130	je	stubs_common_code;			/* not weak */	\
131	testb	$MODS_INSTALLED, MODS_FLAG(%rax);	/* installed? */ \
132	jne	stubs_common_code;		/* yes, do the mod_hold */ \
133	jmp	*MODS_RETFCN(%rax);		/* no, jump to retfcn */ \
134	SET_SIZE(fcnname);						\
135	.data;								\
136	.align	 CPTRSIZE;						\
137	.type	fcnname/**/_info, @object;				\
138fcnname/**/_info:							\
139	.quad	install_fcn;		/* 0 */				\
140	.quad	module/**/_modinfo;	/* 0x8 */			\
141	.quad	fcnname;		/* 0x10 */			\
142	.quad	retfcn;			/* 0x18 */			\
143	.long	weak;			/* 0x20 */			\
144	SET_SIZE(fcnname/**/_info)
145
146#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak)	\
147	ENTRY(fcnname);							\
148	leaq	fcnname/**/_info(%rip), %rax;				\
149	testb	$MODS_INSTALLED, MODS_FLAG(%rax); /* installed? */	\
150	je	5f;			/* no */			\
151	jmp	*(%rax);		/* yes, jump to install_fcn */	\
1525:	testb	$MODS_WEAK, MODS_FLAG(%rax);	/* weak? */		\
153	je	stubs_common_code;	/* no, do mod load */		\
154	jmp	*MODS_RETFCN(%rax);	/* yes, jump to retfcn */	\
155	SET_SIZE(fcnname);						\
156	.data;								\
157	.align	CPTRSIZE;						\
158	.type	fcnname/**/_info, @object;				\
159fcnname/**/_info:							\
160	.quad	install_fcn;		/* 0 */				\
161	.quad	module/**/_modinfo;	/* 0x8 */			\
162	.quad	fcnname;		/* 0x10 */			\
163	.quad	retfcn;			/* 0x18 */			\
164	.long   weak;			/* 0x20 */			\
165	SET_SIZE(fcnname/**/_info)
166
167/*
168 * We branch here with the fcnname_info pointer in %rax
169 */
170	ENTRY_NP(stubs_common_code)
171	.globl	mod_hold_stub
172	.globl	mod_release_stub
173	pushq	%rbp
174	movq	%rsp, %rbp
175	subq	$0x10, %rsp
176	movq	%r15, (%rsp)		/* (caller saved) */
177	movq	%rax, %r15		/* stash the fcnname_info pointer */
178	/*
179	 * save incoming register arguments
180	 */
181	pushq	%rdi
182	pushq	%rsi
183	pushq	%rdx
184	pushq	%rcx
185	pushq	%r8
186	pushq	%r9
187	/* (next 4 args, if any, are already on the stack above %rbp) */
188	movq	%r15, %rdi
189	call	mod_hold_stub		/* mod_hold_stub(mod_stub_info *) */
190	cmpl	$-1, %eax		/* error? */
191	jne	.L1
192	movq	0x18(%r15), %rax
193	call	*%rax
194	addq	$0x30, %rsp
195	jmp	.L2
196.L1:
197	/*
198	 * copy MAXNARG == 10 incoming arguments
199	 */
200	popq	%r9
201	popq	%r8
202	popq	%rcx
203	popq	%rdx
204	popq	%rsi
205	popq	%rdi
206	/*
207	 * stack:
208	 *	arg9		0x38(%rsp)
209	 *	arg8		0x30(%rsp)
210	 *	arg7		0x28(%rsp)
211	 *	arg6		0x20(%rsp)
212	 *	saved %rip	0x18(%rsp)
213	 *	saved %rbp	0x10(%rsp)
214	 *	<pad>		0x8(%rsp)
215	 *	saved %r15	0x0(%rsp)
216	 */
217	movl	$MAXNARG - 6 + 3, %r11d
218	pushq	(%rsp, %r11, 8)
219	pushq	(%rsp, %r11, 8)
220	pushq	(%rsp, %r11, 8)
221	pushq	(%rsp, %r11, 8)
222	call	*(%r15)			/* call the stub fn(arg, ..) */
223	addq	$0x20, %rsp		/* pop off last 4 args */
224	pushq	%rax			/* save any return values */
225	pushq	%rdx
226	movq	%r15, %rdi
227	call	mod_release_stub	/* release hold on module */
228	popq	%rdx			/* restore return values */
229	popq	%rax
230.L2:
231	popq	%r15
232	leave
233	ret
234	SET_SIZE(stubs_common_code)
235
236#elif defined(__i386)
237
238/*
239 * See the 'struct mod_modinfo' definition to see what this declaration
240 * is trying to achieve here.
241 */
242#define MODULE(module,namespace)	\
243	.data;				\
244module/**/_modname:			\
245	.string	"namespace/module";	\
246	SET_SIZE(module/**/_modname);	\
247	.align	CPTRSIZE;		\
248	.globl	module/**/_modinfo;	\
249	.type	module/**/_modinfo, @object;	\
250module/**/_modinfo:			\
251	.long	module/**/_modname;	\
252	.long	0	/* storage for modctl pointer */
253
254	/* then mod_stub_info structures follow until a mods_func_adr is 0 */
255
256/* this puts a 0 where the next mods_func_adr would be */
257#define END_MODULE(module)		\
258	.data;				\
259	.align	CPTRSIZE;		\
260	.long 0;			\
261	SET_SIZE(module/**/_modinfo)
262
263/*
264 * The data section in the stub_common macro is the
265 * mod_stub_info structure for the stub function
266 */
267
268/*
269 * The flag MODS_INSTALLED is stored in the stub data and is used to
270 * indicate if a module is installed and initialized.  This flag is used
271 * instead of the mod_stub_info->mods_modinfo->mod_installed flag
272 * to minimize the number of pointer de-references for each function
273 * call (and also to avoid possible TLB misses which could be induced
274 * by dereferencing these pointers.)
275 */
276
277#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak)		\
278	ENTRY(fcnname);							\
279	leal	fcnname/**/_info, %eax;					\
280	cmpl	$0, MODS_FLAG(%eax);	/* weak? */			\
281	je	stubs_common_code;	/* not weak */			\
282	testb	$MODS_INSTALLED, MODS_FLAG(%eax); /* installed? */	\
283	jne	stubs_common_code;	/* yes, do the mod_hold */	\
284	jmp	*MODS_RETFCN(%eax);	/* no, just jump to retfcn */	\
285	SET_SIZE(fcnname);						\
286	.data;								\
287	.align	 CPTRSIZE;						\
288	.type	fcnname/**/_info, @object;				\
289fcnname/**/_info:							\
290	.long	install_fcn;						\
291	.long	module/**/_modinfo;					\
292	.long	fcnname;						\
293	.long	retfcn;							\
294	.long   weak;							\
295	SET_SIZE(fcnname/**/_info)
296
297#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak)	\
298	ENTRY(fcnname);							\
299	leal	fcnname/**/_info, %eax;					\
300	testb	$MODS_INSTALLED, MODS_FLAG(%eax); /* installed? */	\
301	je	5f;		/* no */				\
302	jmp	*(%eax);	/* yes, just jump to install_fcn */	\
3035:	testb	$MODS_WEAK, MODS_FLAG(%eax);	/* weak? */		\
304	je	stubs_common_code;	/* no, do mod load */		\
305	jmp	*MODS_RETFCN(%eax);	/* yes, just jump to retfcn */ 	\
306	SET_SIZE(fcnname);						\
307	.data;								\
308	.align	CPTRSIZE;						\
309	.type	fcnname/**/_info, @object;				\
310fcnname/**/_info:							\
311	.long	install_fcn;		/* 0 */				\
312	.long	module/**/_modinfo;	/* 0x4 */			\
313	.long	fcnname;		/* 0x8 */			\
314	.long	retfcn;			/* 0xc */			\
315	.long   weak;			/* 0x10 */			\
316	SET_SIZE(fcnname/**/_info)
317
318/*
319 * We branch here with the fcnname_info pointer in %eax
320 */
321	ENTRY_NP(stubs_common_code)
322	.globl	mod_hold_stub
323	.globl	mod_release_stub
324	pushl	%esi
325	movl	%eax, %esi		/ save the info pointer
326	pushl	%eax
327	call	mod_hold_stub		/ mod_hold_stub(mod_stub_info *)
328	popl	%ecx
329	cmpl	$-1, %eax		/ error?
330	jne	.L1
331	movl	MODS_RETFCN(%esi), %eax
332	call    *%eax
333	popl	%esi			/ yes, return error (panic?)
334	ret
335.L1:
336	movl	$MAXNARG+1, %ecx
337	/ copy incoming arguments
338	pushl	(%esp, %ecx, 4)		/ push MAXNARG times
339	pushl	(%esp, %ecx, 4)
340	pushl	(%esp, %ecx, 4)
341	pushl	(%esp, %ecx, 4)
342	pushl	(%esp, %ecx, 4)
343	pushl	(%esp, %ecx, 4)
344	pushl	(%esp, %ecx, 4)
345	pushl	(%esp, %ecx, 4)
346	pushl	(%esp, %ecx, 4)
347	pushl	(%esp, %ecx, 4)
348	call	*(%esi)			/ call the stub function(arg1,arg2, ...)
349	add	$_MUL(MAXNARG, 4), %esp	/ pop off MAXNARG arguments
350	pushl	%eax			/ save any return values from the stub
351	pushl	%edx
352	pushl	%esi
353	call	mod_release_stub	/ release hold on module
354	addl	$4, %esp
355	popl	%edx			/ restore return values
356	popl	%eax
357.L2:
358	popl	%esi
359	ret
360	SET_SIZE(stubs_common_code)
361
362#endif	/* __i386 */
363
364#define STUB(module, fcnname, retfcn)	\
365    STUB_COMMON(module, fcnname, mod_hold_stub, retfcn, 0)
366
367/*
368 * "weak stub", don't load on account of this call
369 */
370#define WSTUB(module, fcnname, retfcn)	\
371    STUB_COMMON(module, fcnname, retfcn, retfcn, MODS_WEAK)
372
373/*
374 * "non-unloadable stub", don't bother 'holding' module if it's already loaded
375 * since the module cannot be unloaded.
376 *
377 * User *MUST* guarantee the module is not unloadable (no _fini routine).
378 */
379#define NO_UNLOAD_STUB(module, fcnname, retfcn) \
380    STUB_UNLOADABLE(module, fcnname,  retfcn, retfcn, MODS_NOUNLOAD)
381
382/*
383 * "weak stub" for non-unloadable module, don't load on account of this call
384 */
385#define NO_UNLOAD_WSTUB(module, fcnname, retfcn) \
386    STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD|MODS_WEAK)
387
388/*
389 * this is just a marker for the beginning area of text that contains stubs
390 */
391	ENTRY_NP(stubs_base)
392	nop
393
394/*
395 * WARNING WARNING WARNING!!!!!!
396 *
397 * On the MODULE macro you MUST NOT use any spaces!!! They are
398 * significant to the preprocessor.  With ansi c there is a way around this
399 * but for some reason (yet to be investigated) ansi didn't work for other
400 * reasons!
401 *
402 * When zero is used as the return function, the system will call
403 * panic if the stub can't be resolved.
404 */
405
406/*
407 * Stubs for devfs. A non-unloadable module.
408 */
409
410#ifndef	DEVFS_MODULE
411	MODULE(devfs,fs);
412	NO_UNLOAD_STUB(devfs, devfs_clean,		nomod_minus_one);
413	NO_UNLOAD_STUB(devfs, devfs_lookupname,		nomod_minus_one);
414	NO_UNLOAD_STUB(devfs, devfs_walk,		nomod_minus_one);
415	NO_UNLOAD_STUB(devfs, devfs_devpolicy,		nomod_minus_one);
416	NO_UNLOAD_STUB(devfs, devfs_reset_perm,		nomod_minus_one);
417	NO_UNLOAD_STUB(devfs, devfs_remdrv_cleanup,	nomod_minus_one);
418	END_MODULE(devfs);
419#endif
420
421#ifndef	DEV_MODULE
422	MODULE(dev,fs);
423	NO_UNLOAD_STUB(dev, sdev_modctl_readdir,	nomod_minus_one);
424	NO_UNLOAD_STUB(dev, sdev_modctl_readdir_free,	nomod_minus_one);
425	NO_UNLOAD_STUB(dev, devname_filename_register,	nomod_minus_one);
426	NO_UNLOAD_STUB(dev, sdev_modctl_devexists,	nomod_minus_one);
427	NO_UNLOAD_STUB(dev, devname_profile_update,	nomod_minus_one);
428	NO_UNLOAD_STUB(dev, sdev_devstate_change,	nomod_minus_one);
429	NO_UNLOAD_STUB(dev, devvt_getvnodeops,		nomod_minus_one);
430	NO_UNLOAD_STUB(dev, devpts_getvnodeops,		nomod_zero);
431	END_MODULE(dev);
432#endif
433
434/*
435 * Stubs for specfs. A non-unloadable module.
436 */
437
438#ifndef SPEC_MODULE
439	MODULE(specfs,fs);
440	NO_UNLOAD_STUB(specfs, common_specvp,		nomod_zero);
441	NO_UNLOAD_STUB(specfs, makectty,		nomod_zero);
442	NO_UNLOAD_STUB(specfs, makespecvp,     		nomod_zero);
443	NO_UNLOAD_STUB(specfs, smark,          		nomod_zero);
444	NO_UNLOAD_STUB(specfs, spec_segmap,    		nomod_einval);
445	NO_UNLOAD_STUB(specfs, specfind,       		nomod_zero);
446	NO_UNLOAD_STUB(specfs, specvp,         		nomod_zero);
447	NO_UNLOAD_STUB(specfs, devi_stillreferenced,	nomod_zero);
448	NO_UNLOAD_STUB(specfs, spec_getvnodeops,	nomod_zero);
449	NO_UNLOAD_STUB(specfs, spec_char_map,		nomod_zero);
450	NO_UNLOAD_STUB(specfs, specvp_devfs,  		nomod_zero);
451	NO_UNLOAD_STUB(specfs, spec_assoc_vp_with_devi,	nomod_void);
452	NO_UNLOAD_STUB(specfs, spec_hold_devi_by_vp,	nomod_zero);
453	NO_UNLOAD_STUB(specfs, spec_snode_walk,		nomod_void);
454	NO_UNLOAD_STUB(specfs, spec_devi_open_count,	nomod_minus_one);
455	NO_UNLOAD_STUB(specfs, spec_is_clone,		nomod_zero);
456	NO_UNLOAD_STUB(specfs, spec_is_selfclone,	nomod_zero);
457	NO_UNLOAD_STUB(specfs, spec_fence_snode,	nomod_minus_one);
458	NO_UNLOAD_STUB(specfs, spec_unfence_snode,	nomod_minus_one);
459	END_MODULE(specfs);
460#endif
461
462
463/*
464 * Stubs for sockfs. A non-unloadable module.
465 */
466#ifndef SOCK_MODULE
467	MODULE(sockfs,fs);
468	NO_UNLOAD_STUB(sockfs, so_socket,  	nomod_zero);
469	NO_UNLOAD_STUB(sockfs, so_socketpair,	nomod_zero);
470	NO_UNLOAD_STUB(sockfs, bind,  		nomod_zero);
471	NO_UNLOAD_STUB(sockfs, listen,  	nomod_zero);
472	NO_UNLOAD_STUB(sockfs, accept,  	nomod_zero);
473	NO_UNLOAD_STUB(sockfs, connect,  	nomod_zero);
474	NO_UNLOAD_STUB(sockfs, shutdown,  	nomod_zero);
475	NO_UNLOAD_STUB(sockfs, recv,  		nomod_zero);
476	NO_UNLOAD_STUB(sockfs, recvfrom,  	nomod_zero);
477	NO_UNLOAD_STUB(sockfs, recvmsg,  	nomod_zero);
478	NO_UNLOAD_STUB(sockfs, send,  		nomod_zero);
479	NO_UNLOAD_STUB(sockfs, sendmsg,  	nomod_zero);
480	NO_UNLOAD_STUB(sockfs, sendto,  	nomod_zero);
481#ifdef _SYSCALL32_IMPL
482	NO_UNLOAD_STUB(sockfs, recv32,		nomod_zero);
483	NO_UNLOAD_STUB(sockfs, recvfrom32,	nomod_zero);
484	NO_UNLOAD_STUB(sockfs, send32,		nomod_zero);
485	NO_UNLOAD_STUB(sockfs, sendto32,	nomod_zero);
486#endif	/* _SYSCALL32_IMPL */
487	NO_UNLOAD_STUB(sockfs, getpeername,  	nomod_zero);
488	NO_UNLOAD_STUB(sockfs, getsockname,  	nomod_zero);
489	NO_UNLOAD_STUB(sockfs, getsockopt,  	nomod_zero);
490	NO_UNLOAD_STUB(sockfs, setsockopt,  	nomod_zero);
491	NO_UNLOAD_STUB(sockfs, sockconfig,  	nomod_zero);
492	NO_UNLOAD_STUB(sockfs, sock_getmsg,  	nomod_zero);
493	NO_UNLOAD_STUB(sockfs, sock_putmsg,  	nomod_zero);
494	NO_UNLOAD_STUB(sockfs, sosendfile64,  	nomod_zero);
495	NO_UNLOAD_STUB(sockfs, snf_segmap,  	nomod_einval);
496	NO_UNLOAD_STUB(sockfs, sock_getfasync,  nomod_zero);
497	NO_UNLOAD_STUB(sockfs, nl7c_sendfilev,  nomod_zero);
498	NO_UNLOAD_STUB(sockfs, sotpi_sototpi,  nomod_zero);
499	NO_UNLOAD_STUB(sockfs, socket_sendmblk,  nomod_zero);
500	NO_UNLOAD_STUB(sockfs, socket_setsockopt,  nomod_zero);
501	END_MODULE(sockfs);
502#endif
503
504/*
505 * IPsec stubs.
506 */
507
508#ifndef	IPSECAH_MODULE
509	MODULE(ipsecah,drv);
510	WSTUB(ipsecah,	ipsec_construct_inverse_acquire,	nomod_zero);
511	WSTUB(ipsecah,	sadb_acquire,		nomod_zero);
512	WSTUB(ipsecah,	sadb_ill_download,	nomod_zero);
513	WSTUB(ipsecah,	ipsecah_algs_changed,	nomod_zero);
514	WSTUB(ipsecah,	sadb_alg_update,	nomod_zero);
515	WSTUB(ipsecah,	sadb_unlinkassoc,	nomod_zero);
516	WSTUB(ipsecah,	sadb_insertassoc,	nomod_zero);
517	WSTUB(ipsecah,	ipsecah_in_assocfailure,	nomod_zero);
518	WSTUB(ipsecah,	sadb_set_lpkt,		nomod_zero);
519	WSTUB(ipsecah,	ipsecah_icmp_error,	nomod_zero);
520	END_MODULE(ipsecah);
521#endif
522
523#ifndef	IPSECESP_MODULE
524	MODULE(ipsecesp,drv);
525	WSTUB(ipsecesp,	ipsecesp_fill_defs,	nomod_zero);
526	WSTUB(ipsecesp,	ipsecesp_algs_changed,	nomod_zero);
527	WSTUB(ipsecesp, ipsecesp_in_assocfailure,	nomod_zero);
528	WSTUB(ipsecesp, ipsecesp_init_funcs,	nomod_zero);
529	WSTUB(ipsecesp,	ipsecesp_icmp_error,	nomod_zero);
530	WSTUB(ipsecesp,	ipsecesp_send_keepalive,	nomod_zero);
531	END_MODULE(ipsecesp);
532#endif
533
534#ifndef	KEYSOCK_MODULE
535	MODULE(keysock,	drv);
536	WSTUB(keysock,	keysock_plumb_ipsec,	nomod_zero);
537	WSTUB(keysock,	keysock_extended_reg,	nomod_zero);
538	WSTUB(keysock,	keysock_next_seq,	nomod_zero);
539	END_MODULE(keysock);
540#endif
541
542#ifndef SPDSOCK_MODULE
543	MODULE(spdsock,drv);
544	WSTUB(spdsock,	spdsock_update_pending_algs,	nomod_zero);
545	END_MODULE(spdsock);
546#endif
547
548/*
549 * Stubs for nfs common code.
550 * XXX nfs_getvnodeops should go away with removal of kludge in vnode.c
551 */
552#ifndef NFS_MODULE
553	MODULE(nfs,fs);
554	WSTUB(nfs,	nfs_getvnodeops,	nomod_zero);
555	WSTUB(nfs,	nfs_perror,		nomod_zero);
556	WSTUB(nfs,	nfs_cmn_err,		nomod_zero);
557	WSTUB(nfs,	clcleanup_zone,		nomod_zero);
558	WSTUB(nfs,	clcleanup4_zone,	nomod_zero);
559	END_MODULE(nfs);
560#endif
561
562
563/*
564 * Stubs for nfs_dlboot (diskless booting).
565 */
566#ifndef NFS_DLBOOT_MODULE
567	MODULE(nfs_dlboot,misc);
568	STUB(nfs_dlboot,	mount_root,	nomod_minus_one);
569	STUB(nfs_dlboot,	dhcpinit,	nomod_minus_one);
570	END_MODULE(nfs_dlboot);
571#endif
572
573/*
574 * Stubs for nfs server-only code.
575 */
576#ifndef NFSSRV_MODULE
577	MODULE(nfssrv,misc);
578	STUB(nfssrv,		lm_nfs3_fhtovp,	nomod_minus_one);
579	STUB(nfssrv,		lm_fhtovp,	nomod_minus_one);
580	STUB(nfssrv,		exportfs,	nomod_minus_one);
581	STUB(nfssrv,		nfs_getfh,	nomod_minus_one);
582	STUB(nfssrv,		nfsl_flush,	nomod_minus_one);
583	STUB(nfssrv,		rfs4_check_delegated, nomod_zero);
584	STUB(nfssrv,		mountd_args,	nomod_minus_one);
585	NO_UNLOAD_STUB(nfssrv,	rdma_start,	nomod_zero);
586	NO_UNLOAD_STUB(nfssrv,	nfs_svc,	nomod_zero);
587	END_MODULE(nfssrv);
588#endif
589
590/*
591 * Stubs for kernel lock manager.
592 */
593#ifndef KLM_MODULE
594	MODULE(klmmod,misc);
595	NO_UNLOAD_STUB(klmmod, lm_svc,		nomod_zero);
596	NO_UNLOAD_STUB(klmmod, lm_shutdown,	nomod_zero);
597	NO_UNLOAD_STUB(klmmod, lm_unexport,	nomod_zero);
598	NO_UNLOAD_STUB(klmmod, lm_cprresume,	nomod_zero);
599	NO_UNLOAD_STUB(klmmod, lm_cprsuspend,	nomod_zero);
600	NO_UNLOAD_STUB(klmmod, lm_safelock, nomod_zero);
601	NO_UNLOAD_STUB(klmmod, lm_safemap, nomod_zero);
602	NO_UNLOAD_STUB(klmmod, lm_has_sleep, nomod_zero);
603	NO_UNLOAD_STUB(klmmod, lm_free_config, nomod_zero);
604	NO_UNLOAD_STUB(klmmod, lm_vp_active, nomod_zero);
605	NO_UNLOAD_STUB(klmmod, lm_get_sysid, nomod_zero);
606	NO_UNLOAD_STUB(klmmod, lm_rel_sysid, nomod_zero);
607	NO_UNLOAD_STUB(klmmod, lm_alloc_sysidt, nomod_minus_one);
608	NO_UNLOAD_STUB(klmmod, lm_free_sysidt, nomod_zero);
609	NO_UNLOAD_STUB(klmmod, lm_sysidt, nomod_minus_one);
610	END_MODULE(klmmod);
611#endif
612
613#ifndef KLMOPS_MODULE
614	MODULE(klmops,misc);
615	NO_UNLOAD_STUB(klmops, lm_frlock,	nomod_zero);
616	NO_UNLOAD_STUB(klmops, lm4_frlock,	nomod_zero);
617	NO_UNLOAD_STUB(klmops, lm_shrlock,	nomod_zero);
618	NO_UNLOAD_STUB(klmops, lm4_shrlock,	nomod_zero);
619	NO_UNLOAD_STUB(klmops, lm_nlm_dispatch,	nomod_zero);
620	NO_UNLOAD_STUB(klmops, lm_nlm4_dispatch,	nomod_zero);
621	NO_UNLOAD_STUB(klmops, lm_nlm_reclaim,	nomod_zero);
622	NO_UNLOAD_STUB(klmops, lm_nlm4_reclaim,	nomod_zero);
623	NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero);
624	END_MODULE(klmops);
625#endif
626
627/*
628 * Stubs for kernel TLI module
629 *   XXX currently we never allow this to unload
630 */
631#ifndef TLI_MODULE
632	MODULE(tlimod,misc);
633	NO_UNLOAD_STUB(tlimod,	t_kopen,		nomod_minus_one);
634	NO_UNLOAD_STUB(tlimod,	t_kunbind,		nomod_zero);
635	NO_UNLOAD_STUB(tlimod,	t_kadvise,		nomod_zero);
636	NO_UNLOAD_STUB(tlimod,	t_krcvudata,		nomod_zero);
637	NO_UNLOAD_STUB(tlimod,	t_ksndudata,		nomod_zero);
638	NO_UNLOAD_STUB(tlimod,	t_kalloc,		nomod_zero);
639	NO_UNLOAD_STUB(tlimod,	t_kbind,		nomod_zero);
640	NO_UNLOAD_STUB(tlimod,	t_kclose,		nomod_zero);
641	NO_UNLOAD_STUB(tlimod,	t_kspoll,		nomod_zero);
642	NO_UNLOAD_STUB(tlimod,	t_kfree,		nomod_zero);
643	END_MODULE(tlimod);
644#endif
645
646/*
647 * Stubs for kernel RPC module
648 *   XXX currently we never allow this to unload
649 */
650#ifndef RPC_MODULE
651	MODULE(rpcmod,strmod);
652	NO_UNLOAD_STUB(rpcmod,	clnt_tli_kcreate,	nomod_minus_one);
653	NO_UNLOAD_STUB(rpcmod,	svc_tli_kcreate,	nomod_minus_one);
654	NO_UNLOAD_STUB(rpcmod,	bindresvport,		nomod_minus_one);
655	NO_UNLOAD_STUB(rpcmod, rdma_register_mod,	nomod_minus_one);
656	NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod,	nomod_minus_one);
657	NO_UNLOAD_STUB(rpcmod, svc_queuereq,		nomod_minus_one);
658	NO_UNLOAD_STUB(rpcmod, clist_add,		nomod_minus_one);
659	END_MODULE(rpcmod);
660#endif
661
662/*
663 * Stubs for des
664 */
665#ifndef DES_MODULE
666	MODULE(des,misc);
667	STUB(des, cbc_crypt, 	 	nomod_zero);
668	STUB(des, ecb_crypt, 		nomod_zero);
669	STUB(des, _des_crypt,		nomod_zero);
670	END_MODULE(des);
671#endif
672
673/*
674 * Stubs for procfs. A non-unloadable module.
675 */
676#ifndef PROC_MODULE
677	MODULE(procfs,fs);
678	NO_UNLOAD_STUB(procfs, prfree,		nomod_zero);
679	NO_UNLOAD_STUB(procfs, prexit,		nomod_zero);
680	NO_UNLOAD_STUB(procfs, prlwpfree,	nomod_zero);
681	NO_UNLOAD_STUB(procfs, prlwpexit,	nomod_zero);
682	NO_UNLOAD_STUB(procfs, prinvalidate,	nomod_zero);
683	NO_UNLOAD_STUB(procfs, prnsegs,		nomod_zero);
684	NO_UNLOAD_STUB(procfs, prgetcred,	nomod_zero);
685	NO_UNLOAD_STUB(procfs, prgetpriv,	nomod_zero);
686	NO_UNLOAD_STUB(procfs, prgetprivsize,	nomod_zero);
687	NO_UNLOAD_STUB(procfs, prgetstatus,	nomod_zero);
688	NO_UNLOAD_STUB(procfs, prgetlwpstatus,	nomod_zero);
689	NO_UNLOAD_STUB(procfs, prgetpsinfo,	nomod_zero);
690	NO_UNLOAD_STUB(procfs, prgetlwpsinfo,	nomod_zero);
691	NO_UNLOAD_STUB(procfs, oprgetstatus,	nomod_zero);
692	NO_UNLOAD_STUB(procfs, oprgetpsinfo,	nomod_zero);
693#ifdef _SYSCALL32_IMPL
694	NO_UNLOAD_STUB(procfs, prgetstatus32,	nomod_zero);
695	NO_UNLOAD_STUB(procfs, prgetlwpstatus32, nomod_zero);
696	NO_UNLOAD_STUB(procfs, prgetpsinfo32,	nomod_zero);
697	NO_UNLOAD_STUB(procfs, prgetlwpsinfo32,	nomod_zero);
698	NO_UNLOAD_STUB(procfs, oprgetstatus32,	nomod_zero);
699	NO_UNLOAD_STUB(procfs, oprgetpsinfo32,	nomod_zero);
700#endif	/* _SYSCALL32_IMPL */
701	NO_UNLOAD_STUB(procfs, prnotify,	nomod_zero);
702	NO_UNLOAD_STUB(procfs, prexecstart,	nomod_zero);
703	NO_UNLOAD_STUB(procfs, prexecend,	nomod_zero);
704	NO_UNLOAD_STUB(procfs, prrelvm,		nomod_zero);
705	NO_UNLOAD_STUB(procfs, prbarrier,	nomod_zero);
706	NO_UNLOAD_STUB(procfs, estimate_msacct,	nomod_zero);
707	NO_UNLOAD_STUB(procfs, pr_getprot,	nomod_zero);
708	NO_UNLOAD_STUB(procfs, pr_getprot_done,	nomod_zero);
709	NO_UNLOAD_STUB(procfs, pr_getsegsize,	nomod_zero);
710	NO_UNLOAD_STUB(procfs, pr_isobject,	nomod_zero);
711	NO_UNLOAD_STUB(procfs, pr_isself,	nomod_zero);
712	NO_UNLOAD_STUB(procfs, pr_allstopped,	nomod_zero);
713	NO_UNLOAD_STUB(procfs, pr_free_watched_pages, nomod_zero);
714	END_MODULE(procfs);
715#endif
716
717/*
718 * Stubs for fifofs
719 */
720#ifndef FIFO_MODULE
721	MODULE(fifofs,fs);
722	STUB(fifofs, fifovp,      	0);
723	STUB(fifofs, fifo_getinfo,	0);
724	STUB(fifofs, fifo_vfastoff,	0);
725	END_MODULE(fifofs);
726#endif
727
728/*
729 * Stubs for ufs
730 *
731 * This is needed to support the old quotactl system call.
732 * When the old sysent stuff goes away, this will need to be revisited.
733 */
734#ifndef UFS_MODULE
735	MODULE(ufs,fs);
736	STUB(ufs, quotactl, nomod_minus_one);
737	END_MODULE(ufs);
738#endif
739
740/*
741 * Stubs for zfs
742 */
743#ifndef ZFS_MODULE
744	MODULE(zfs,fs);
745	STUB(zfs, spa_boot_init, nomod_minus_one);
746	END_MODULE(zfs);
747#endif
748
749/*
750 * Stubs for dcfs
751 */
752#ifndef DCFS_MODULE
753	MODULE(dcfs,fs);
754	STUB(dcfs, decompvp, 0);
755	END_MODULE(dcfs);
756#endif
757
758/*
759 * Stubs for namefs
760 */
761#ifndef NAMEFS_MODULE
762	MODULE(namefs,fs);
763	STUB(namefs, nm_unmountall, 	0);
764	END_MODULE(namefs);
765#endif
766
767/*
768 * Stubs for ts_dptbl
769 */
770#ifndef TS_DPTBL_MODULE
771	MODULE(TS_DPTBL,sched);
772	STUB(TS_DPTBL, ts_getdptbl,		0);
773	STUB(TS_DPTBL, ts_getkmdpris,		0);
774	STUB(TS_DPTBL, ts_getmaxumdpri,	0);
775	END_MODULE(TS_DPTBL);
776#endif
777
778/*
779 * Stubs for rt_dptbl
780 */
781#ifndef RT_DPTBL_MODULE
782	MODULE(RT_DPTBL,sched);
783	STUB(RT_DPTBL, rt_getdptbl,		0);
784	END_MODULE(RT_DPTBL);
785#endif
786
787/*
788 * Stubs for ia_dptbl
789 */
790#ifndef IA_DPTBL_MODULE
791	MODULE(IA_DPTBL,sched);
792	STUB(IA_DPTBL, ia_getdptbl,		nomod_zero);
793	STUB(IA_DPTBL, ia_getkmdpris,		nomod_zero);
794	STUB(IA_DPTBL, ia_getmaxumdpri,	nomod_zero);
795	END_MODULE(IA_DPTBL);
796#endif
797
798/*
799 * Stubs for FSS scheduler
800 */
801#ifndef FSS_MODULE
802	MODULE(FSS,sched);
803	WSTUB(FSS, fss_allocbuf,		nomod_zero);
804	WSTUB(FSS, fss_freebuf,			nomod_zero);
805	WSTUB(FSS, fss_changeproj,		nomod_zero);
806	WSTUB(FSS, fss_changepset,		nomod_zero);
807	END_MODULE(FSS);
808#endif
809
810/*
811 * Stubs for fx_dptbl
812 */
813#ifndef FX_DPTBL_MODULE
814	MODULE(FX_DPTBL,sched);
815	STUB(FX_DPTBL, fx_getdptbl,		0);
816	STUB(FX_DPTBL, fx_getmaxumdpri,		0);
817	END_MODULE(FX_DPTBL);
818#endif
819
820/*
821 * Stubs for bootdev
822 */
823#ifndef BOOTDEV_MODULE
824	MODULE(bootdev,misc);
825	STUB(bootdev, i_promname_to_devname, 0);
826	STUB(bootdev, i_convert_boot_device_name, 0);
827	END_MODULE(bootdev);
828#endif
829
830/*
831 * stubs for strplumb...
832 */
833#ifndef STRPLUMB_MODULE
834	MODULE(strplumb,misc);
835	STUB(strplumb, strplumb,     0);
836	STUB(strplumb, strplumb_load, 0);
837	STUB(strplumb, strplumb_get_netdev_path, 0);
838	END_MODULE(strplumb);
839#endif
840
841/*
842 * Stubs for console configuration module
843 */
844#ifndef CONSCONFIG_MODULE
845	MODULE(consconfig,misc);
846	STUB(consconfig, consconfig,	0);
847	STUB(consconfig, consconfig_get_usb_kb_path,	0);
848	STUB(consconfig, consconfig_get_usb_ms_path,	0);
849	STUB(consconfig, consconfig_get_plat_fbpath,	0);
850	END_MODULE(consconfig);
851#endif
852
853/*
854 * Stubs for accounting.
855 */
856#ifndef SYSACCT_MODULE
857	MODULE(sysacct,sys);
858	WSTUB(sysacct, acct,  		nomod_zero);
859	WSTUB(sysacct, acct_fs_in_use, 	nomod_zero);
860	END_MODULE(sysacct);
861#endif
862
863/*
864 * Stubs for semaphore routines. sem.c
865 */
866#ifndef SEMSYS_MODULE
867	MODULE(semsys,sys);
868	WSTUB(semsys, semexit,		nomod_zero);
869	END_MODULE(semsys);
870#endif
871
872/*
873 * Stubs for shmem routines. shm.c
874 */
875#ifndef SHMSYS_MODULE
876	MODULE(shmsys,sys);
877	WSTUB(shmsys, shmexit,		nomod_zero);
878	WSTUB(shmsys, shmfork,		nomod_zero);
879	WSTUB(shmsys, shmgetid,		nomod_minus_one);
880	END_MODULE(shmsys);
881#endif
882
883/*
884 * Stubs for doors
885 */
886#ifndef DOOR_MODULE
887	MODULE(doorfs,sys);
888	WSTUB(doorfs, door_slam,			nomod_zero);
889	WSTUB(doorfs, door_exit,			nomod_zero);
890	WSTUB(doorfs, door_revoke_all,			nomod_zero);
891	WSTUB(doorfs, door_fork,			nomod_zero);
892	NO_UNLOAD_STUB(doorfs, door_upcall,		nomod_einval);
893	NO_UNLOAD_STUB(doorfs, door_ki_create,		nomod_einval);
894	NO_UNLOAD_STUB(doorfs, door_ki_open,		nomod_einval);
895	NO_UNLOAD_STUB(doorfs, door_ki_lookup,		nomod_zero);
896	WSTUB(doorfs, door_ki_upcall,			nomod_einval);
897	WSTUB(doorfs, door_ki_upcall_limited,		nomod_einval);
898	WSTUB(doorfs, door_ki_hold,			nomod_zero);
899	WSTUB(doorfs, door_ki_rele,			nomod_zero);
900	WSTUB(doorfs, door_ki_info,			nomod_einval);
901	END_MODULE(doorfs);
902#endif
903
904/*
905 * Stubs for MD5
906 */
907#ifndef MD5_MODULE
908	MODULE(md5,misc);
909	WSTUB(md5, MD5Init,		nomod_zero);
910	WSTUB(md5, MD5Update,		nomod_zero);
911	WSTUB(md5, MD5Final,		nomod_zero);
912	END_MODULE(md5);
913#endif
914
915/*
916 * Stubs for idmap
917 */
918#ifndef IDMAP_MODULE
919	MODULE(idmap,misc);
920	STUB(idmap, kidmap_batch_getgidbysid,	nomod_zero);
921	STUB(idmap, kidmap_batch_getpidbysid,	nomod_zero);
922	STUB(idmap, kidmap_batch_getsidbygid,	nomod_zero);
923	STUB(idmap, kidmap_batch_getsidbyuid,	nomod_zero);
924	STUB(idmap, kidmap_batch_getuidbysid,	nomod_zero);
925	STUB(idmap, kidmap_get_create,		nomod_zero);
926	STUB(idmap, kidmap_get_destroy,		nomod_zero);
927	STUB(idmap, kidmap_get_mappings,	nomod_zero);
928	STUB(idmap, kidmap_getgidbysid,		nomod_zero);
929	STUB(idmap, kidmap_getpidbysid,		nomod_zero);
930	STUB(idmap, kidmap_getsidbygid,		nomod_zero);
931	STUB(idmap, kidmap_getsidbyuid,		nomod_zero);
932	STUB(idmap, kidmap_getuidbysid,		nomod_zero);
933	STUB(idmap, idmap_get_door,		nomod_einval);
934	STUB(idmap, idmap_unreg_dh,		nomod_einval);
935	STUB(idmap, idmap_reg_dh,		nomod_einval);
936	STUB(idmap, idmap_purge_cache,		nomod_einval);
937	END_MODULE(idmap);
938#endif
939
940/*
941 * Stubs for auditing.
942 */
943#ifndef C2AUDIT_MODULE
944	MODULE(c2audit,sys);
945	STUB(c2audit,  audit_init,			nomod_zero);
946	STUB(c2audit,  _auditsys,			nomod_zero);
947	NO_UNLOAD_STUB(c2audit, audit_free,		nomod_zero);
948	NO_UNLOAD_STUB(c2audit, audit_start, 		nomod_zero);
949	NO_UNLOAD_STUB(c2audit, audit_finish,		nomod_zero);
950	NO_UNLOAD_STUB(c2audit, audit_newproc,		nomod_zero);
951	NO_UNLOAD_STUB(c2audit, audit_pfree,		nomod_zero);
952	NO_UNLOAD_STUB(c2audit, audit_thread_free,	nomod_zero);
953	NO_UNLOAD_STUB(c2audit, audit_thread_create,	nomod_zero);
954	NO_UNLOAD_STUB(c2audit, audit_falloc,		nomod_zero);
955	NO_UNLOAD_STUB(c2audit, audit_unfalloc,		nomod_zero);
956	NO_UNLOAD_STUB(c2audit, audit_closef,		nomod_zero);
957	NO_UNLOAD_STUB(c2audit, audit_copen,		nomod_zero);
958	NO_UNLOAD_STUB(c2audit, audit_core_start,	nomod_zero);
959	NO_UNLOAD_STUB(c2audit, audit_core_finish,	nomod_zero);
960	NO_UNLOAD_STUB(c2audit, audit_stropen,		nomod_zero);
961	NO_UNLOAD_STUB(c2audit, audit_strclose,		nomod_zero);
962	NO_UNLOAD_STUB(c2audit, audit_strioctl,		nomod_zero);
963	NO_UNLOAD_STUB(c2audit, audit_strputmsg,	nomod_zero);
964	NO_UNLOAD_STUB(c2audit, audit_c2_revoke,	nomod_zero);
965	NO_UNLOAD_STUB(c2audit, audit_savepath,		nomod_zero);
966	NO_UNLOAD_STUB(c2audit, audit_anchorpath,	nomod_zero);
967	NO_UNLOAD_STUB(c2audit, audit_addcomponent,	nomod_zero);
968	NO_UNLOAD_STUB(c2audit, audit_exit,		nomod_zero);
969	NO_UNLOAD_STUB(c2audit, audit_exec,		nomod_zero);
970	NO_UNLOAD_STUB(c2audit, audit_symlink,		nomod_zero);
971	NO_UNLOAD_STUB(c2audit, audit_symlink_create,	nomod_zero);
972	NO_UNLOAD_STUB(c2audit, audit_vncreate_start,	nomod_zero);
973	NO_UNLOAD_STUB(c2audit, audit_vncreate_finish,	nomod_zero);
974	NO_UNLOAD_STUB(c2audit, audit_enterprom,	nomod_zero);
975	NO_UNLOAD_STUB(c2audit, audit_exitprom,		nomod_zero);
976	NO_UNLOAD_STUB(c2audit, audit_chdirec,		nomod_zero);
977	NO_UNLOAD_STUB(c2audit, audit_getf,		nomod_zero);
978	NO_UNLOAD_STUB(c2audit, audit_setf,		nomod_zero);
979	NO_UNLOAD_STUB(c2audit, audit_sock,		nomod_zero);
980	NO_UNLOAD_STUB(c2audit, audit_strgetmsg,	nomod_zero);
981	NO_UNLOAD_STUB(c2audit, audit_ipc,		nomod_zero);
982	NO_UNLOAD_STUB(c2audit, audit_ipcget,		nomod_zero);
983	NO_UNLOAD_STUB(c2audit, audit_lookupname,	nomod_zero);
984	NO_UNLOAD_STUB(c2audit, audit_pathcomp,		nomod_zero);
985	NO_UNLOAD_STUB(c2audit, audit_fdsend,		nomod_zero);
986	NO_UNLOAD_STUB(c2audit, audit_fdrecv,		nomod_zero);
987	NO_UNLOAD_STUB(c2audit, audit_priv,		nomod_zero);
988	NO_UNLOAD_STUB(c2audit, audit_setppriv,		nomod_zero);
989	NO_UNLOAD_STUB(c2audit, audit_devpolicy,	nomod_zero);
990	NO_UNLOAD_STUB(c2audit, audit_setfsat_path,	nomod_zero);
991	NO_UNLOAD_STUB(c2audit, audit_cryptoadm,	nomod_zero);
992	NO_UNLOAD_STUB(c2audit, audit_update_context,	nomod_zero);
993	NO_UNLOAD_STUB(c2audit, audit_kssl,		nomod_zero);
994	NO_UNLOAD_STUB(c2audit, audit_pf_policy,	nomod_zero);
995	END_MODULE(c2audit);
996#endif
997
998/*
999 * Stubs for kernel rpc security service module
1000 */
1001#ifndef RPCSEC_MODULE
1002	MODULE(rpcsec,misc);
1003	NO_UNLOAD_STUB(rpcsec, sec_clnt_revoke,		nomod_zero);
1004	NO_UNLOAD_STUB(rpcsec, authkern_create,		nomod_zero);
1005	NO_UNLOAD_STUB(rpcsec, sec_svc_msg,		nomod_zero);
1006	NO_UNLOAD_STUB(rpcsec, sec_svc_control,		nomod_zero);
1007	END_MODULE(rpcsec);
1008#endif
1009
1010/*
1011 * Stubs for rpc RPCSEC_GSS security service module
1012 */
1013#ifndef RPCSEC_GSS_MODULE
1014	MODULE(rpcsec_gss,misc);
1015	NO_UNLOAD_STUB(rpcsec_gss, __svcrpcsec_gss,		nomod_zero);
1016	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_getcred,		nomod_zero);
1017	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_callback,	nomod_zero);
1018	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secget,		nomod_zero);
1019	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secfree,		nomod_zero);
1020	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_seccreate,		nomod_zero);
1021	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_defaults,	nomod_zero);
1022	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_revauth,		nomod_zero);
1023	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secpurge,		nomod_zero);
1024	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_cleanup,		nomod_zero);
1025	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_versions,	nomod_zero);
1026	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_max_data_length,	nomod_zero);
1027	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_svc_max_data_length,	nomod_zero);
1028	NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_service_type,	nomod_zero);
1029	END_MODULE(rpcsec_gss);
1030#endif
1031
1032/*
1033 * Stubs for PCI configurator module (misc/pcicfg).
1034 */
1035#ifndef PCICFG_MODULE
1036	MODULE(pcicfg,misc);
1037	STUB(pcicfg, pcicfg_configure, 0);
1038	STUB(pcicfg, pcicfg_unconfigure, 0);
1039	END_MODULE(pcicfg);
1040#endif
1041
1042/*
1043 * Stubs for PCIEHPC (pci-ex hot plug support) module (misc/pciehpc).
1044 */
1045#ifndef	PCIEHPC_MODULE
1046	MODULE(pciehpc,misc);
1047	STUB(pciehpc, pciehpc_init, 0);
1048	STUB(pciehpc, pciehpc_uninit, 0);
1049	WSTUB(pciehpc, pciehpc_intr, nomod_zero);
1050	END_MODULE(pciehpc);
1051#endif
1052
1053#ifndef IWSCN_MODULE
1054	MODULE(iwscn,drv);
1055	STUB(iwscn, srpop, 0);
1056	END_MODULE(iwscn);
1057#endif
1058
1059/*
1060 * Stubs for checkpoint-resume module
1061 */
1062#ifndef CPR_MODULE
1063        MODULE(cpr,misc);
1064        STUB(cpr, cpr, 0);
1065        END_MODULE(cpr);
1066#endif
1067
1068/*
1069 * Stubs for kernel probes (tnf module).  Not unloadable.
1070 */
1071#ifndef TNF_MODULE
1072	MODULE(tnf,drv);
1073	NO_UNLOAD_STUB(tnf, tnf_ref32_1,	nomod_zero);
1074	NO_UNLOAD_STUB(tnf, tnf_string_1,	nomod_zero);
1075	NO_UNLOAD_STUB(tnf, tnf_opaque_array_1,	nomod_zero);
1076	NO_UNLOAD_STUB(tnf, tnf_struct_tag_1,	nomod_zero);
1077	NO_UNLOAD_STUB(tnf, tnf_allocate,	nomod_zero);
1078	END_MODULE(tnf);
1079#endif
1080
1081/*
1082 * Stubs for i86hvm bootstraping
1083 */
1084#ifndef HVM_BOOTSTRAP
1085	MODULE(hvm_bootstrap,misc);
1086	NO_UNLOAD_STUB(hvm_bootstrap, hvmboot_rootconf, nomod_zero);
1087	END_MODULE(hvm_bootstrap);
1088#endif
1089
1090/*
1091 * Clustering: stubs for bootstrapping.
1092 */
1093#ifndef CL_BOOTSTRAP
1094	MODULE(cl_bootstrap,misc);
1095	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_modload, nomod_minus_one);
1096	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_loadrootmodules, nomod_zero);
1097	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_rootconf, nomod_zero);
1098	NO_UNLOAD_WSTUB(cl_bootstrap, clboot_mountroot, nomod_zero);
1099	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_init, nomod_zero);
1100	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_get_nodeid, nomod_zero);
1101	NO_UNLOAD_WSTUB(cl_bootstrap, clconf_maximum_nodeid, nomod_zero);
1102	NO_UNLOAD_WSTUB(cl_bootstrap, cluster, nomod_zero);
1103	END_MODULE(cl_bootstrap);
1104#endif
1105
1106/*
1107 * Clustering: stubs for cluster infrastructure.
1108 */
1109#ifndef CL_COMM_MODULE
1110	MODULE(cl_comm,misc);
1111	NO_UNLOAD_STUB(cl_comm, cladmin, nomod_minus_one);
1112	END_MODULE(cl_comm);
1113#endif
1114
1115/*
1116 * Clustering: stubs for global file system operations.
1117 */
1118#ifndef PXFS_MODULE
1119	MODULE(pxfs,fs);
1120	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_read, nomod_zero);
1121	NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_write, nomod_zero);
1122	NO_UNLOAD_WSTUB(pxfs, cl_flk_state_transition_notify, nomod_zero);
1123	END_MODULE(pxfs);
1124#endif
1125
1126/*
1127 * Stubs for kernel cryptographic framework module (misc/kcf).
1128 */
1129#ifndef KCF_MODULE
1130	MODULE(kcf,misc);
1131	NO_UNLOAD_STUB(kcf, crypto_mech2id, nomod_minus_one);
1132	NO_UNLOAD_STUB(kcf, crypto_register_provider, nomod_minus_one);
1133	NO_UNLOAD_STUB(kcf, crypto_unregister_provider, nomod_minus_one);
1134	NO_UNLOAD_STUB(kcf, crypto_provider_notification, nomod_minus_one);
1135	NO_UNLOAD_STUB(kcf, crypto_op_notification, nomod_minus_one);
1136	NO_UNLOAD_STUB(kcf, crypto_kmflag, nomod_minus_one);
1137	NO_UNLOAD_STUB(kcf, crypto_digest, nomod_minus_one);
1138	NO_UNLOAD_STUB(kcf, crypto_digest_prov, nomod_minus_one);
1139	NO_UNLOAD_STUB(kcf, crypto_digest_init, nomod_minus_one);
1140	NO_UNLOAD_STUB(kcf, crypto_digest_init_prov, nomod_minus_one);
1141	NO_UNLOAD_STUB(kcf, crypto_digest_update, nomod_minus_one);
1142	NO_UNLOAD_STUB(kcf, crypto_digest_final, nomod_minus_one);
1143	NO_UNLOAD_STUB(kcf, crypto_digest_key_prov, nomod_minus_one);
1144	NO_UNLOAD_STUB(kcf, crypto_encrypt, nomod_minus_one);
1145	NO_UNLOAD_STUB(kcf, crypto_encrypt_prov, nomod_minus_one);
1146	NO_UNLOAD_STUB(kcf, crypto_encrypt_init, nomod_minus_one);
1147	NO_UNLOAD_STUB(kcf, crypto_encrypt_init_prov, nomod_minus_one);
1148	NO_UNLOAD_STUB(kcf, crypto_encrypt_update, nomod_minus_one);
1149	NO_UNLOAD_STUB(kcf, crypto_encrypt_final, nomod_minus_one);
1150	NO_UNLOAD_STUB(kcf, crypto_decrypt, nomod_minus_one);
1151	NO_UNLOAD_STUB(kcf, crypto_decrypt_prov, nomod_minus_one);
1152	NO_UNLOAD_STUB(kcf, crypto_decrypt_init, nomod_minus_one);
1153	NO_UNLOAD_STUB(kcf, crypto_decrypt_init_prov, nomod_minus_one);
1154	NO_UNLOAD_STUB(kcf, crypto_decrypt_update, nomod_minus_one);
1155	NO_UNLOAD_STUB(kcf, crypto_decrypt_final, nomod_minus_one);
1156	NO_UNLOAD_STUB(kcf, crypto_get_all_mech_info, nomod_minus_one);
1157	NO_UNLOAD_STUB(kcf, crypto_key_check, nomod_minus_one);
1158	NO_UNLOAD_STUB(kcf, crypto_key_check_prov, nomod_minus_one);
1159	NO_UNLOAD_STUB(kcf, crypto_key_derive, nomod_minus_one);
1160	NO_UNLOAD_STUB(kcf, crypto_key_generate, nomod_minus_one);
1161	NO_UNLOAD_STUB(kcf, crypto_key_generate_pair, nomod_minus_one);
1162	NO_UNLOAD_STUB(kcf, crypto_key_unwrap, nomod_minus_one);
1163	NO_UNLOAD_STUB(kcf, crypto_key_wrap, nomod_minus_one);
1164	NO_UNLOAD_STUB(kcf, crypto_mac, nomod_minus_one);
1165	NO_UNLOAD_STUB(kcf, crypto_mac_prov, nomod_minus_one);
1166	NO_UNLOAD_STUB(kcf, crypto_mac_verify, nomod_minus_one);
1167	NO_UNLOAD_STUB(kcf, crypto_mac_verify_prov, nomod_minus_one);
1168	NO_UNLOAD_STUB(kcf, crypto_mac_init, nomod_minus_one);
1169	NO_UNLOAD_STUB(kcf, crypto_mac_init_prov, nomod_minus_one);
1170	NO_UNLOAD_STUB(kcf, crypto_mac_update, nomod_minus_one);
1171	NO_UNLOAD_STUB(kcf, crypto_mac_final, nomod_minus_one);
1172	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt, nomod_minus_one);
1173	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_prov, nomod_minus_one);
1174	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt, nomod_minus_one);
1175	NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt_prov, nomod_minus_one);
1176	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init, nomod_minus_one);
1177	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init_prov, nomod_minus_one);
1178	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_update, nomod_minus_one);
1179	NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_final, nomod_minus_one);
1180	NO_UNLOAD_STUB(kcf, crypto_object_copy, nomod_minus_one);
1181	NO_UNLOAD_STUB(kcf, crypto_object_create, nomod_minus_one);
1182	NO_UNLOAD_STUB(kcf, crypto_object_destroy, nomod_minus_one);
1183	NO_UNLOAD_STUB(kcf, crypto_object_find_final, nomod_minus_one);
1184	NO_UNLOAD_STUB(kcf, crypto_object_find_init, nomod_minus_one);
1185	NO_UNLOAD_STUB(kcf, crypto_object_find, nomod_minus_one);
1186	NO_UNLOAD_STUB(kcf, crypto_object_get_attribute_value, nomod_minus_one);
1187	NO_UNLOAD_STUB(kcf, crypto_object_get_size, nomod_minus_one);
1188	NO_UNLOAD_STUB(kcf, crypto_object_set_attribute_value, nomod_minus_one);
1189	NO_UNLOAD_STUB(kcf, crypto_session_close, nomod_minus_one);
1190	NO_UNLOAD_STUB(kcf, crypto_session_login, nomod_minus_one);
1191	NO_UNLOAD_STUB(kcf, crypto_session_logout, nomod_minus_one);
1192	NO_UNLOAD_STUB(kcf, crypto_session_open, nomod_minus_one);
1193	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac, nomod_minus_one);
1194	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_prov, nomod_minus_one);
1195	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init, nomod_minus_one);
1196	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init_prov, nomod_minus_one);
1197	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_update, nomod_minus_one);
1198	NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_final, nomod_minus_one);
1199	NO_UNLOAD_STUB(kcf, crypto_create_ctx_template, nomod_minus_one);
1200	NO_UNLOAD_STUB(kcf, crypto_destroy_ctx_template, nomod_minus_one);
1201	NO_UNLOAD_STUB(kcf, crypto_get_mech_list, nomod_minus_one);
1202	NO_UNLOAD_STUB(kcf, crypto_free_mech_list, nomod_minus_one);
1203	NO_UNLOAD_STUB(kcf, crypto_cancel_req, nomod_minus_one);
1204	NO_UNLOAD_STUB(kcf, crypto_cancel_ctx, nomod_minus_one);
1205	NO_UNLOAD_STUB(kcf, crypto_bufcall_alloc, nomod_minus_one);
1206	NO_UNLOAD_STUB(kcf, crypto_bufcall_free, nomod_minus_one);
1207	NO_UNLOAD_STUB(kcf, crypto_bufcall, nomod_minus_one);
1208	NO_UNLOAD_STUB(kcf, crypto_unbufcall, nomod_minus_one);
1209	NO_UNLOAD_STUB(kcf, crypto_notify_events, nomod_minus_one);
1210	NO_UNLOAD_STUB(kcf, crypto_unnotify_events, nomod_minus_one);
1211	NO_UNLOAD_STUB(kcf, crypto_get_provider, nomod_minus_one);
1212	NO_UNLOAD_STUB(kcf, crypto_get_provinfo, nomod_minus_one);
1213	NO_UNLOAD_STUB(kcf, crypto_release_provider, nomod_minus_one);
1214	NO_UNLOAD_STUB(kcf, crypto_sign, nomod_minus_one);
1215	NO_UNLOAD_STUB(kcf, crypto_sign_prov, nomod_minus_one);
1216	NO_UNLOAD_STUB(kcf, crypto_sign_init, nomod_minus_one);
1217	NO_UNLOAD_STUB(kcf, crypto_sign_init_prov, nomod_minus_one);
1218	NO_UNLOAD_STUB(kcf, crypto_sign_update, nomod_minus_one);
1219	NO_UNLOAD_STUB(kcf, crypto_sign_final, nomod_minus_one);
1220	NO_UNLOAD_STUB(kcf, crypto_sign_recover, nomod_minus_one);
1221	NO_UNLOAD_STUB(kcf, crypto_sign_recover_prov, nomod_minus_one);
1222	NO_UNLOAD_STUB(kcf, crypto_sign_recover_init_prov, nomod_minus_one);
1223	NO_UNLOAD_STUB(kcf, crypto_verify, nomod_minus_one);
1224	NO_UNLOAD_STUB(kcf, crypto_verify_prov, nomod_minus_one);
1225	NO_UNLOAD_STUB(kcf, crypto_verify_init, nomod_minus_one);
1226	NO_UNLOAD_STUB(kcf, crypto_verify_init_prov, nomod_minus_one);
1227	NO_UNLOAD_STUB(kcf, crypto_verify_update, nomod_minus_one);
1228	NO_UNLOAD_STUB(kcf, crypto_verify_final, nomod_minus_one);
1229	NO_UNLOAD_STUB(kcf, crypto_verify_recover, nomod_minus_one);
1230	NO_UNLOAD_STUB(kcf, crypto_verify_recover_prov, nomod_minus_one);
1231	NO_UNLOAD_STUB(kcf, crypto_verify_recover_init_prov, nomod_minus_one);
1232	NO_UNLOAD_STUB(kcf, random_add_entropy, nomod_minus_one);
1233	NO_UNLOAD_STUB(kcf, random_add_pseudo_entropy, nomod_minus_one);
1234	NO_UNLOAD_STUB(kcf, random_get_bytes, nomod_minus_one);
1235	NO_UNLOAD_STUB(kcf, random_get_pseudo_bytes, nomod_minus_one);
1236	END_MODULE(kcf);
1237#endif
1238
1239/*
1240 * Stubs for sha1. A non-unloadable module.
1241 */
1242#ifndef SHA1_MODULE
1243	MODULE(sha1,crypto);
1244	NO_UNLOAD_STUB(sha1, SHA1Init, nomod_void);
1245	NO_UNLOAD_STUB(sha1, SHA1Update, nomod_void);
1246	NO_UNLOAD_STUB(sha1, SHA1Final, nomod_void);
1247	END_MODULE(sha1);
1248#endif
1249
1250/*
1251 * The following stubs are used by the mac module.
1252 * Since dld already depends on mac, these
1253 * stubs are needed to avoid circular dependencies.
1254 */
1255#ifndef	DLD_MODULE
1256	MODULE(dld,drv);
1257	STUB(dld, dld_init_ops, nomod_void);
1258	STUB(dld, dld_fini_ops, nomod_void);
1259	STUB(dld, dld_autopush, nomod_minus_one);
1260	STUB(dld, dld_ioc_register, nomod_einval);
1261	STUB(dld, dld_ioc_unregister, nomod_void);
1262	END_MODULE(dld);
1263#endif
1264
1265/*
1266 * The following stubs are used by the mac module.
1267 * Since dls already depends on mac, these
1268 * stubs are needed to avoid circular dependencies.
1269 */
1270#ifndef DLS_MODULE
1271	MODULE(dls,misc);
1272	STUB(dls, dls_devnet_mac, nomod_zero);
1273	STUB(dls, dls_devnet_hold_tmp, nomod_einval);
1274	STUB(dls, dls_devnet_rele_tmp, nomod_void);
1275	STUB(dls, dls_devnet_hold_link, nomod_einval);
1276	STUB(dls, dls_devnet_rele_link, nomod_void);
1277	STUB(dls, dls_devnet_prop_task_wait, nomod_void);
1278	STUB(dls, dls_mgmt_get_linkid, nomod_einval);
1279	STUB(dls, dls_devnet_macname2linkid, nomod_einval);
1280	STUB(dls, dls_mgmt_get_linkinfo, nomod_einval);
1281        END_MODULE(dls);
1282#endif
1283
1284#ifndef	SOFTMAC_MODULE
1285	MODULE(softmac,drv);
1286	STUB(softmac, softmac_hold_device, nomod_einval);
1287	STUB(softmac, softmac_rele_device, nomod_void);
1288	STUB(softmac, softmac_recreate, nomod_void);
1289	END_MODULE(softmac);
1290#endif
1291
1292/*
1293 * Stubs for kssl, the kernel SSL proxy
1294 */
1295#ifndef KSSL_MODULE
1296	MODULE(kssl,drv);
1297	NO_UNLOAD_STUB(kssl, kssl_check_proxy, nomod_zero);
1298	NO_UNLOAD_STUB(kssl, kssl_handle_mblk, nomod_zero);
1299	NO_UNLOAD_STUB(kssl, kssl_input, nomod_zero);
1300	NO_UNLOAD_STUB(kssl, kssl_build_record, nomod_zero);
1301	NO_UNLOAD_STUB(kssl, kssl_hold_ent, nomod_void);
1302	NO_UNLOAD_STUB(kssl, kssl_release_ent, nomod_void);
1303	NO_UNLOAD_STUB(kssl, kssl_find_fallback, nomod_zero);
1304	NO_UNLOAD_STUB(kssl, kssl_init_context, nomod_zero);
1305	NO_UNLOAD_STUB(kssl, kssl_hold_ctx, nomod_void);
1306	NO_UNLOAD_STUB(kssl, kssl_release_ctx, nomod_void);
1307	END_MODULE(kssl);
1308#endif
1309
1310/*
1311 * Stubs for dcopy, for Intel IOAT KAPIs
1312 */
1313#ifndef DCOPY_MODULE
1314	MODULE(dcopy,misc);
1315	NO_UNLOAD_STUB(dcopy, dcopy_query, nomod_minus_one);
1316	NO_UNLOAD_STUB(dcopy, dcopy_query_channel, nomod_minus_one);
1317	NO_UNLOAD_STUB(dcopy, dcopy_alloc, nomod_minus_one);
1318	NO_UNLOAD_STUB(dcopy, dcopy_free, nomod_minus_one);
1319	NO_UNLOAD_STUB(dcopy, dcopy_cmd_alloc, nomod_minus_one);
1320	NO_UNLOAD_STUB(dcopy, dcopy_cmd_free, nomod_void);
1321	NO_UNLOAD_STUB(dcopy, dcopy_cmd_post, nomod_minus_one);
1322	NO_UNLOAD_STUB(dcopy, dcopy_cmd_poll, nomod_minus_one);
1323	END_MODULE(dcopy);
1324#endif
1325
1326/*
1327 * Stubs for acpica
1328 */
1329#ifndef ACPICA_MODULE
1330	MODULE(acpica,misc);
1331	NO_UNLOAD_STUB(acpica, AcpiOsReadPort, nomod_minus_one) ;
1332	NO_UNLOAD_STUB(acpica, AcpiOsWritePort, nomod_minus_one) ;
1333	NO_UNLOAD_STUB(acpica, AcpiInstallNotifyHandler, nomod_minus_one) ;
1334	NO_UNLOAD_STUB(acpica, AcpiRemoveNotifyHandler, nomod_minus_one) ;
1335	NO_UNLOAD_STUB(acpica, AcpiEvaluateObject, nomod_minus_one) ;
1336	NO_UNLOAD_STUB(acpica, AcpiEvaluateObjectTyped, nomod_minus_one) ;
1337	NO_UNLOAD_STUB(acpica, AcpiWriteBitRegister, nomod_minus_one) ;
1338	NO_UNLOAD_STUB(acpica, AcpiReadBitRegister, nomod_minus_one) ;
1339	NO_UNLOAD_STUB(acpica, AcpiOsFree, nomod_minus_one) ;
1340	NO_UNLOAD_STUB(acpica, acpica_get_handle_cpu, nomod_minus_one) ;
1341	NO_UNLOAD_STUB(acpica, acpica_get_global_FADT, nomod_minus_one) ;
1342	NO_UNLOAD_STUB(acpica, acpica_write_cpupm_capabilities,
1343	    nomod_minus_one)		       ;
1344	NO_UNLOAD_STUB(acpica, __acpi_wbinvd, nomod_minus_one) ;
1345	NO_UNLOAD_STUB(acpica, acpi_reset_system, nomod_minus_one) ;
1346	END_MODULE(acpica);
1347#endif
1348
1349#ifndef IPNET_MODULE
1350	MODULE(ipnet,drv);
1351	STUB(ipnet, ipnet_if_getdev, nomod_zero);
1352	STUB(ipnet, ipnet_walk_if, nomod_zero);
1353	END_MODULE(ipnet);
1354#endif
1355
1356#ifndef IOMMULIB_MODULE
1357	MODULE(iommulib,misc);
1358	STUB(iommulib, iommulib_nex_close, nomod_void);
1359        END_MODULE(iommulib);
1360#endif
1361
1362/*
1363 * Stubs for kernel socket, for iscsi
1364 */
1365#ifndef KSOCKET_MODULE
1366	MODULE(ksocket, misc);
1367	NO_UNLOAD_STUB(ksocket, ksocket_setsockopt, nomod_minus_one);
1368	NO_UNLOAD_STUB(ksocket, ksocket_getsockopt, nomod_minus_one);
1369	NO_UNLOAD_STUB(ksocket, ksocket_getpeername, nomod_minus_one);
1370	NO_UNLOAD_STUB(ksocket, ksocket_getsockname, nomod_minus_one);
1371	NO_UNLOAD_STUB(ksocket, ksocket_socket, nomod_minus_one);
1372	NO_UNLOAD_STUB(ksocket, ksocket_bind, nomod_minus_one);
1373	NO_UNLOAD_STUB(ksocket, ksocket_listen, nomod_minus_one);
1374	NO_UNLOAD_STUB(ksocket, ksocket_accept, nomod_minus_one);
1375	NO_UNLOAD_STUB(ksocket, ksocket_connect, nomod_minus_one);
1376	NO_UNLOAD_STUB(ksocket, ksocket_recv, nomod_minus_one);
1377	NO_UNLOAD_STUB(ksocket, ksocket_recvfrom, nomod_minus_one);
1378	NO_UNLOAD_STUB(ksocket, ksocket_recvmsg, nomod_minus_one);
1379	NO_UNLOAD_STUB(ksocket, ksocket_send, nomod_minus_one);
1380	NO_UNLOAD_STUB(ksocket, ksocket_sendto, nomod_minus_one);
1381	NO_UNLOAD_STUB(ksocket, ksocket_sendmsg, nomod_minus_one);
1382	NO_UNLOAD_STUB(ksocket, ksocket_ioctl, nomod_minus_one);
1383	NO_UNLOAD_STUB(ksocket, ksocket_setcallbacks, nomod_minus_one);
1384	NO_UNLOAD_STUB(ksocket, ksocket_hold, nomod_minus_one);
1385	NO_UNLOAD_STUB(ksocket, ksocket_rele, nomod_minus_one);
1386	NO_UNLOAD_STUB(ksocket, ksocket_shutdown, nomod_minus_one);
1387	NO_UNLOAD_STUB(ksocket, ksocket_close, nomod_minus_one);
1388	END_MODULE(ksocket);
1389#endif
1390
1391/ this is just a marker for the area of text that contains stubs
1392
1393	ENTRY_NP(stubs_end)
1394	nop
1395
1396#endif	/* lint */
1397