]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/amd64/linux/linux_dummy.c
linux: Fix a mistake in commit fb58045145
[FreeBSD/FreeBSD.git] / sys / amd64 / linux / linux_dummy.c
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2013 Dmitry Chagin
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  */
28
29 #include <sys/cdefs.h>
30 __FBSDID("$FreeBSD$");
31
32 #include <sys/param.h>
33 #include <sys/kernel.h>
34 #include <sys/sdt.h>
35 #include <sys/systm.h>
36 #include <sys/proc.h>
37
38 #include <amd64/linux/linux.h>
39 #include <amd64/linux/linux_proto.h>
40 #include <compat/linux/linux_dtrace.h>
41 #include <compat/linux/linux_util.h>
42
43 /* DTrace init */
44 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
45
46 UNIMPLEMENTED(afs_syscall);
47 UNIMPLEMENTED(create_module);   /* Added in Linux 1.0 removed in 2.6. */
48 UNIMPLEMENTED(epoll_ctl_old);
49 UNIMPLEMENTED(epoll_wait_old);
50 UNIMPLEMENTED(get_kernel_syms); /* Added in Linux 1.0 removed in 2.6. */
51 UNIMPLEMENTED(get_thread_area);
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(tuxcall);
57 UNIMPLEMENTED(security);
58 UNIMPLEMENTED(set_thread_area);
59 UNIMPLEMENTED(uselib);
60 UNIMPLEMENTED(vserver);
61
62 DUMMY(sendfile);
63 DUMMY(setfsuid);
64 DUMMY(setfsgid);
65 DUMMY(sysfs);
66 DUMMY(vhangup);
67 DUMMY(modify_ldt);
68 DUMMY(pivot_root);
69 DUMMY(adjtimex);
70 DUMMY(swapoff);
71 DUMMY(init_module);
72 DUMMY(ioperm);
73 DUMMY(delete_module);
74 DUMMY(quotactl);
75 DUMMY(readahead);
76 DUMMY(io_setup);
77 DUMMY(io_destroy);
78 DUMMY(io_getevents);
79 DUMMY(io_submit);
80 DUMMY(io_cancel);
81 DUMMY(lookup_dcookie);
82 DUMMY(remap_file_pages);
83 DUMMY(restart_syscall);
84 DUMMY(semtimedop);
85 DUMMY(mbind);
86 DUMMY(get_mempolicy);
87 DUMMY(set_mempolicy);
88 DUMMY(mq_open);
89 DUMMY(mq_unlink);
90 DUMMY(mq_timedsend);
91 DUMMY(mq_timedreceive);
92 DUMMY(mq_notify);
93 DUMMY(mq_getsetattr);
94 DUMMY(kexec_load);
95 /* Linux 2.6.11: */
96 DUMMY(add_key);
97 DUMMY(request_key);
98 DUMMY(keyctl);
99 /* Linux 2.6.13: */
100 DUMMY(ioprio_set);
101 DUMMY(ioprio_get);
102 DUMMY(inotify_init);
103 DUMMY(inotify_add_watch);
104 DUMMY(inotify_rm_watch);
105 /* Linux 2.6.16: */
106 DUMMY(migrate_pages);
107 DUMMY(unshare);
108 /* Linux 2.6.17: */
109 DUMMY(tee);
110 DUMMY(vmsplice);
111 /* Linux 2.6.18: */
112 DUMMY(move_pages);
113 /* Linux 2.6.22: */
114 DUMMY(signalfd);
115 /* Linux 2.6.27: */
116 DUMMY(signalfd4);
117 DUMMY(inotify_init1);
118 /* Linux 2.6.31: */
119 DUMMY(perf_event_open);
120 /* Linux 2.6.36: */
121 DUMMY(fanotify_init);
122 DUMMY(fanotify_mark);
123 /* Linux 2.6.39: */
124 DUMMY(name_to_handle_at);
125 DUMMY(open_by_handle_at);
126 DUMMY(clock_adjtime);
127 /* Linux 3.0: */
128 DUMMY(setns);
129 /* Linux 3.2: */
130 DUMMY(process_vm_readv);
131 DUMMY(process_vm_writev);
132 /* Linux 3.5: */
133 DUMMY(kcmp);
134 /* Linux 3.8: */
135 DUMMY(finit_module);
136 DUMMY(sched_setattr);
137 DUMMY(sched_getattr);
138 /* Linux 3.15: */
139 DUMMY(kexec_file_load);
140 /* Linux 3.17: */
141 DUMMY(memfd_create);
142 DUMMY(seccomp);
143 /* Linux 3.18: */
144 DUMMY(bpf);
145 /* Linux 3.19: */
146 DUMMY(execveat);
147 /* Linux 4.2: */
148 DUMMY(userfaultfd);
149 /* Linux 4.3: */
150 DUMMY(membarrier);
151 /* Linux 4.4: */
152 DUMMY(mlock2);
153 /* Linux 4.5: */
154 DUMMY(copy_file_range);
155 /* Linux 4.6: */
156 DUMMY(preadv2);
157 DUMMY(pwritev2);
158 /* Linux 4.8: */
159 DUMMY(pkey_mprotect);
160 DUMMY(pkey_alloc);
161 DUMMY(pkey_free);
162 /* Linux 4.11: */
163 DUMMY(statx);
164 /* Linux 4.18: */
165 DUMMY(io_pgetevents);
166 DUMMY(rseq);
167 /* Linux 5.0: */
168 DUMMY(pidfd_send_signal);
169 DUMMY(io_uring_setup);
170 DUMMY(io_uring_enter);
171 DUMMY(io_uring_register);
172
173 #define DUMMY_XATTR(s)                                          \
174 int                                                             \
175 linux_ ## s ## xattr(                                           \
176     struct thread *td, struct linux_ ## s ## xattr_args *arg)   \
177 {                                                               \
178                                                                 \
179         return (EOPNOTSUPP);                                    \
180 }
181 DUMMY_XATTR(set);
182 DUMMY_XATTR(lset);
183 DUMMY_XATTR(fset);
184 DUMMY_XATTR(get);
185 DUMMY_XATTR(lget);
186 DUMMY_XATTR(fget);
187 DUMMY_XATTR(list);
188 DUMMY_XATTR(llist);
189 DUMMY_XATTR(flist);
190 DUMMY_XATTR(remove);
191 DUMMY_XATTR(lremove);
192 DUMMY_XATTR(fremove);