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