xref: /freebsd/sys/compat/linux/linux_dummy.c (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2013 Dmitry Chagin <dchagin@FreeBSD.org>
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  */
27 
28 #include <sys/cdefs.h>
29 #include <sys/param.h>
30 #include <sys/systm.h>
31 #include <sys/sdt.h>
32 #include <sys/proc.h>
33 
34 /*
35  * Including linux vs linux32 here is arbitrary -- the syscall args structures
36  * (proto.h) are not dereferenced by the DUMMY stub implementations, and
37  * suitable for use by both native and compat32 entrypoints.
38  */
39 #include <machine/../linux/linux.h>
40 #include <machine/../linux/linux_proto.h>
41 
42 #include <compat/linux/linux_dtrace.h>
43 #include <compat/linux/linux_util.h>
44 
45 /* DTrace init */
46 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
47 
48 UNIMPLEMENTED(afs_syscall);
49 UNIMPLEMENTED(create_module);	/* Added in Linux 1.0 removed in 2.6. */
50 UNIMPLEMENTED(epoll_ctl_old);
51 UNIMPLEMENTED(epoll_wait_old);
52 UNIMPLEMENTED(get_kernel_syms);	/* Added in Linux 1.0 removed in 2.6. */
53 UNIMPLEMENTED(getpmsg);
54 UNIMPLEMENTED(nfsservctl);	/* Added in Linux 2.2 removed in 3.1. */
55 UNIMPLEMENTED(putpmsg);
56 UNIMPLEMENTED(query_module);	/* Added in Linux 2.2 removed in 2.6. */
57 UNIMPLEMENTED(security);
58 UNIMPLEMENTED(vserver);
59 
60 DUMMY(setfsuid);
61 DUMMY(setfsgid);
62 DUMMY(vhangup);
63 DUMMY(pivot_root);
64 DUMMY(adjtimex);
65 DUMMY(swapoff);
66 DUMMY(init_module);
67 DUMMY(delete_module);
68 DUMMY(lookup_dcookie);
69 DUMMY(remap_file_pages);
70 DUMMY(mbind);
71 DUMMY(get_mempolicy);
72 DUMMY(set_mempolicy);
73 DUMMY(kexec_load);
74 /* Linux 2.6.11: */
75 DUMMY(add_key);
76 DUMMY(request_key);
77 DUMMY(keyctl);
78 /* Linux 2.6.13: */
79 DUMMY(inotify_add_watch);
80 DUMMY(inotify_rm_watch);
81 /* Linux 2.6.16: */
82 DUMMY(migrate_pages);
83 DUMMY(unshare);
84 /* Linux 2.6.17: */
85 DUMMY(tee);
86 DUMMY(vmsplice);
87 /* Linux 2.6.18: */
88 DUMMY(move_pages);
89 /* Linux 2.6.27: */
90 DUMMY(signalfd4);
91 DUMMY(inotify_init1);
92 /* Linux 2.6.31: */
93 DUMMY(perf_event_open);
94 /* Linux 2.6.36: */
95 DUMMY(fanotify_init);
96 DUMMY(fanotify_mark);
97 /* Linux 2.6.39: */
98 DUMMY(clock_adjtime);
99 /* Linux 3.0: */
100 DUMMY(setns);
101 /* Linux 3.2: */
102 DUMMY(process_vm_readv);
103 DUMMY(process_vm_writev);
104 /* Linux 3.5: */
105 DUMMY(kcmp);
106 /* Linux 3.8: */
107 DUMMY(finit_module);
108 DUMMY(sched_setattr);
109 DUMMY(sched_getattr);
110 /* Linux 3.18: */
111 DUMMY(bpf);
112 /* Linux 3.19: */
113 DUMMY(execveat);
114 /* Linux 4.2: */
115 DUMMY(userfaultfd);
116 /* Linux 4.3: */
117 DUMMY(membarrier);
118 /* Linux 4.4: */
119 DUMMY(mlock2);
120 /* Linux 4.6: */
121 DUMMY(preadv2);
122 DUMMY(pwritev2);
123 /* Linux 4.8: */
124 DUMMY(pkey_mprotect);
125 DUMMY(pkey_alloc);
126 DUMMY(pkey_free);
127 DUMMY(open_tree);
128 DUMMY(move_mount);
129 DUMMY(fsopen);
130 DUMMY(fsconfig);
131 DUMMY(fsmount);
132 DUMMY(fspick);
133 DUMMY(pidfd_open);
134 DUMMY(openat2);
135 DUMMY(pidfd_getfd);
136 DUMMY(process_madvise);
137 DUMMY(mount_setattr);
138 /* Linux 4.18: */
139 DUMMY(io_pgetevents);
140 /* Linux 5.0: */
141 DUMMY(pidfd_send_signal);
142 DUMMY(io_uring_setup);
143 DUMMY(io_uring_enter);
144 DUMMY(io_uring_register);
145