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