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