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 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26#pragma ident "%Z%%M% %I% %E% SMI" 27 28#if !defined(lint) 29#include "assym.h" 30#endif /* !lint */ 31 32#include <sys/asm_linkage.h> 33 34#if defined(lint) 35 36char stubs_base[1], stubs_end[1]; 37 38#else /* lint */ 39 40/* 41 * WARNING: there is no check for forgetting to write END_MODULE, 42 * and if you do, the kernel will most likely crash. Be careful 43 * 44 * This file assumes that all of the contributions to the data segment 45 * will be contiguous in the output file, even though they are separated 46 * by pieces of text. This is safe for all assemblers I know of now... 47 */ 48 49/* 50 * This file uses ansi preprocessor features: 51 * 52 * 1. #define mac(a) extra_ ## a --> mac(x) expands to extra_a 53 * The old version of this is 54 * #define mac(a) extra_/.*.*./a 55 * but this fails if the argument has spaces "mac ( x )" 56 * (Ignore the dots above, I had to put them in to keep this a comment.) 57 * 58 * 2. #define mac(a) #a --> mac(x) expands to "x" 59 * The old version is 60 * #define mac(a) "a" 61 * 62 * For some reason, the 5.0 preprocessor isn't happy with the above usage. 63 * For now, we're not using these ansi features. 64 * 65 * The reason is that "the 5.0 ANSI preprocessor" is built into the compiler 66 * and is a tokenizing preprocessor. This means, when confronted by something 67 * other than C token generation rules, strange things occur. In this case, 68 * when confronted by an assembly file, it would turn the token ".globl" into 69 * two tokens "." and "globl". For this reason, the traditional, non-ANSI 70 * preprocessor is used on assembly files. 71 * 72 * It would be desirable to have a non-tokenizing cpp (accp?) to use for this. 73 */ 74 75/* 76 * This file contains the stubs routines for modules which can be autoloaded. 77 */ 78 79 80/* 81 * See the 'struct mod_modinfo' definition to see what this structure 82 * is trying to achieve here. 83 */ 84/* 85 * XX64 - This still needs some repair. 86 * (a) define 'pointer alignment' and use it 87 * (b) define '.pword' or equivalent, and use it (to mean .word or .xword). 88 */ 89#define MODULE(module,namespace) \ 90 .seg ".data"; \ 91module/**/_modname: \ 92 .ascii "namespace/module"; \ 93 .byte 0; \ 94 .align CPTRSIZE; \ 95 .global module/**/_modinfo; \ 96 .type module/**/_modinfo, #object; \ 97 .size module/**/_modinfo, 16; \ 98module/**/_modinfo: \ 99 .word 0; \ 100 .word module/**/_modname; \ 101 .word 0; \ 102 .word 0; 103 104#define END_MODULE(module) \ 105 .align 8; .word 0; .word 0 /* FIXME: .xword 0 */ 106 107 108#define STUB(module, fcnname, retfcn) \ 109 STUB_COMMON(module, fcnname, mod_hold_stub, retfcn, 0) 110 111/* 112 * "weak stub", don't load on account of this call 113 */ 114#define WSTUB(module, fcnname, retfcn) \ 115 STUB_COMMON(module, fcnname, retfcn, retfcn, MODS_WEAK) 116 117/* 118 * "non-unloadable stub", don't bother 'holding' module if it's already loaded 119 * since the module cannot be unloaded. 120 * 121 * User *MUST* guarantee the module is not unloadable (no _fini routine). 122 */ 123#define NO_UNLOAD_STUB(module, fcnname, retfcn) \ 124 STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD) 125 126/* 127 * Macro for modstubbed system calls whose modules are not unloadable. 128 * 129 * System call modstubs needs special handling for the case where 130 * the modstub is a system call, because %fp comes from user frame. 131 */ 132#define SCALL_NU_STUB(module, fcnname, retfcn) \ 133 SCALL_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD) 134/* "weak stub" for non-unloadable module, don't load on account of this call */ 135#define NO_UNLOAD_WSTUB(module, fcnname, retfcn) \ 136 STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD|MODS_WEAK) 137 138#define STUB_DATA(module, fcnname, install_fcn, retfcn, weak) \ 139 .seg ".data"; \ 140 .align 8; \ 141fcnname/**/_info: \ 142 .word 0; /* 0 */ \ 143 .word install_fcn; /* 4 */ \ 144 .word 0; /* 8 */ \ 145 .word module/**/_modinfo; /* c */ \ 146 .word 0; /* 10 */ \ 147 .word fcnname; /* 14 */ \ 148 .word 0; /* 18 */ \ 149 .word retfcn; /* 1c */ \ 150 .word weak /* 20 */ 151 152/* 153 * The flag MODS_INSTALLED is stored in the stub data and is used to 154 * indicate if a module is installed and initialized. This flag is used 155 * instead of the mod_stub_info->mods_modinfo->mod_installed flag 156 * to minimize the number of pointer de-references for each function 157 * call (and also to avoid possible TLB misses which could be induced 158 * by dereferencing these pointers.) 159 */ 160 161#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak) \ 162 ENTRY_NP(fcnname); \ 163 save %sp, -SA(MINFRAME), %sp;/* new window */ \ 164 set fcnname/**/_info, %l5; \ 165 ld [%l5 + MODS_FLAG], %l1; /* weak?? */ \ 166 cmp %l1, 0; \ 167 be,a 1f; /* not weak */ \ 168 restore; \ 169 btst MODS_INSTALLED, %l1; /* installed?? */ \ 170 bne,a,pt %xcc, 1f; /* yes, do mod_hold thing */ \ 171 restore; \ 172 ldn [%l5 + MODS_RETFCN], %g1; \ 173 jmp %g1; /* no, just jump to retfcn */ \ 174 restore; \ 1751: sub %sp, %fp, %g1; /* get (-)size of callers stack */ \ 176 save %sp, %g1, %sp; /* create new frame same size */ \ 177 sub %g0, %g1, %l4; /* size of stack frame */ \ 178 sethi %hi(fcnname/**/_info), %l5; \ 179 b stubs_common_code; \ 180 or %l5, %lo(fcnname/**/_info), %l5; \ 181 SET_SIZE(fcnname); \ 182 STUB_DATA(module, fcnname, install_fcn, retfcn, weak) 183 184#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak) \ 185 ENTRY_NP(fcnname); \ 186 save %sp, -SA(MINFRAME), %sp; /* new window */ \ 187 set fcnname/**/_info, %l5; \ 188 ld [%l5 + MODS_FLAG], %l1; \ 189 btst MODS_INSTALLED, %l1; /* installed?? */ \ 190 bne,a %xcc, 1f; /* yes */ \ 191 ldn [%l5], %g1; \ 192 btst MODS_WEAK, %l1; /* weak?? */ \ 193 be,a 2f; /* no, load module */ \ 194 restore; \ 195 ldn [%l5 + MODS_RETFCN], %g1; \ 1961: jmp %g1; /* off we go */ \ 197 restore; \ 1982: sub %sp, %fp, %g1; /* get (-)size of callers frame */ \ 199 save %sp, %g1, %sp; /* create new frame same size */ \ 200 sub %g0, %g1, %l4; /* size of stack frame */ \ 201 sethi %hi(fcnname/**/_info), %l5; \ 202 b stubs_common_code; \ 203 or %l5, %lo(fcnname/**/_info), %l5; \ 204 SET_SIZE(fcnname); \ 205 STUB_DATA(module, fcnname, install_fcn, retfcn, weak) 206 207#define SCALL_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak) \ 208 ENTRY_NP(fcnname); \ 209 save %sp, -SA(MINFRAME), %sp; /* new window */ \ 210 set fcnname/**/_info, %l5; \ 211 ld [%l5 + MODS_FLAG], %l1; /* installed?? */ \ 212 btst MODS_INSTALLED, %l1; \ 213 be,a %xcc, 1f; /* no, load module */ \ 214 restore; \ 215 ldn [%l5], %g1; \ 216 jmp %g1; /* yes, off we go */ \ 217 restore; \ 2181: save %sp, -SA(MINFRAME), %sp;/* new frame */ \ 219 sub %g0, -SA(MINFRAME), %l4;/* size of stack frame */ \ 220 sethi %hi(fcnname/**/_info), %l5; \ 221 b stubs_common_code; \ 222 or %l5, %lo(fcnname/**/_info), %l5; \ 223 SET_SIZE(fcnname); \ 224 STUB_DATA(module, fcnname, install_fcn, retfcn, weak) 225 226 .section ".text" 227 228 /* 229 * We branch here with the fcnname_info pointer in l5 230 * and the frame size in %l4. 231 */ 232 ENTRY_NP(stubs_common_code) 233 cmp %l4, SA(MINFRAME) 234 ble,a,pn %xcc, 2f 235 nop 236 237 sub %l4, 0x80, %l4 /* skip locals and outs */ 238 add %sp, 0x80, %l0 239 add %fp, 0x80, %l1 /* get original sp before save */ 2401: 241 /* Copy stack frame */ 242 ldn [%l1 + STACK_BIAS], %l2 243 inc 8, %l1 244 stn %l2, [%l0 + STACK_BIAS] 245 deccc 8, %l4 246 bg,a 1b 247 inc 8, %l0 2482: 249 call mod_hold_stub /* Hold the module */ 250 mov %l5, %o0 251 cmp %o0, -1 /* if error then return error */ 252 bne,a 1f 253 nop 254 ldn [%l5 + MODS_RETFCN], %i0 255 call %i0 256 nop 257 ret 258 restore %o0, 0, %o0 2591: 260 ldn [%l5], %g1 261 mov %i0, %o0 /* copy over incoming args, if number of */ 262 mov %i1, %o1 /* args is > 6 then we copied them above */ 263 mov %i2, %o2 264 mov %i3, %o3 265 mov %i4, %o4 266 call %g1 /* jump to the stub function */ 267 mov %i5, %o5 268 mov %o0, %i0 /* copy any return values */ 269 mov %o1, %i1 270 call mod_release_stub /* release hold on module */ 271 mov %l5, %o0 272 ret /* return to caller */ 273 restore 274 SET_SIZE(stubs_common_code) 275 276! this is just a marker for the area of text that contains stubs 277 .seg ".text" 278 .global stubs_base 279stubs_base: 280 nop 281 282/* 283 * WARNING WARNING WARNING!!!!!! 284 * 285 * On the MODULE macro you MUST NOT use any spaces!!! They are 286 * significant to the preprocessor. With ansi c there is a way around this 287 * but for some reason (yet to be investigated) ansi didn't work for other 288 * reasons! 289 * 290 * When zero is used as the return function, the system will call 291 * panic if the stub can't be resolved. 292 */ 293 294/* 295 * Stubs for devfs. A non-unloadable module. 296 */ 297#ifndef DEVFS_MODULE 298 MODULE(devfs,fs); 299 NO_UNLOAD_STUB(devfs, devfs_clean, nomod_minus_one); 300 NO_UNLOAD_STUB(devfs, devfs_lookupname, nomod_minus_one); 301 NO_UNLOAD_STUB(devfs, devfs_walk, nomod_minus_one); 302 NO_UNLOAD_STUB(devfs, devfs_devpolicy, nomod_minus_one); 303 NO_UNLOAD_STUB(devfs, devfs_reset_perm, nomod_minus_one); 304 NO_UNLOAD_STUB(devfs, devfs_remdrv_cleanup, nomod_minus_one); 305 END_MODULE(devfs); 306#endif 307 308/* 309 * Stubs for specfs. A non-unloadable module. 310 */ 311 312#ifndef SPEC_MODULE 313 MODULE(specfs,fs); 314 NO_UNLOAD_STUB(specfs, common_specvp, nomod_zero); 315 NO_UNLOAD_STUB(specfs, makectty, nomod_zero); 316 NO_UNLOAD_STUB(specfs, makespecvp, nomod_zero); 317 NO_UNLOAD_STUB(specfs, smark, nomod_zero); 318 NO_UNLOAD_STUB(specfs, spec_segmap, nomod_einval); 319 NO_UNLOAD_STUB(specfs, specfind, nomod_zero); 320 NO_UNLOAD_STUB(specfs, specvp, nomod_zero); 321 NO_UNLOAD_STUB(specfs, devi_stillreferenced, nomod_zero); 322 NO_UNLOAD_STUB(specfs, spec_getvnodeops, nomod_zero); 323 NO_UNLOAD_STUB(specfs, spec_char_map, nomod_zero); 324 NO_UNLOAD_STUB(specfs, specvp_devfs, nomod_zero); 325 NO_UNLOAD_STUB(specfs, spec_assoc_vp_with_devi, nomod_void); 326 NO_UNLOAD_STUB(specfs, spec_hold_devi_by_vp, nomod_zero); 327 NO_UNLOAD_STUB(specfs, spec_snode_walk, nomod_void); 328 NO_UNLOAD_STUB(specfs, spec_devi_open_count, nomod_minus_one); 329 NO_UNLOAD_STUB(specfs, spec_is_clone, nomod_zero); 330 NO_UNLOAD_STUB(specfs, spec_is_selfclone, nomod_zero); 331 END_MODULE(specfs); 332#endif 333 334 335/* 336 * Stubs for sockfs. A non-unloadable module. 337 */ 338#ifndef SOCK_MODULE 339 MODULE(sockfs, fs); 340 SCALL_NU_STUB(sockfs, so_socket, nomod_zero); 341 SCALL_NU_STUB(sockfs, so_socketpair, nomod_zero); 342 SCALL_NU_STUB(sockfs, bind, nomod_zero); 343 SCALL_NU_STUB(sockfs, listen, nomod_zero); 344 SCALL_NU_STUB(sockfs, accept, nomod_zero); 345 SCALL_NU_STUB(sockfs, connect, nomod_zero); 346 SCALL_NU_STUB(sockfs, shutdown, nomod_zero); 347 SCALL_NU_STUB(sockfs, recv, nomod_zero); 348 SCALL_NU_STUB(sockfs, recvfrom, nomod_zero); 349 SCALL_NU_STUB(sockfs, recvmsg, nomod_zero); 350 SCALL_NU_STUB(sockfs, send, nomod_zero); 351 SCALL_NU_STUB(sockfs, sendmsg, nomod_zero); 352 SCALL_NU_STUB(sockfs, sendto, nomod_zero); 353#ifdef _SYSCALL32_IMPL 354 SCALL_NU_STUB(sockfs, recv32, nomod_zero); 355 SCALL_NU_STUB(sockfs, recvfrom32, nomod_zero); 356 SCALL_NU_STUB(sockfs, send32, nomod_zero); 357 SCALL_NU_STUB(sockfs, sendto32, nomod_zero); 358#endif /* _SYSCALL32_IMPL */ 359 SCALL_NU_STUB(sockfs, getpeername, nomod_zero); 360 SCALL_NU_STUB(sockfs, getsockname, nomod_zero); 361 SCALL_NU_STUB(sockfs, getsockopt, nomod_zero); 362 SCALL_NU_STUB(sockfs, setsockopt, nomod_zero); 363 SCALL_NU_STUB(sockfs, sockconfig, nomod_zero); 364 NO_UNLOAD_STUB(sockfs, sock_getmsg, nomod_zero); 365 NO_UNLOAD_STUB(sockfs, sock_putmsg, nomod_zero); 366 NO_UNLOAD_STUB(sockfs, sosendfile64, nomod_zero); 367 NO_UNLOAD_STUB(sockfs, sock_getfasync, nomod_zero); 368 NO_UNLOAD_STUB(sockfs, nl7c_sendfilev, nomod_zero); 369 NO_UNLOAD_STUB(sockfs, sostream_direct, nomod_zero); 370 END_MODULE(sockfs); 371#endif 372 373/* 374 * IPsec stubs. 375 */ 376 377#ifndef IPSECAH_MODULE 378 MODULE(ipsecah,drv); 379 WSTUB(ipsecah, ipsec_construct_inverse_acquire, nomod_zero); 380 WSTUB(ipsecah, sadb_acquire, nomod_zero); 381 WSTUB(ipsecah, sadb_ill_download, nomod_zero); 382 WSTUB(ipsecah, ipsecah_algs_changed, nomod_zero); 383 WSTUB(ipsecah, sadb_alg_update, nomod_zero); 384 WSTUB(ipsecah, sadb_unlinkassoc, nomod_zero); 385 WSTUB(ipsecah, sadb_insertassoc, nomod_zero); 386 WSTUB(ipsecah, ipsecah_in_assocfailure, nomod_zero); 387 WSTUB(ipsecah, sadb_set_lpkt, nomod_zero); 388 WSTUB(ipsecah, ipsecah_icmp_error, nomod_zero); 389 END_MODULE(ipsecah); 390#endif 391 392#ifndef IPSECESP_MODULE 393 MODULE(ipsecesp,drv); 394 WSTUB(ipsecesp, ipsecesp_fill_defs, nomod_zero); 395 WSTUB(ipsecesp, ipsecesp_algs_changed, nomod_zero); 396 WSTUB(ipsecesp, ipsecesp_in_assocfailure, nomod_zero); 397 WSTUB(ipsecesp, ipsecesp_init_funcs, nomod_zero); 398 WSTUB(ipsecesp, ipsecesp_icmp_error, nomod_zero); 399 END_MODULE(ipsecesp); 400#endif 401 402#ifndef KEYSOCK_MODULE 403 MODULE(keysock,drv); 404 WSTUB(keysock, keysock_plumb_ipsec, nomod_zero); 405 WSTUB(keysock, keysock_extended_reg, nomod_zero); 406 WSTUB(keysock, keysock_next_seq, nomod_zero); 407 END_MODULE(keysock); 408#endif 409 410#ifndef SPDSOCK_MODULE 411 MODULE(spdsock,drv); 412 WSTUB(spdsock, spdsock_update_pending_algs, nomod_zero); 413 END_MODULE(spdsock); 414#endif 415 416#ifndef NATTYMOD_MODULE 417 MODULE(nattymod, strmod); 418 WSTUB(nattymod, nattymod_clean_ipif, nomod_zero); 419 END_MODULE(nattymod); 420#endif 421 422/* 423 * Stubs for nfs common code. 424 * XXX nfs_getvnodeops should go away with removal of kludge in vnode.c 425 */ 426#ifndef NFS_MODULE 427 MODULE(nfs,fs); 428 WSTUB(nfs, nfs_getvnodeops, nomod_zero); 429 WSTUB(nfs, nfs_perror, nomod_zero); 430 WSTUB(nfs, nfs_cmn_err, nomod_zero); 431 WSTUB(nfs, clcleanup_zone, nomod_zero); 432 WSTUB(nfs, clcleanup4_zone, nomod_zero); 433 END_MODULE(nfs); 434#endif 435 436/* 437 * Stubs for nfs_dlboot (diskless booting). 438 */ 439#ifndef NFS_DLBOOT_MODULE 440 MODULE(nfs_dlboot,misc); 441 STUB(nfs_dlboot, mount_root, nomod_minus_one); 442 STUB(nfs_dlboot, dhcpinit, nomod_minus_one); 443 END_MODULE(nfs_dlboot); 444#endif 445 446/* 447 * Stubs for nfs server-only code. 448 */ 449#ifndef NFSSRV_MODULE 450 MODULE(nfssrv,misc); 451 STUB(nfssrv, lm_nfs3_fhtovp, nomod_minus_one); 452 STUB(nfssrv, lm_fhtovp, nomod_minus_one); 453 STUB(nfssrv, exportfs, nomod_minus_one); 454 STUB(nfssrv, nfs_getfh, nomod_minus_one); 455 STUB(nfssrv, nfsl_flush, nomod_minus_one); 456 STUB(nfssrv, rfs4_check_delegated, nomod_zero); 457 STUB(nfssrv, mountd_args, nomod_minus_one); 458 NO_UNLOAD_STUB(nfssrv, rdma_start, nomod_zero); 459 NO_UNLOAD_STUB(nfssrv, nfs_svc, nomod_zero); 460 END_MODULE(nfssrv); 461#endif 462 463/* 464 * Stubs for kernel lock manager. 465 */ 466#ifndef KLM_MODULE 467 MODULE(klmmod,misc); 468 NO_UNLOAD_STUB(klmmod, lm_svc, nomod_zero); 469 NO_UNLOAD_STUB(klmmod, lm_shutdown, nomod_zero); 470 NO_UNLOAD_STUB(klmmod, lm_unexport, nomod_zero); 471 NO_UNLOAD_STUB(klmmod, lm_cprresume, nomod_zero); 472 NO_UNLOAD_STUB(klmmod, lm_cprsuspend, nomod_zero); 473 NO_UNLOAD_STUB(klmmod, lm_safelock, nomod_zero); 474 NO_UNLOAD_STUB(klmmod, lm_safemap, nomod_zero); 475 NO_UNLOAD_STUB(klmmod, lm_has_sleep, nomod_zero); 476 NO_UNLOAD_STUB(klmmod, lm_free_config, nomod_zero); 477 NO_UNLOAD_STUB(klmmod, lm_vp_active, nomod_zero); 478 NO_UNLOAD_STUB(klmmod, lm_get_sysid, nomod_zero); 479 NO_UNLOAD_STUB(klmmod, lm_rel_sysid, nomod_zero); 480 NO_UNLOAD_STUB(klmmod, lm_alloc_sysidt, nomod_minus_one); 481 NO_UNLOAD_STUB(klmmod, lm_free_sysidt, nomod_zero); 482 NO_UNLOAD_STUB(klmmod, lm_sysidt, nomod_minus_one); 483 END_MODULE(klmmod); 484#endif 485 486#ifndef KLMOPS_MODULE 487 MODULE(klmops,misc); 488 NO_UNLOAD_STUB(klmops, lm_frlock, nomod_zero); 489 NO_UNLOAD_STUB(klmops, lm4_frlock, nomod_zero); 490 NO_UNLOAD_STUB(klmops, lm_shrlock, nomod_zero); 491 NO_UNLOAD_STUB(klmops, lm4_shrlock, nomod_zero); 492 NO_UNLOAD_STUB(klmops, lm_nlm_dispatch, nomod_zero); 493 NO_UNLOAD_STUB(klmops, lm_nlm4_dispatch, nomod_zero); 494 NO_UNLOAD_STUB(klmops, lm_nlm_reclaim, nomod_zero); 495 NO_UNLOAD_STUB(klmops, lm_nlm4_reclaim, nomod_zero); 496 NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero); 497 END_MODULE(klmops); 498#endif 499 500/* 501 * Stubs for kernel TLI module 502 * XXX currently we never allow this to unload 503 */ 504#ifndef TLI_MODULE 505 MODULE(tlimod,misc); 506 NO_UNLOAD_STUB(tlimod, t_kopen, nomod_minus_one); 507 NO_UNLOAD_STUB(tlimod, t_kunbind, nomod_zero); 508 NO_UNLOAD_STUB(tlimod, t_kadvise, nomod_zero); 509 NO_UNLOAD_STUB(tlimod, t_krcvudata, nomod_zero); 510 NO_UNLOAD_STUB(tlimod, t_ksndudata, nomod_zero); 511 NO_UNLOAD_STUB(tlimod, t_kalloc, nomod_zero); 512 NO_UNLOAD_STUB(tlimod, t_kbind, nomod_zero); 513 NO_UNLOAD_STUB(tlimod, t_kclose, nomod_zero); 514 NO_UNLOAD_STUB(tlimod, t_kspoll, nomod_zero); 515 NO_UNLOAD_STUB(tlimod, t_kfree, nomod_zero); 516 END_MODULE(tlimod); 517#endif 518 519/* 520 * Stubs for kernel RPC module 521 * XXX currently we never allow this to unload 522 */ 523#ifndef RPC_MODULE 524 MODULE(rpcmod,strmod); 525 NO_UNLOAD_STUB(rpcmod, clnt_tli_kcreate, nomod_minus_one); 526 NO_UNLOAD_STUB(rpcmod, svc_tli_kcreate, nomod_minus_one); 527 NO_UNLOAD_STUB(rpcmod, bindresvport, nomod_minus_one); 528 NO_UNLOAD_STUB(rpcmod, rdma_register_mod, nomod_minus_one); 529 NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod, nomod_minus_one); 530 NO_UNLOAD_STUB(rpcmod, svc_queuereq, nomod_minus_one); 531 NO_UNLOAD_STUB(rpcmod, clist_add, nomod_minus_one); 532 END_MODULE(rpcmod); 533#endif 534 535/* 536 * Stubs for des 537 */ 538#ifndef DES_MODULE 539 MODULE(des,misc); 540 STUB(des, cbc_crypt, nomod_zero); 541 STUB(des, ecb_crypt, nomod_zero); 542 STUB(des, _des_crypt, nomod_zero); 543 END_MODULE(des); 544#endif 545 546/* 547 * Stubs for procfs. A non-unloadable module. 548 */ 549#ifndef PROC_MODULE 550 MODULE(procfs,fs); 551 NO_UNLOAD_STUB(procfs, prfree, nomod_zero); 552 NO_UNLOAD_STUB(procfs, prexit, nomod_zero); 553 NO_UNLOAD_STUB(procfs, prlwpfree, nomod_zero); 554 NO_UNLOAD_STUB(procfs, prlwpexit, nomod_zero); 555 NO_UNLOAD_STUB(procfs, prinvalidate, nomod_zero); 556 NO_UNLOAD_STUB(procfs, prnsegs, nomod_zero); 557 NO_UNLOAD_STUB(procfs, prgetcred, nomod_zero); 558 NO_UNLOAD_STUB(procfs, prgetpriv, nomod_zero); 559 NO_UNLOAD_STUB(procfs, prgetprivsize, nomod_zero); 560 NO_UNLOAD_STUB(procfs, prgetstatus, nomod_zero); 561 NO_UNLOAD_STUB(procfs, prgetlwpstatus, nomod_zero); 562 NO_UNLOAD_STUB(procfs, prgetpsinfo, nomod_zero); 563 NO_UNLOAD_STUB(procfs, prgetlwpsinfo, nomod_zero); 564 NO_UNLOAD_STUB(procfs, oprgetstatus, nomod_zero); 565 NO_UNLOAD_STUB(procfs, oprgetpsinfo, nomod_zero); 566#ifdef _SYSCALL32_IMPL 567 NO_UNLOAD_STUB(procfs, prgetstatus32, nomod_zero); 568 NO_UNLOAD_STUB(procfs, prgetlwpstatus32, nomod_zero); 569 NO_UNLOAD_STUB(procfs, prgetpsinfo32, nomod_zero); 570 NO_UNLOAD_STUB(procfs, prgetlwpsinfo32, nomod_zero); 571 NO_UNLOAD_STUB(procfs, oprgetstatus32, nomod_zero); 572 NO_UNLOAD_STUB(procfs, oprgetpsinfo32, nomod_zero); 573#endif /* _SYSCALL32_IMPL */ 574 NO_UNLOAD_STUB(procfs, prnotify, nomod_zero); 575 NO_UNLOAD_STUB(procfs, prexecstart, nomod_zero); 576 NO_UNLOAD_STUB(procfs, prexecend, nomod_zero); 577 NO_UNLOAD_STUB(procfs, prrelvm, nomod_zero); 578 NO_UNLOAD_STUB(procfs, prbarrier, nomod_zero); 579 NO_UNLOAD_STUB(procfs, estimate_msacct, nomod_zero); 580 NO_UNLOAD_STUB(procfs, pr_getprot, nomod_zero); 581 NO_UNLOAD_STUB(procfs, pr_getprot_done, nomod_zero); 582 NO_UNLOAD_STUB(procfs, pr_getsegsize, nomod_zero); 583 NO_UNLOAD_STUB(procfs, pr_isobject, nomod_zero); 584 NO_UNLOAD_STUB(procfs, pr_isself, nomod_zero); 585 NO_UNLOAD_STUB(procfs, pr_allstopped, nomod_zero); 586 NO_UNLOAD_STUB(procfs, pr_free_watched_pages, nomod_zero); 587 END_MODULE(procfs); 588#endif 589 590/* 591 * Stubs for fifofs 592 */ 593#ifndef FIFO_MODULE 594 MODULE(fifofs,fs); 595 STUB(fifofs, fifovp, 0); 596 STUB(fifofs, fifo_getinfo, 0); 597 STUB(fifofs, fifo_vfastoff, 0); 598 END_MODULE(fifofs); 599#endif 600 601/* 602 * Stubs for ufs 603 * 604 * This is needed to support the old quotactl system call. 605 * When the old sysent stuff goes away, this will need to be revisited. 606 */ 607#ifndef UFS_MODULE 608 MODULE(ufs,fs); 609 STUB(ufs, quotactl, nomod_minus_one); 610 STUB(ufs, ufs_remountroot, 0); 611 END_MODULE(ufs); 612#endif 613 614/* 615 * Stubs for namefs 616 */ 617#ifndef NAMEFS_MODULE 618 MODULE(namefs,fs); 619 STUB(namefs, nm_unmountall, 0); 620 END_MODULE(namefs); 621#endif 622 623/* 624 * Stubs for ts_dptbl 625 */ 626#ifndef TS_DPTBL_MODULE 627 MODULE(TS_DPTBL,sched); 628 STUB(TS_DPTBL, ts_getdptbl, 0); 629 STUB(TS_DPTBL, ts_getkmdpris, 0); 630 STUB(TS_DPTBL, ts_getmaxumdpri, 0); 631 END_MODULE(TS_DPTBL); 632#endif 633 634/* 635 * Stubs for rt_dptbl 636 */ 637#ifndef RT_DPTBL_MODULE 638 MODULE(RT_DPTBL,sched); 639 STUB(RT_DPTBL, rt_getdptbl, 0); 640 END_MODULE(RT_DPTBL); 641#endif 642 643/* 644 * Stubs for ia_dptbl 645 */ 646#ifndef IA_DPTBL_MODULE 647 MODULE(IA_DPTBL,sched); 648 STUB(IA_DPTBL, ia_getdptbl, 0); 649 STUB(IA_DPTBL, ia_getkmdpris, 0); 650 STUB(IA_DPTBL, ia_getmaxumdpri, 0); 651 END_MODULE(IA_DPTBL); 652#endif 653 654/* 655 * Stubs for FSS scheduler 656 */ 657#ifndef FSS_MODULE 658 MODULE(FSS,sched); 659 WSTUB(FSS, fss_allocbuf, nomod_zero); 660 WSTUB(FSS, fss_freebuf, nomod_zero); 661 WSTUB(FSS, fss_changeproj, nomod_zero); 662 WSTUB(FSS, fss_changepset, nomod_zero); 663 END_MODULE(FSS); 664#endif 665 666/* 667 * Stubs for fx_dptbl 668 */ 669#ifndef FX_DPTBL_MODULE 670 MODULE(FX_DPTBL,sched); 671 STUB(FX_DPTBL, fx_getdptbl, 0); 672 STUB(FX_DPTBL, fx_getmaxumdpri, 0); 673 END_MODULE(FX_DPTBL); 674#endif 675 676/* 677 * Stubs for kb (only needed for 'win') 678 */ 679#ifndef KB_MODULE 680 MODULE(kb,strmod); 681 STUB(kb, strsetwithdecimal, 0); 682 END_MODULE(kb); 683#endif 684 685/* 686 * Stubs for swapgeneric 687 */ 688#ifndef SWAPGENERIC_MODULE 689 MODULE(swapgeneric,misc); 690 STUB(swapgeneric, rootconf, 0); 691 STUB(swapgeneric, svm_rootconf, 0); 692 STUB(swapgeneric, getfstype, 0); 693 STUB(swapgeneric, getrootdev, 0); 694 STUB(swapgeneric, getfsname, 0); 695 STUB(swapgeneric, loadrootmodules, 0); 696 END_MODULE(swapgeneric); 697#endif 698 699/* 700 * Stubs for bootdev 701 */ 702#ifndef BOOTDEV_MODULE 703 MODULE(bootdev,misc); 704 STUB(bootdev, i_devname_to_promname, 0); 705 STUB(bootdev, i_promname_to_devname, 0); 706 STUB(bootdev, i_convert_boot_device_name, 0); 707 END_MODULE(bootdev); 708#endif 709 710/* 711 * stubs for strplumb... 712 */ 713#ifndef STRPLUMB_MODULE 714 MODULE(strplumb,misc); 715 STUB(strplumb, strplumb, 0); 716 STUB(strplumb, strplumb_load, 0); 717 END_MODULE(strplumb); 718#endif 719 720/* 721 * Stubs for console configuration module 722 */ 723#ifndef CONSCONFIG_MODULE 724 MODULE(consconfig,misc); 725 STUB(consconfig, consconfig, 0); 726 STUB(consconfig, consconfig_get_usb_kb_path, 0); 727 STUB(consconfig, consconfig_get_usb_ms_path, 0); 728 END_MODULE(consconfig); 729#endif 730 731/* 732 * Stubs for zs (uart) module 733 */ 734#ifndef ZS_MODULE 735 MODULE(zs,drv); 736 STUB(zs, zsgetspeed, 0); 737 END_MODULE(zs); 738#endif 739 740/* 741 * Stubs for accounting. 742 */ 743#ifndef SYSACCT_MODULE 744 MODULE(sysacct,sys); 745 WSTUB(sysacct, acct, nomod_zero); 746 WSTUB(sysacct, acct_fs_in_use, nomod_zero); 747 END_MODULE(sysacct); 748#endif 749 750/* 751 * Stubs for semaphore routines. sem.c 752 */ 753#ifndef SEMSYS_MODULE 754 MODULE(semsys,sys); 755 WSTUB(semsys, semexit, nomod_zero); 756 END_MODULE(semsys); 757#endif 758 759/* 760 * Stubs for shmem routines. shm.c 761 */ 762#ifndef SHMSYS_MODULE 763 MODULE(shmsys,sys); 764 WSTUB(shmsys, shmexit, nomod_zero); 765 WSTUB(shmsys, shmfork, nomod_zero); 766 WSTUB(shmsys, shmgetid, nomod_minus_one); 767 END_MODULE(shmsys); 768#endif 769 770/* 771 * Stubs for doors 772 */ 773#ifndef DOORFS_MODULE 774 MODULE(doorfs,sys); 775 WSTUB(doorfs, door_slam, nomod_zero); 776 WSTUB(doorfs, door_exit, nomod_zero); 777 WSTUB(doorfs, door_revoke_all, nomod_zero); 778 WSTUB(doorfs, door_fork, nomod_zero); 779 NO_UNLOAD_STUB(doorfs, door_upcall, nomod_einval); 780 NO_UNLOAD_STUB(doorfs, door_ki_create, nomod_einval); 781 NO_UNLOAD_STUB(doorfs, door_ki_open, nomod_einval); 782 NO_UNLOAD_STUB(doorfs, door_ki_lookup, nomod_zero); 783 WSTUB(doorfs, door_ki_upcall, nomod_einval); 784 WSTUB(doorfs, door_ki_hold, nomod_zero); 785 WSTUB(doorfs, door_ki_rele, nomod_zero); 786 WSTUB(doorfs, door_ki_info, nomod_einval); 787 END_MODULE(doorfs); 788#endif 789 790/* 791 * Stubs for dma routines. dmaga.c 792 * (These are only needed for cross-checks, not autoloading) 793 */ 794#ifndef DMA_MODULE 795 MODULE(dma,drv); 796 WSTUB(dma, dma_alloc, nomod_zero); /* (DMAGA *)0 */ 797 WSTUB(dma, dma_free, nomod_zero); /* (DMAGA *)0 */ 798 END_MODULE(dma); 799#endif 800 801/* 802 * Stubs for auditing. 803 */ 804#ifndef C2AUDIT_MODULE 805 MODULE(c2audit,sys); 806 STUB(c2audit, audit_init, nomod_zero); 807 STUB(c2audit, _auditsys, nomod_zero); 808 NO_UNLOAD_STUB(c2audit, audit_free, nomod_zero); 809 NO_UNLOAD_STUB(c2audit, audit_start, nomod_zero); 810 NO_UNLOAD_STUB(c2audit, audit_finish, nomod_zero); 811 NO_UNLOAD_STUB(c2audit, audit_newproc, nomod_zero); 812 NO_UNLOAD_STUB(c2audit, audit_pfree, nomod_zero); 813 NO_UNLOAD_STUB(c2audit, audit_thread_free, nomod_zero); 814 NO_UNLOAD_STUB(c2audit, audit_thread_create, nomod_zero); 815 NO_UNLOAD_STUB(c2audit, audit_falloc, nomod_zero); 816 NO_UNLOAD_STUB(c2audit, audit_unfalloc, nomod_zero); 817 NO_UNLOAD_STUB(c2audit, audit_closef, nomod_zero); 818 NO_UNLOAD_STUB(c2audit, audit_copen, nomod_zero); 819 NO_UNLOAD_STUB(c2audit, audit_core_start, nomod_zero); 820 NO_UNLOAD_STUB(c2audit, audit_core_finish, nomod_zero); 821 NO_UNLOAD_STUB(c2audit, audit_stropen, nomod_zero); 822 NO_UNLOAD_STUB(c2audit, audit_strclose, nomod_zero); 823 NO_UNLOAD_STUB(c2audit, audit_strioctl, nomod_zero); 824 NO_UNLOAD_STUB(c2audit, audit_strputmsg, nomod_zero); 825 NO_UNLOAD_STUB(c2audit, audit_c2_revoke, nomod_zero); 826 NO_UNLOAD_STUB(c2audit, audit_savepath, nomod_zero); 827 NO_UNLOAD_STUB(c2audit, audit_anchorpath, nomod_zero); 828 NO_UNLOAD_STUB(c2audit, audit_addcomponent, nomod_zero); 829 NO_UNLOAD_STUB(c2audit, audit_exit, nomod_zero); 830 NO_UNLOAD_STUB(c2audit, audit_exec, nomod_zero); 831 NO_UNLOAD_STUB(c2audit, audit_symlink, nomod_zero); 832 NO_UNLOAD_STUB(c2audit, audit_symlink_create, nomod_zero); 833 NO_UNLOAD_STUB(c2audit, audit_vncreate_start, nomod_zero); 834 NO_UNLOAD_STUB(c2audit, audit_vncreate_finish, nomod_zero); 835 NO_UNLOAD_STUB(c2audit, audit_enterprom, nomod_zero); 836 NO_UNLOAD_STUB(c2audit, audit_exitprom, nomod_zero); 837 NO_UNLOAD_STUB(c2audit, audit_chdirec, nomod_zero); 838 NO_UNLOAD_STUB(c2audit, audit_getf, nomod_zero); 839 NO_UNLOAD_STUB(c2audit, audit_setf, nomod_zero); 840 NO_UNLOAD_STUB(c2audit, audit_sock, nomod_zero); 841 NO_UNLOAD_STUB(c2audit, audit_strgetmsg, nomod_zero); 842 NO_UNLOAD_STUB(c2audit, audit_ipc, nomod_zero); 843 NO_UNLOAD_STUB(c2audit, audit_ipcget, nomod_zero); 844 NO_UNLOAD_STUB(c2audit, audit_lookupname, nomod_zero); 845 NO_UNLOAD_STUB(c2audit, audit_pathcomp, nomod_zero); 846 NO_UNLOAD_STUB(c2audit, audit_fdsend, nomod_zero); 847 NO_UNLOAD_STUB(c2audit, audit_fdrecv, nomod_zero); 848 NO_UNLOAD_STUB(c2audit, audit_priv, nomod_zero); 849 NO_UNLOAD_STUB(c2audit, audit_setppriv, nomod_zero); 850 NO_UNLOAD_STUB(c2audit, audit_devpolicy, nomod_zero); 851 NO_UNLOAD_STUB(c2audit, audit_setfsat_path, nomod_zero); 852 NO_UNLOAD_STUB(c2audit, audit_cryptoadm, nomod_zero); 853 NO_UNLOAD_STUB(c2audit, audit_update_context, nomod_zero); 854 NO_UNLOAD_STUB(c2audit, audit_kssl, nomod_zero); 855 END_MODULE(c2audit); 856#endif 857 858/* 859 * Stubs for kernel rpc security service module 860 */ 861#ifndef RPCSEC_MODULE 862 MODULE(rpcsec,misc); 863 NO_UNLOAD_STUB(rpcsec, sec_clnt_revoke, nomod_zero); 864 NO_UNLOAD_STUB(rpcsec, authkern_create, nomod_zero); 865 NO_UNLOAD_STUB(rpcsec, sec_svc_msg, nomod_zero); 866 NO_UNLOAD_STUB(rpcsec, sec_svc_control, nomod_zero); 867 END_MODULE(rpcsec); 868#endif 869 870/* 871 * Stubs for rpc RPCSEC_GSS security service module 872 */ 873#ifndef RPCSEC_GSS_MODULE 874 MODULE(rpcsec_gss,misc); 875 NO_UNLOAD_STUB(rpcsec_gss, __svcrpcsec_gss, nomod_zero); 876 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_getcred, nomod_zero); 877 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_callback, nomod_zero); 878 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secget, nomod_zero); 879 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secfree, nomod_zero); 880 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_seccreate, nomod_zero); 881 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_defaults, nomod_zero); 882 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_revauth, nomod_zero); 883 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secpurge, nomod_zero); 884 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_cleanup, nomod_zero); 885 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_versions, nomod_zero); 886 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_max_data_length, nomod_zero); 887 NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_svc_max_data_length, nomod_zero); 888 END_MODULE(rpcsec_gss); 889#endif 890 891#ifndef SAD_MODULE 892 MODULE(sad,drv); 893 STUB(sad, sadinit, 0); 894 STUB(sad, ap_free, 0); 895 END_MODULE(sad); 896#endif 897 898#ifndef IWSCN_MODULE 899 MODULE(iwscn,drv); 900 STUB(iwscn, srpop, 0); 901 END_MODULE(iwscn); 902#endif 903 904/* 905 * Stubs for checkpoint-resume module 906 */ 907#ifndef CPR_MODULE 908 MODULE(cpr,misc); 909 STUB(cpr, cpr, 0); 910 END_MODULE(cpr); 911#endif 912 913/* 914 * Stubs for VIS module 915 */ 916#ifndef VIS_MODULE 917 MODULE(vis,misc); 918 STUB(vis, vis_fpu_simulator, 0); 919 STUB(vis, vis_fldst, 0); 920 STUB(vis, vis_rdgsr, 0); 921 STUB(vis, vis_wrgsr, 0); 922 END_MODULE(vis); 923#endif 924 925/* 926 * Stubs for kernel probes (tnf module). Not unloadable. 927 */ 928#ifndef TNF_MODULE 929 MODULE(tnf,drv); 930 NO_UNLOAD_STUB(tnf, tnf_ref32_1, nomod_zero); 931 NO_UNLOAD_STUB(tnf, tnf_string_1, nomod_zero); 932 NO_UNLOAD_STUB(tnf, tnf_opaque_array_1, nomod_zero); 933 NO_UNLOAD_STUB(tnf, tnf_opaque32_array_1, nomod_zero); 934 NO_UNLOAD_STUB(tnf, tnf_struct_tag_1, nomod_zero); 935 NO_UNLOAD_STUB(tnf, tnf_allocate, nomod_zero); 936 END_MODULE(tnf); 937#endif 938 939/* 940 * Clustering: stubs for bootstrapping. 941 */ 942#ifndef CL_BOOTSTRAP 943 MODULE(cl_bootstrap,misc); 944 NO_UNLOAD_WSTUB(cl_bootstrap, clboot_modload, nomod_minus_one); 945 NO_UNLOAD_WSTUB(cl_bootstrap, clboot_loadrootmodules, nomod_zero); 946 NO_UNLOAD_WSTUB(cl_bootstrap, clboot_rootconf, nomod_zero); 947 NO_UNLOAD_WSTUB(cl_bootstrap, clboot_mountroot, nomod_zero); 948 NO_UNLOAD_WSTUB(cl_bootstrap, clconf_init, nomod_zero); 949 NO_UNLOAD_WSTUB(cl_bootstrap, clconf_get_nodeid, nomod_zero); 950 NO_UNLOAD_WSTUB(cl_bootstrap, clconf_maximum_nodeid, nomod_zero); 951 NO_UNLOAD_WSTUB(cl_bootstrap, cluster, nomod_zero); 952 END_MODULE(cl_bootstrap); 953#endif 954 955/* 956 * Clustering: stubs for cluster infrastructure. 957 */ 958#ifndef CL_COMM_MODULE 959 MODULE(cl_comm,misc); 960 NO_UNLOAD_STUB(cl_comm, cladmin, nomod_minus_one); 961 END_MODULE(cl_comm); 962#endif 963 964/* 965 * Clustering: stubs for global file system operations. 966 */ 967#ifndef PXFS_MODULE 968 MODULE(pxfs,fs); 969 NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_read, nomod_zero); 970 NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_write, nomod_zero); 971 NO_UNLOAD_WSTUB(pxfs, cl_flk_state_transition_notify, nomod_zero); 972 END_MODULE(pxfs); 973#endif 974 975/* 976 * Stubs for PCI configurator module (misc/pcicfg.e). 977 */ 978#ifndef PCICFG_E_MODULE 979 MODULE(pcicfg.e,misc); 980 STUB(pcicfg.e, pcicfg_configure, 0); 981 STUB(pcicfg.e, pcicfg_unconfigure, 0); 982 END_MODULE(pcicfg.e); 983#endif 984 985/* 986 * Stubs for PCIEHPC (pci-ex hot plug support) module (misc/pciehpc). 987 */ 988#ifndef PCIEHPC_MODULE 989 MODULE(pciehpc,misc); 990 STUB(pciehpc, pciehpc_init, 0); 991 STUB(pciehpc, pciehpc_uninit, 0); 992 WSTUB(pciehpc, pciehpc_intr, 0); 993 END_MODULE(pciehpc); 994#endif 995 996/* 997 * Stubs for PCISHPC (pci/pci-x shpc hot plug support) module (misc/pcishpc). 998 */ 999#ifndef PCISHPC_MODULE 1000 MODULE(pcishpc,misc); 1001 STUB(pcishpc, pcishpc_init, 0); 1002 STUB(pcishpc, pcishpc_uninit, 0); 1003 WSTUB(pcishpc, pcishpc_intr, 0); 1004 END_MODULE(pcishpc); 1005#endif 1006 1007#ifndef PCIHP_MODULE 1008 MODULE(pcihp,misc); 1009 WSTUB(pcihp, pcihp_init, nomod_minus_one); 1010 WSTUB(pcihp, pcihp_uninit, nomod_minus_one); 1011 WSTUB(pcihp, pcihp_info, nomod_minus_one); 1012 WSTUB(pcihp, pcihp_get_cb_ops, nomod_zero); 1013 END_MODULE(pcihp); 1014#endif 1015 1016/* 1017 * Stubs for kernel cryptographic framework module (misc/kcf). 1018 */ 1019#ifndef KCF_MODULE 1020 MODULE(kcf,misc); 1021 NO_UNLOAD_STUB(kcf, crypto_mech2id, nomod_minus_one); 1022 NO_UNLOAD_STUB(kcf, crypto_register_provider, nomod_minus_one); 1023 NO_UNLOAD_STUB(kcf, crypto_unregister_provider, nomod_minus_one); 1024 NO_UNLOAD_STUB(kcf, crypto_provider_notification, nomod_minus_one); 1025 NO_UNLOAD_STUB(kcf, crypto_op_notification, nomod_minus_one); 1026 NO_UNLOAD_STUB(kcf, crypto_kmflag, nomod_minus_one); 1027 NO_UNLOAD_STUB(kcf, crypto_digest, nomod_minus_one); 1028 NO_UNLOAD_STUB(kcf, crypto_digest_prov, nomod_minus_one); 1029 NO_UNLOAD_STUB(kcf, crypto_digest_init, nomod_minus_one); 1030 NO_UNLOAD_STUB(kcf, crypto_digest_init_prov, nomod_minus_one); 1031 NO_UNLOAD_STUB(kcf, crypto_digest_update, nomod_minus_one); 1032 NO_UNLOAD_STUB(kcf, crypto_digest_final, nomod_minus_one); 1033 NO_UNLOAD_STUB(kcf, crypto_digest_key_prov, nomod_minus_one); 1034 NO_UNLOAD_STUB(kcf, crypto_encrypt, nomod_minus_one); 1035 NO_UNLOAD_STUB(kcf, crypto_encrypt_prov, nomod_minus_one); 1036 NO_UNLOAD_STUB(kcf, crypto_encrypt_init, nomod_minus_one); 1037 NO_UNLOAD_STUB(kcf, crypto_encrypt_init_prov, nomod_minus_one); 1038 NO_UNLOAD_STUB(kcf, crypto_encrypt_update, nomod_minus_one); 1039 NO_UNLOAD_STUB(kcf, crypto_encrypt_final, nomod_minus_one); 1040 NO_UNLOAD_STUB(kcf, crypto_decrypt, nomod_minus_one); 1041 NO_UNLOAD_STUB(kcf, crypto_decrypt_prov, nomod_minus_one); 1042 NO_UNLOAD_STUB(kcf, crypto_decrypt_init, nomod_minus_one); 1043 NO_UNLOAD_STUB(kcf, crypto_decrypt_init_prov, nomod_minus_one); 1044 NO_UNLOAD_STUB(kcf, crypto_decrypt_update, nomod_minus_one); 1045 NO_UNLOAD_STUB(kcf, crypto_decrypt_final, nomod_minus_one); 1046 NO_UNLOAD_STUB(kcf, crypto_get_all_mech_info, nomod_minus_one); 1047 NO_UNLOAD_STUB(kcf, crypto_key_check, nomod_minus_one); 1048 NO_UNLOAD_STUB(kcf, crypto_key_check_prov, nomod_minus_one); 1049 NO_UNLOAD_STUB(kcf, crypto_key_derive, nomod_minus_one); 1050 NO_UNLOAD_STUB(kcf, crypto_key_generate, nomod_minus_one); 1051 NO_UNLOAD_STUB(kcf, crypto_key_generate_pair, nomod_minus_one); 1052 NO_UNLOAD_STUB(kcf, crypto_key_unwrap, nomod_minus_one); 1053 NO_UNLOAD_STUB(kcf, crypto_key_wrap, nomod_minus_one); 1054 NO_UNLOAD_STUB(kcf, crypto_mac, nomod_minus_one); 1055 NO_UNLOAD_STUB(kcf, crypto_mac_prov, nomod_minus_one); 1056 NO_UNLOAD_STUB(kcf, crypto_mac_verify, nomod_minus_one); 1057 NO_UNLOAD_STUB(kcf, crypto_mac_verify_prov, nomod_minus_one); 1058 NO_UNLOAD_STUB(kcf, crypto_mac_init, nomod_minus_one); 1059 NO_UNLOAD_STUB(kcf, crypto_mac_init_prov, nomod_minus_one); 1060 NO_UNLOAD_STUB(kcf, crypto_mac_update, nomod_minus_one); 1061 NO_UNLOAD_STUB(kcf, crypto_mac_final, nomod_minus_one); 1062 NO_UNLOAD_STUB(kcf, crypto_mac_decrypt, nomod_minus_one); 1063 NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_prov, nomod_minus_one); 1064 NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt, nomod_minus_one); 1065 NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt_prov, nomod_minus_one); 1066 NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init, nomod_minus_one); 1067 NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init_prov, nomod_minus_one); 1068 NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_update, nomod_minus_one); 1069 NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_final, nomod_minus_one); 1070 NO_UNLOAD_STUB(kcf, crypto_object_copy, nomod_minus_one); 1071 NO_UNLOAD_STUB(kcf, crypto_object_create, nomod_minus_one); 1072 NO_UNLOAD_STUB(kcf, crypto_object_destroy, nomod_minus_one); 1073 NO_UNLOAD_STUB(kcf, crypto_object_find_final, nomod_minus_one); 1074 NO_UNLOAD_STUB(kcf, crypto_object_find_init, nomod_minus_one); 1075 NO_UNLOAD_STUB(kcf, crypto_object_find, nomod_minus_one); 1076 NO_UNLOAD_STUB(kcf, crypto_object_get_attribute_value, nomod_minus_one); 1077 NO_UNLOAD_STUB(kcf, crypto_object_get_size, nomod_minus_one); 1078 NO_UNLOAD_STUB(kcf, crypto_object_set_attribute_value, nomod_minus_one); 1079 NO_UNLOAD_STUB(kcf, crypto_session_close, nomod_minus_one); 1080 NO_UNLOAD_STUB(kcf, crypto_session_login, nomod_minus_one); 1081 NO_UNLOAD_STUB(kcf, crypto_session_logout, nomod_minus_one); 1082 NO_UNLOAD_STUB(kcf, crypto_session_open, nomod_minus_one); 1083 NO_UNLOAD_STUB(kcf, crypto_encrypt_mac, nomod_minus_one); 1084 NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_prov, nomod_minus_one); 1085 NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init, nomod_minus_one); 1086 NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init_prov, nomod_minus_one); 1087 NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_update, nomod_minus_one); 1088 NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_final, nomod_minus_one); 1089 NO_UNLOAD_STUB(kcf, crypto_create_ctx_template, nomod_minus_one); 1090 NO_UNLOAD_STUB(kcf, crypto_destroy_ctx_template, nomod_minus_one); 1091 NO_UNLOAD_STUB(kcf, crypto_get_mech_list, nomod_minus_one); 1092 NO_UNLOAD_STUB(kcf, crypto_free_mech_list, nomod_minus_one); 1093 NO_UNLOAD_STUB(kcf, crypto_cancel_req, nomod_minus_one); 1094 NO_UNLOAD_STUB(kcf, crypto_cancel_ctx, nomod_minus_one); 1095 NO_UNLOAD_STUB(kcf, crypto_bufcall_alloc, nomod_minus_one); 1096 NO_UNLOAD_STUB(kcf, crypto_bufcall_free, nomod_minus_one); 1097 NO_UNLOAD_STUB(kcf, crypto_bufcall, nomod_minus_one); 1098 NO_UNLOAD_STUB(kcf, crypto_unbufcall, nomod_minus_one); 1099 NO_UNLOAD_STUB(kcf, crypto_notify_events, nomod_minus_one); 1100 NO_UNLOAD_STUB(kcf, crypto_unnotify_events, nomod_minus_one); 1101 NO_UNLOAD_STUB(kcf, crypto_get_provider, nomod_minus_one); 1102 NO_UNLOAD_STUB(kcf, crypto_release_provider, nomod_minus_one); 1103 NO_UNLOAD_STUB(kcf, crypto_sign, nomod_minus_one); 1104 NO_UNLOAD_STUB(kcf, crypto_sign_prov, nomod_minus_one); 1105 NO_UNLOAD_STUB(kcf, crypto_sign_init, nomod_minus_one); 1106 NO_UNLOAD_STUB(kcf, crypto_sign_init_prov, nomod_minus_one); 1107 NO_UNLOAD_STUB(kcf, crypto_sign_update, nomod_minus_one); 1108 NO_UNLOAD_STUB(kcf, crypto_sign_final, nomod_minus_one); 1109 NO_UNLOAD_STUB(kcf, crypto_sign_recover, nomod_minus_one); 1110 NO_UNLOAD_STUB(kcf, crypto_sign_recover_prov, nomod_minus_one); 1111 NO_UNLOAD_STUB(kcf, crypto_sign_recover_init_prov, nomod_minus_one); 1112 NO_UNLOAD_STUB(kcf, crypto_verify, nomod_minus_one); 1113 NO_UNLOAD_STUB(kcf, crypto_verify_prov, nomod_minus_one); 1114 NO_UNLOAD_STUB(kcf, crypto_verify_init, nomod_minus_one); 1115 NO_UNLOAD_STUB(kcf, crypto_verify_init_prov, nomod_minus_one); 1116 NO_UNLOAD_STUB(kcf, crypto_verify_update, nomod_minus_one); 1117 NO_UNLOAD_STUB(kcf, crypto_verify_final, nomod_minus_one); 1118 NO_UNLOAD_STUB(kcf, crypto_verify_recover, nomod_minus_one); 1119 NO_UNLOAD_STUB(kcf, crypto_verify_recover_prov, nomod_minus_one); 1120 NO_UNLOAD_STUB(kcf, crypto_verify_recover_init_prov, nomod_minus_one); 1121 NO_UNLOAD_STUB(kcf, random_add_entropy, nomod_minus_one); 1122 NO_UNLOAD_STUB(kcf, random_get_bytes, nomod_minus_one); 1123 NO_UNLOAD_STUB(kcf, random_get_pseudo_bytes, nomod_minus_one); 1124 END_MODULE(kcf); 1125#endif 1126 1127/* 1128 * Stubs for sha1. A non-unloadable module. 1129 */ 1130#ifndef SHA1_MODULE 1131 MODULE(sha1,crypto); 1132 NO_UNLOAD_STUB(sha1, SHA1Init, nomod_void); 1133 NO_UNLOAD_STUB(sha1, SHA1Update, nomod_void); 1134 NO_UNLOAD_STUB(sha1, SHA1Final, nomod_void); 1135 END_MODULE(sha1); 1136#endif 1137 1138/* 1139 * The following stubs are used by the mac module. 1140 * Since dls and dld already depend on mac, these 1141 * stubs are needed to avoid circular dependencies. 1142 */ 1143#ifndef DLS_MODULE 1144 MODULE(dls,misc); 1145 STUB(dls, dls_create, nomod_einval); 1146 STUB(dls, dls_destroy, nomod_einval); 1147 END_MODULE(dls); 1148#endif 1149 1150#ifndef DLD_MODULE 1151 MODULE(dld,drv); 1152 STUB(dld, dld_init_ops, nomod_void); 1153 STUB(dld, dld_fini_ops, nomod_void); 1154 END_MODULE(dld); 1155#endif 1156 1157/* 1158 * Stubs for kssl, the kernel SSL proxy 1159 */ 1160#ifndef KSSL_MODULE 1161 MODULE(kssl,drv); 1162 NO_UNLOAD_STUB(kssl, kssl_check_proxy, nomod_zero); 1163 NO_UNLOAD_STUB(kssl, kssl_handle_record, nomod_zero); 1164 NO_UNLOAD_STUB(kssl, kssl_input, nomod_zero); 1165 NO_UNLOAD_STUB(kssl, kssl_build_record, nomod_zero); 1166 NO_UNLOAD_STUB(kssl, kssl_hold_ent, nomod_void); 1167 NO_UNLOAD_STUB(kssl, kssl_release_ent, nomod_void); 1168 NO_UNLOAD_STUB(kssl, kssl_find_fallback, nomod_zero); 1169 NO_UNLOAD_STUB(kssl, kssl_init_context, nomod_zero); 1170 NO_UNLOAD_STUB(kssl, kssl_hold_ctx, nomod_void); 1171 NO_UNLOAD_STUB(kssl, kssl_release_ctx, nomod_void); 1172 END_MODULE(kssl); 1173#endif 1174 1175! this is just a marker for the area of text that contains stubs 1176 .seg ".text" 1177 .global stubs_end 1178stubs_end: 1179 nop 1180 1181#endif /* lint */ 1182