]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/i386/linux/linux_dummy.c
sys/i386: further adoption of SPDX licensing ID tags.
[FreeBSD/FreeBSD.git] / sys / i386 / linux / linux_dummy.c
1 /*-
2  * SPDX-License-Identifier: BSD-3-Clause
3  *
4  * Copyright (c) 1994-1995 Søren Schmidt
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  *    in this position and unchanged.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. The name of the author may not be used to endorse or promote products
17  *    derived from this software without specific prior written permission
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 #include <sys/cdefs.h>
32 __FBSDID("$FreeBSD$");
33
34 #include "opt_compat.h"
35
36 #include <sys/param.h>
37 #include <sys/kernel.h>
38 #include <sys/sdt.h>
39 #include <sys/systm.h>
40 #include <sys/proc.h>
41
42 #include <i386/linux/linux.h>
43 #include <i386/linux/linux_proto.h>
44 #include <compat/linux/linux_dtrace.h>
45 #include <compat/linux/linux_util.h>
46
47 /* DTrace init */
48 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
49
50 UNIMPLEMENTED(afs_syscall);
51 UNIMPLEMENTED(break);
52 UNIMPLEMENTED(create_module);   /* added in linux 1.0 removed in 2.6 */
53 UNIMPLEMENTED(ftime);
54 UNIMPLEMENTED(get_kernel_syms); /* added in linux 1.0 removed in 2.6 */
55 UNIMPLEMENTED(getpmsg);
56 UNIMPLEMENTED(gtty);
57 UNIMPLEMENTED(stty);
58 UNIMPLEMENTED(lock);
59 UNIMPLEMENTED(mpx);
60 UNIMPLEMENTED(nfsservctl);      /* added in linux 2.2 removed in 3.1 */
61 UNIMPLEMENTED(prof);
62 UNIMPLEMENTED(profil);
63 UNIMPLEMENTED(putpmsg);
64 UNIMPLEMENTED(query_module);    /* added in linux 2.2 removed in 2.6 */
65 UNIMPLEMENTED(ulimit);
66 UNIMPLEMENTED(vserver);
67
68 DUMMY(stime);
69 DUMMY(fstat);
70 DUMMY(olduname);
71 DUMMY(syslog);
72 DUMMY(uname);
73 DUMMY(vhangup);
74 DUMMY(vm86old);
75 DUMMY(swapoff);
76 DUMMY(adjtimex);
77 DUMMY(init_module);
78 DUMMY(delete_module);
79 DUMMY(quotactl);
80 DUMMY(bdflush);
81 DUMMY(sysfs);
82 DUMMY(vm86);
83 DUMMY(sendfile);                /* different semantics */
84 DUMMY(setfsuid);
85 DUMMY(setfsgid);
86 DUMMY(pivot_root);
87 DUMMY(lookup_dcookie);
88 DUMMY(remap_file_pages);
89 DUMMY(mbind);
90 DUMMY(get_mempolicy);
91 DUMMY(set_mempolicy);
92 DUMMY(kexec_load);
93 /* linux 2.6.11: */
94 DUMMY(add_key);
95 DUMMY(request_key);
96 DUMMY(keyctl);
97 /* linux 2.6.13: */
98 DUMMY(ioprio_set);
99 DUMMY(ioprio_get);
100 DUMMY(inotify_init);
101 DUMMY(inotify_add_watch);
102 DUMMY(inotify_rm_watch);
103 /* linux 2.6.16: */
104 DUMMY(migrate_pages);
105 DUMMY(unshare);
106 /* linux 2.6.17: */
107 DUMMY(splice);
108 DUMMY(sync_file_range);
109 DUMMY(tee);
110 DUMMY(vmsplice);
111 /* linux 2.6.18: */
112 DUMMY(move_pages);
113 /* linux 2.6.19: */
114 DUMMY(getcpu);
115 /* linux 2.6.22: */
116 DUMMY(signalfd);
117 /* linux 2.6.27: */
118 DUMMY(signalfd4);
119 DUMMY(inotify_init1);
120 /* linux 2.6.31: */
121 DUMMY(perf_event_open);
122 /* linux 2.6.33: */
123 DUMMY(fanotify_init);
124 DUMMY(fanotify_mark);
125 /* linux 2.6.39: */
126 DUMMY(name_to_handle_at);
127 DUMMY(open_by_handle_at);
128 DUMMY(clock_adjtime);
129 /* linux 3.0: */
130 DUMMY(setns);
131 /* linux 3.2: */
132 DUMMY(process_vm_readv);
133 DUMMY(process_vm_writev);
134 /* linux 3.5: */
135 DUMMY(kcmp);
136 /* linux 3.8: */
137 DUMMY(finit_module);
138 DUMMY(sched_setattr);
139 DUMMY(sched_getattr);
140 /* linux 3.14: */
141 DUMMY(renameat2);
142 /* linux 3.15: */
143 DUMMY(seccomp);
144 DUMMY(memfd_create);
145 /* linux 3.18: */
146 DUMMY(bpf);
147 /* linux 3.19: */
148 DUMMY(execveat);
149 /* linux 4.2: */
150 DUMMY(userfaultfd);
151 /* linux 4.3: */
152 DUMMY(membarrier);
153 /* linux 4.4: */
154 DUMMY(mlock2);
155 /* linux 4.5: */
156 DUMMY(copy_file_range);
157 /* linux 4.6: */
158 DUMMY(preadv2);
159 DUMMY(pwritev2);
160 /* linux 4.8: */
161 DUMMY(pkey_mprotect);
162 DUMMY(pkey_alloc);
163 DUMMY(pkey_free);
164
165 #define DUMMY_XATTR(s)                                          \
166 int                                                             \
167 linux_ ## s ## xattr(                                           \
168     struct thread *td, struct linux_ ## s ## xattr_args *arg)   \
169 {                                                               \
170                                                                 \
171         return (ENOATTR);                                       \
172 }
173 DUMMY_XATTR(set);
174 DUMMY_XATTR(lset);
175 DUMMY_XATTR(fset);
176 DUMMY_XATTR(get);
177 DUMMY_XATTR(lget);
178 DUMMY_XATTR(fget);
179 DUMMY_XATTR(list);
180 DUMMY_XATTR(llist);
181 DUMMY_XATTR(flist);
182 DUMMY_XATTR(remove);
183 DUMMY_XATTR(lremove);
184 DUMMY_XATTR(fremove);