]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/amd64/linux/linux_dummy.c
libfdt: Update to 1.4.6, switch to using libfdt for overlay support
[FreeBSD/FreeBSD.git] / sys / amd64 / linux / linux_dummy.c
1 /*-
2  * Copyright (c) 2013 Dmitry Chagin
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer
10  *    in this position and unchanged.
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 ``AS IS'' AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26
27 #include <sys/cdefs.h>
28 __FBSDID("$FreeBSD$");
29
30 #include "opt_compat.h"
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(security);
57 UNIMPLEMENTED(set_thread_area);
58 UNIMPLEMENTED(tuxcall);
59 UNIMPLEMENTED(uselib);
60 UNIMPLEMENTED(vserver);
61
62 DUMMY(sendfile);
63 DUMMY(syslog);
64 DUMMY(setfsuid);
65 DUMMY(setfsgid);
66 DUMMY(sysfs);
67 DUMMY(vhangup);
68 DUMMY(pivot_root);
69 DUMMY(adjtimex);
70 DUMMY(swapoff);
71 DUMMY(init_module);
72 DUMMY(delete_module);
73 DUMMY(quotactl);
74 DUMMY(lookup_dcookie);
75 DUMMY(remap_file_pages);
76 DUMMY(semtimedop);
77 DUMMY(mbind);
78 DUMMY(get_mempolicy);
79 DUMMY(set_mempolicy);
80 DUMMY(mq_open);
81 DUMMY(mq_unlink);
82 DUMMY(mq_timedsend);
83 DUMMY(mq_timedreceive);
84 DUMMY(mq_notify);
85 DUMMY(mq_getsetattr);
86 DUMMY(kexec_load);
87 /* linux 2.6.11: */
88 DUMMY(add_key);
89 DUMMY(request_key);
90 DUMMY(keyctl);
91 /* linux 2.6.13: */
92 DUMMY(ioprio_set);
93 DUMMY(ioprio_get);
94 DUMMY(inotify_init);
95 DUMMY(inotify_add_watch);
96 DUMMY(inotify_rm_watch);
97 /* linux 2.6.16: */
98 DUMMY(migrate_pages);
99 DUMMY(unshare);
100 /* linux 2.6.17: */
101 DUMMY(splice);
102 DUMMY(tee);
103 DUMMY(sync_file_range);
104 DUMMY(vmsplice);
105 /* linux 2.6.18: */
106 DUMMY(move_pages);
107 /* linux 2.6.22: */
108 DUMMY(signalfd);
109 /* linux 2.6.27: */
110 DUMMY(signalfd4);
111 DUMMY(inotify_init1);
112 /* linux 2.6.31: */
113 DUMMY(perf_event_open);
114 /* linux 2.6.38: */
115 DUMMY(fanotify_init);
116 DUMMY(fanotify_mark);
117 /* linux 2.6.39: */
118 DUMMY(name_to_handle_at);
119 DUMMY(open_by_handle_at);
120 DUMMY(clock_adjtime);
121 /* linux 3.0: */
122 DUMMY(setns);
123 DUMMY(getcpu);
124 /* linux 3.2: */
125 DUMMY(process_vm_readv);
126 DUMMY(process_vm_writev);
127 /* linux 3.5: */
128 DUMMY(kcmp);
129 /* linux 3.8: */
130 DUMMY(finit_module);
131 DUMMY(sched_setattr);
132 DUMMY(sched_getattr);
133 /* linux 3.14: */
134 DUMMY(renameat2);
135 /* linux 3.15: */
136 DUMMY(seccomp);
137 DUMMY(memfd_create);
138 DUMMY(kexec_file_load);
139 /* linux 3.18: */
140 DUMMY(bpf);
141 /* linux 3.19: */
142 DUMMY(execveat);
143 /* linux 4.2: */
144 DUMMY(userfaultfd);
145 /* linux 4.3: */
146 DUMMY(membarrier);
147 /* linux 4.4: */
148 DUMMY(mlock2);
149 /* linux 4.5: */
150 DUMMY(copy_file_range);
151 /* linux 4.6: */
152 DUMMY(preadv2);
153 DUMMY(pwritev2);
154 /* linux 4.8: */
155 DUMMY(pkey_mprotect);
156 DUMMY(pkey_alloc);
157 DUMMY(pkey_free);
158
159 #define DUMMY_XATTR(s)                                          \
160 int                                                             \
161 linux_ ## s ## xattr(                                           \
162     struct thread *td, struct linux_ ## s ## xattr_args *arg)   \
163 {                                                               \
164                                                                 \
165         return (ENOATTR);                                       \
166 }
167 DUMMY_XATTR(set);
168 DUMMY_XATTR(lset);
169 DUMMY_XATTR(fset);
170 DUMMY_XATTR(get);
171 DUMMY_XATTR(lget);
172 DUMMY_XATTR(fget);
173 DUMMY_XATTR(list);
174 DUMMY_XATTR(llist);
175 DUMMY_XATTR(flist);
176 DUMMY_XATTR(remove);
177 DUMMY_XATTR(lremove);
178 DUMMY_XATTR(fremove);