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 /*
39 * Including linux vs linux32 here is arbitrary -- the syscall args structures
40 * (proto.h) are not dereferenced by the DUMMY stub implementations, and
41 * suitable for use by both native and compat32 entrypoints.
42 */
43 #include <machine/../linux/linux.h>
44 #include <machine/../linux/linux_proto.h>
45
46 #include <compat/linux/linux_dtrace.h>
47 #include <compat/linux/linux_util.h>
48
49 /* DTrace init */
50 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
51
52 UNIMPLEMENTED(afs_syscall);
53 UNIMPLEMENTED(create_module); /* Added in Linux 1.0 removed in 2.6. */
54 UNIMPLEMENTED(epoll_ctl_old);
55 UNIMPLEMENTED(epoll_wait_old);
56 UNIMPLEMENTED(get_kernel_syms); /* Added in Linux 1.0 removed in 2.6. */
57 UNIMPLEMENTED(getpmsg);
58 UNIMPLEMENTED(nfsservctl); /* Added in Linux 2.2 removed in 3.1. */
59 UNIMPLEMENTED(putpmsg);
60 UNIMPLEMENTED(query_module); /* Added in Linux 2.2 removed in 2.6. */
61 UNIMPLEMENTED(security);
62 UNIMPLEMENTED(vserver);
63
64 DUMMY(setfsuid);
65 DUMMY(setfsgid);
66 DUMMY(vhangup);
67 DUMMY(pivot_root);
68 DUMMY(adjtimex);
69 DUMMY(swapoff);
70 DUMMY(init_module);
71 DUMMY(delete_module);
72 DUMMY(lookup_dcookie);
73 DUMMY(remap_file_pages);
74 DUMMY(mbind);
75 DUMMY(get_mempolicy);
76 DUMMY(set_mempolicy);
77 DUMMY(kexec_load);
78 /* Linux 2.6.11: */
79 DUMMY(add_key);
80 DUMMY(request_key);
81 DUMMY(keyctl);
82 /* Linux 2.6.13: */
83 DUMMY(ioprio_set);
84 DUMMY(ioprio_get);
85 DUMMY(inotify_add_watch);
86 DUMMY(inotify_rm_watch);
87 /* Linux 2.6.16: */
88 DUMMY(migrate_pages);
89 DUMMY(unshare);
90 /* Linux 2.6.17: */
91 DUMMY(tee);
92 DUMMY(vmsplice);
93 /* Linux 2.6.18: */
94 DUMMY(move_pages);
95 /* Linux 2.6.27: */
96 DUMMY(signalfd4);
97 DUMMY(inotify_init1);
98 /* Linux 2.6.31: */
99 DUMMY(perf_event_open);
100 /* Linux 2.6.36: */
101 DUMMY(fanotify_init);
102 DUMMY(fanotify_mark);
103 /* Linux 2.6.39: */
104 DUMMY(clock_adjtime);
105 /* Linux 3.0: */
106 DUMMY(setns);
107 /* Linux 3.2: */
108 DUMMY(process_vm_readv);
109 DUMMY(process_vm_writev);
110 /* Linux 3.5: */
111 DUMMY(kcmp);
112 /* Linux 3.8: */
113 DUMMY(finit_module);
114 DUMMY(sched_setattr);
115 DUMMY(sched_getattr);
116 /* Linux 3.17: */
117 DUMMY(seccomp);
118 /* Linux 3.18: */
119 DUMMY(bpf);
120 /* Linux 3.19: */
121 DUMMY(execveat);
122 /* Linux 4.2: */
123 DUMMY(userfaultfd);
124 /* Linux 4.3: */
125 DUMMY(membarrier);
126 /* Linux 4.4: */
127 DUMMY(mlock2);
128 /* Linux 4.6: */
129 DUMMY(preadv2);
130 DUMMY(pwritev2);
131 /* Linux 4.8: */
132 DUMMY(pkey_mprotect);
133 DUMMY(pkey_alloc);
134 DUMMY(pkey_free);
135
136 #define DUMMY_XATTR(s) \
137 int \
138 linux_ ## s ## xattr( \
139 struct thread *td, struct linux_ ## s ## xattr_args *arg) \
140 { \
141 \
142 return (EOPNOTSUPP); \
143 }
144 DUMMY_XATTR(set);
145 DUMMY_XATTR(lset);
146 DUMMY_XATTR(fset);
147 DUMMY_XATTR(get);
148 DUMMY_XATTR(lget);
149 DUMMY_XATTR(fget);
150 DUMMY_XATTR(list);
151 DUMMY_XATTR(llist);
152 DUMMY_XATTR(flist);
153 DUMMY_XATTR(remove);
154 DUMMY_XATTR(lremove);
155 DUMMY_XATTR(fremove);
Cache object: cd2892376ecdc70475b8d175d0b46e9e
|