xref: /freebsd/sys/compat/linux/linux_dummy.c (revision bac7bd5038e09d12dfdbf79a87b25443e02d0ba9)
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/param.h>
29 #include <sys/systm.h>
30 #include <sys/sdt.h>
31 #include <sys/proc.h>
32 
33 /*
34  * Including linux vs linux32 here is arbitrary -- the syscall args structures
35  * (proto.h) are not dereferenced by the DUMMY stub implementations, and
36  * suitable for use by both native and compat32 entrypoints.
37  */
38 #include <machine/../linux/linux.h>
39 #include <machine/../linux/linux_proto.h>
40 
41 #include <compat/linux/linux_dtrace.h>
42 #include <compat/linux/linux_util.h>
43 
44 /* DTrace init */
45 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
46 
47 UNIMPLEMENTED(afs_syscall);
48 UNIMPLEMENTED(create_module);	/* Added in Linux 1.0 removed in 2.6. */
49 UNIMPLEMENTED(epoll_ctl_old);
50 UNIMPLEMENTED(epoll_wait_old);
51 UNIMPLEMENTED(get_kernel_syms);	/* Added in Linux 1.0 removed in 2.6. */
52 UNIMPLEMENTED(getpmsg);
53 UNIMPLEMENTED(nfsservctl);	/* Added in Linux 2.2 removed in 3.1. */
54 UNIMPLEMENTED(putpmsg);
55 UNIMPLEMENTED(query_module);	/* Added in Linux 2.2 removed in 2.6. */
56 UNIMPLEMENTED(security);
57 UNIMPLEMENTED(vserver);
58 
59 DUMMY(vhangup);
60 DUMMY(pivot_root);
61 DUMMY(adjtimex);
62 DUMMY(swapoff);
63 DUMMY(init_module);
64 DUMMY(delete_module);
65 DUMMY(lookup_dcookie);
66 DUMMY(remap_file_pages);
67 DUMMY(mbind);
68 DUMMY(get_mempolicy);
69 DUMMY(set_mempolicy);
70 DUMMY(kexec_load);
71 /* Linux 2.6.11: */
72 DUMMY(add_key);
73 DUMMY(request_key);
74 DUMMY(keyctl);
75 /* Linux 2.6.16: */
76 DUMMY(migrate_pages);
77 DUMMY(unshare);
78 /* Linux 2.6.17: */
79 DUMMY(tee);
80 DUMMY(vmsplice);
81 /* Linux 2.6.18: */
82 DUMMY(move_pages);
83 /* Linux 2.6.27: */
84 DUMMY(signalfd4);
85 /* Linux 2.6.31: */
86 DUMMY(perf_event_open);
87 /* Linux 2.6.36: */
88 DUMMY(fanotify_init);
89 DUMMY(fanotify_mark);
90 /* Linux 2.6.39: */
91 DUMMY(clock_adjtime);
92 /* Linux 3.0: */
93 DUMMY(setns);
94 /* Linux 3.2: */
95 DUMMY(process_vm_readv);
96 DUMMY(process_vm_writev);
97 /* Linux 3.8: */
98 DUMMY(finit_module);
99 DUMMY(sched_setattr);
100 DUMMY(sched_getattr);
101 /* Linux 3.18: */
102 DUMMY(bpf);
103 /* Linux 3.19: */
104 DUMMY(execveat);
105 /* Linux 4.2: */
106 DUMMY(userfaultfd);
107 /* Linux 4.4: */
108 DUMMY(mlock2);
109 /* Linux 4.6: */
110 DUMMY(preadv2);
111 DUMMY(pwritev2);
112 /* Linux 4.8: */
113 DUMMY(pkey_mprotect);
114 DUMMY(pkey_alloc);
115 DUMMY(pkey_free);
116 /* Linux 4.18: */
117 DUMMY(io_pgetevents);
118 /* Linux 5.1: */
119 DUMMY(pidfd_send_signal);
120 DUMMY(io_uring_setup);
121 DUMMY(io_uring_enter);
122 DUMMY(io_uring_register);
123 /* Linux 5.2: */
124 DUMMY(open_tree);
125 DUMMY(move_mount);
126 DUMMY(fsopen);
127 DUMMY(fsconfig);
128 DUMMY(fsmount);
129 DUMMY(fspick);
130 /* Linux 5.3: */
131 DUMMY(pidfd_open);
132 /* Linux 5.6: */
133 DUMMY(openat2);
134 DUMMY(pidfd_getfd);
135 /* Linux 5.10: */
136 DUMMY(process_madvise);
137 /* Linux 5.12: */
138 DUMMY(mount_setattr);
139 /* Linux 5.13: */
140 DUMMY(landlock_create_ruleset);
141 DUMMY(landlock_add_rule);
142 DUMMY(landlock_restrict_self);
143 /* Linux 5.14: */
144 DUMMY(memfd_secret);
145 DUMMY(quotactl_fd);
146 /* Linux 5.15: */
147 DUMMY(process_mrelease);
148 /* Linux 5.16: */
149 DUMMY(futex_waitv);
150 DUMMY(set_mempolicy_home_node);
151 /* Linux 6.5: */
152 DUMMY(cachestat);
153 /* Linux 6.6: */
154 DUMMY(fchmodat2);
155