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 (c) 2017, Joyent, Inc. All rights reserved.
25 */
26
27 #include <sys/asm_linkage.h>
28
29 #if defined(__lint)
30
31 char stubs_base[1], stubs_end[1];
32
33 #else /* __lint */
34
35 #include "assym.h"
36
37 /*
38 * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!!
39 *
40 * For functions which are either STUBs or WSTUBs the actual function
41 * need to be called using 'call' instruction because of preamble and
42 * postamble (i.e mod_hold_stub and mod_release_stub) around the
43 * function call. Due to this we need to copy arguments for the
44 * real function. On Intel we can't tell how many arguments are there
621 NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero);
622 END_MODULE(klmops);
623 #endif
624
625 /*
626 * Stubs for kernel TLI module
627 * XXX currently we never allow this to unload
628 */
629 #ifndef TLI_MODULE
630 MODULE(tlimod,misc);
631 NO_UNLOAD_STUB(tlimod, t_kopen, nomod_minus_one);
632 NO_UNLOAD_STUB(tlimod, t_kunbind, nomod_zero);
633 NO_UNLOAD_STUB(tlimod, t_kadvise, nomod_zero);
634 NO_UNLOAD_STUB(tlimod, t_krcvudata, nomod_zero);
635 NO_UNLOAD_STUB(tlimod, t_ksndudata, nomod_zero);
636 NO_UNLOAD_STUB(tlimod, t_kalloc, nomod_zero);
637 NO_UNLOAD_STUB(tlimod, t_kbind, nomod_zero);
638 NO_UNLOAD_STUB(tlimod, t_kclose, nomod_zero);
639 NO_UNLOAD_STUB(tlimod, t_kspoll, nomod_zero);
640 NO_UNLOAD_STUB(tlimod, t_kfree, nomod_zero);
641 END_MODULE(tlimod);
642 #endif
643
644 /*
645 * Stubs for kernel RPC module
646 * XXX currently we never allow this to unload
647 */
648 #ifndef RPC_MODULE
649 MODULE(rpcmod,strmod);
650 NO_UNLOAD_STUB(rpcmod, clnt_tli_kcreate, nomod_minus_one);
651 NO_UNLOAD_STUB(rpcmod, svc_tli_kcreate, nomod_minus_one);
652 NO_UNLOAD_STUB(rpcmod, bindresvport, nomod_minus_one);
653 NO_UNLOAD_STUB(rpcmod, rdma_register_mod, nomod_minus_one);
654 NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod, nomod_minus_one);
655 NO_UNLOAD_STUB(rpcmod, svc_queuereq, nomod_minus_one);
656 NO_UNLOAD_STUB(rpcmod, clist_add, nomod_minus_one);
657 END_MODULE(rpcmod);
658 #endif
659
660 /*
942 STUB(idmap, kidmap_getpidbysid, nomod_zero);
943 STUB(idmap, kidmap_getsidbygid, nomod_zero);
944 STUB(idmap, kidmap_getsidbyuid, nomod_zero);
945 STUB(idmap, kidmap_getuidbysid, nomod_zero);
946 STUB(idmap, idmap_get_door, nomod_einval);
947 STUB(idmap, idmap_unreg_dh, nomod_einval);
948 STUB(idmap, idmap_reg_dh, nomod_einval);
949 STUB(idmap, idmap_purge_cache, nomod_einval);
950 END_MODULE(idmap);
951 #endif
952
953 /*
954 * Stubs for auditing.
955 */
956 #ifndef C2AUDIT_MODULE
957 MODULE(c2audit,sys);
958 NO_UNLOAD_STUB(c2audit, audit_init_module, nomod_zero);
959 NO_UNLOAD_STUB(c2audit, audit_start, nomod_zero);
960 NO_UNLOAD_STUB(c2audit, audit_finish, nomod_zero);
961 NO_UNLOAD_STUB(c2audit, audit, nomod_zero);
962 NO_UNLOAD_STUB(c2audit, auditdoor, nomod_zero);
963 NO_UNLOAD_STUB(c2audit, audit_closef, nomod_zero);
964 NO_UNLOAD_STUB(c2audit, audit_core_start, nomod_zero);
965 NO_UNLOAD_STUB(c2audit, audit_core_finish, nomod_zero);
966 NO_UNLOAD_STUB(c2audit, audit_strputmsg, nomod_zero);
967 NO_UNLOAD_STUB(c2audit, audit_savepath, nomod_zero);
968 NO_UNLOAD_STUB(c2audit, audit_anchorpath, nomod_zero);
969 NO_UNLOAD_STUB(c2audit, audit_exit, nomod_zero);
970 NO_UNLOAD_STUB(c2audit, audit_exec, nomod_zero);
971 NO_UNLOAD_STUB(c2audit, audit_symlink, nomod_zero);
972 NO_UNLOAD_STUB(c2audit, audit_symlink_create, nomod_zero);
973 NO_UNLOAD_STUB(c2audit, audit_vncreate_start, nomod_zero);
974 NO_UNLOAD_STUB(c2audit, audit_vncreate_finish, nomod_zero);
975 NO_UNLOAD_STUB(c2audit, audit_enterprom, nomod_zero);
976 NO_UNLOAD_STUB(c2audit, audit_exitprom, nomod_zero);
977 NO_UNLOAD_STUB(c2audit, audit_chdirec, nomod_zero);
978 NO_UNLOAD_STUB(c2audit, audit_setf, nomod_zero);
979 NO_UNLOAD_STUB(c2audit, audit_sock, nomod_zero);
980 NO_UNLOAD_STUB(c2audit, audit_strgetmsg, nomod_zero);
981 NO_UNLOAD_STUB(c2audit, audit_ipc, nomod_zero);
982 NO_UNLOAD_STUB(c2audit, audit_ipcget, nomod_zero);
983 NO_UNLOAD_STUB(c2audit, audit_fdsend, nomod_zero);
984 NO_UNLOAD_STUB(c2audit, audit_fdrecv, nomod_zero);
985 NO_UNLOAD_STUB(c2audit, audit_priv, nomod_zero);
|
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 (c) 2017, Joyent, Inc. All rights reserved.
25 * Copyright 2018 Nexenta Systems, Inc. All rights reserved.
26 */
27
28 #include <sys/asm_linkage.h>
29
30 #if defined(__lint)
31
32 char stubs_base[1], stubs_end[1];
33
34 #else /* __lint */
35
36 #include "assym.h"
37
38 /*
39 * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!!
40 *
41 * For functions which are either STUBs or WSTUBs the actual function
42 * need to be called using 'call' instruction because of preamble and
43 * postamble (i.e mod_hold_stub and mod_release_stub) around the
44 * function call. Due to this we need to copy arguments for the
45 * real function. On Intel we can't tell how many arguments are there
622 NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero);
623 END_MODULE(klmops);
624 #endif
625
626 /*
627 * Stubs for kernel TLI module
628 * XXX currently we never allow this to unload
629 */
630 #ifndef TLI_MODULE
631 MODULE(tlimod,misc);
632 NO_UNLOAD_STUB(tlimod, t_kopen, nomod_minus_one);
633 NO_UNLOAD_STUB(tlimod, t_kunbind, nomod_zero);
634 NO_UNLOAD_STUB(tlimod, t_kadvise, nomod_zero);
635 NO_UNLOAD_STUB(tlimod, t_krcvudata, nomod_zero);
636 NO_UNLOAD_STUB(tlimod, t_ksndudata, nomod_zero);
637 NO_UNLOAD_STUB(tlimod, t_kalloc, nomod_zero);
638 NO_UNLOAD_STUB(tlimod, t_kbind, nomod_zero);
639 NO_UNLOAD_STUB(tlimod, t_kclose, nomod_zero);
640 NO_UNLOAD_STUB(tlimod, t_kspoll, nomod_zero);
641 NO_UNLOAD_STUB(tlimod, t_kfree, nomod_zero);
642 NO_UNLOAD_STUB(tlimod, t_koptmgmt, nomod_zero);
643 END_MODULE(tlimod);
644 #endif
645
646 /*
647 * Stubs for kernel RPC module
648 * XXX currently we never allow this to unload
649 */
650 #ifndef RPC_MODULE
651 MODULE(rpcmod,strmod);
652 NO_UNLOAD_STUB(rpcmod, clnt_tli_kcreate, nomod_minus_one);
653 NO_UNLOAD_STUB(rpcmod, svc_tli_kcreate, nomod_minus_one);
654 NO_UNLOAD_STUB(rpcmod, bindresvport, nomod_minus_one);
655 NO_UNLOAD_STUB(rpcmod, rdma_register_mod, nomod_minus_one);
656 NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod, nomod_minus_one);
657 NO_UNLOAD_STUB(rpcmod, svc_queuereq, nomod_minus_one);
658 NO_UNLOAD_STUB(rpcmod, clist_add, nomod_minus_one);
659 END_MODULE(rpcmod);
660 #endif
661
662 /*
944 STUB(idmap, kidmap_getpidbysid, nomod_zero);
945 STUB(idmap, kidmap_getsidbygid, nomod_zero);
946 STUB(idmap, kidmap_getsidbyuid, nomod_zero);
947 STUB(idmap, kidmap_getuidbysid, nomod_zero);
948 STUB(idmap, idmap_get_door, nomod_einval);
949 STUB(idmap, idmap_unreg_dh, nomod_einval);
950 STUB(idmap, idmap_reg_dh, nomod_einval);
951 STUB(idmap, idmap_purge_cache, nomod_einval);
952 END_MODULE(idmap);
953 #endif
954
955 /*
956 * Stubs for auditing.
957 */
958 #ifndef C2AUDIT_MODULE
959 MODULE(c2audit,sys);
960 NO_UNLOAD_STUB(c2audit, audit_init_module, nomod_zero);
961 NO_UNLOAD_STUB(c2audit, audit_start, nomod_zero);
962 NO_UNLOAD_STUB(c2audit, audit_finish, nomod_zero);
963 NO_UNLOAD_STUB(c2audit, audit, nomod_zero);
964 NO_UNLOAD_STUB(c2audit, auditev, nomod_zero);
965 NO_UNLOAD_STUB(c2audit, auditdoor, nomod_zero);
966 NO_UNLOAD_STUB(c2audit, audit_closef, nomod_zero);
967 NO_UNLOAD_STUB(c2audit, audit_core_start, nomod_zero);
968 NO_UNLOAD_STUB(c2audit, audit_core_finish, nomod_zero);
969 NO_UNLOAD_STUB(c2audit, audit_sacl, nomod_zero);
970 NO_UNLOAD_STUB(c2audit, audit_strputmsg, nomod_zero);
971 NO_UNLOAD_STUB(c2audit, audit_savepath, nomod_zero);
972 NO_UNLOAD_STUB(c2audit, audit_anchorpath, nomod_zero);
973 NO_UNLOAD_STUB(c2audit, audit_exit, nomod_zero);
974 NO_UNLOAD_STUB(c2audit, audit_exec, nomod_zero);
975 NO_UNLOAD_STUB(c2audit, audit_symlink, nomod_zero);
976 NO_UNLOAD_STUB(c2audit, audit_symlink_create, nomod_zero);
977 NO_UNLOAD_STUB(c2audit, audit_vncreate_start, nomod_zero);
978 NO_UNLOAD_STUB(c2audit, audit_vncreate_finish, nomod_zero);
979 NO_UNLOAD_STUB(c2audit, audit_enterprom, nomod_zero);
980 NO_UNLOAD_STUB(c2audit, audit_exitprom, nomod_zero);
981 NO_UNLOAD_STUB(c2audit, audit_chdirec, nomod_zero);
982 NO_UNLOAD_STUB(c2audit, audit_setf, nomod_zero);
983 NO_UNLOAD_STUB(c2audit, audit_sock, nomod_zero);
984 NO_UNLOAD_STUB(c2audit, audit_strgetmsg, nomod_zero);
985 NO_UNLOAD_STUB(c2audit, audit_ipc, nomod_zero);
986 NO_UNLOAD_STUB(c2audit, audit_ipcget, nomod_zero);
987 NO_UNLOAD_STUB(c2audit, audit_fdsend, nomod_zero);
988 NO_UNLOAD_STUB(c2audit, audit_fdrecv, nomod_zero);
989 NO_UNLOAD_STUB(c2audit, audit_priv, nomod_zero);
|