]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/amd64/linux32/linux32_dummy.c
Add linux_preadv() and linux_pwritev() syscalls to Linuxulator.
[FreeBSD/FreeBSD.git] / sys / amd64 / linux32 / linux32_dummy.c
1 /*-
2  * Copyright (c) 1994-1995 Søren Schmidt
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  * 3. The name of the author may not be used to endorse or promote products
15  *    derived from this software without specific prior written permission
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28
29 #include <sys/cdefs.h>
30 __FBSDID("$FreeBSD$");
31
32 #include "opt_compat.h"
33
34 #include <sys/param.h>
35 #include <sys/kernel.h>
36 #include <sys/sdt.h>
37 #include <sys/systm.h>
38 #include <sys/proc.h>
39
40 #include <amd64/linux32/linux.h>
41 #include <amd64/linux32/linux32_proto.h>
42 #include <compat/linux/linux_dtrace.h>
43 #include <compat/linux/linux_util.h>
44
45 /* DTrace init */
46 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
47
48 DUMMY(stime);
49 DUMMY(olduname);
50 DUMMY(syslog);
51 DUMMY(uname);
52 DUMMY(vhangup);
53 DUMMY(swapoff);
54 DUMMY(adjtimex);
55 DUMMY(create_module);
56 DUMMY(init_module);
57 DUMMY(delete_module);
58 DUMMY(get_kernel_syms);
59 DUMMY(quotactl);
60 DUMMY(bdflush);
61 DUMMY(sysfs);
62 DUMMY(query_module);
63 DUMMY(nfsservctl);
64 DUMMY(sendfile);
65 DUMMY(setfsuid);
66 DUMMY(setfsgid);
67 DUMMY(pivot_root);
68 DUMMY(mincore);
69 DUMMY(ptrace);
70 DUMMY(lookup_dcookie);
71 DUMMY(remap_file_pages);
72 DUMMY(mbind);
73 DUMMY(get_mempolicy);
74 DUMMY(set_mempolicy);
75 DUMMY(mq_open);
76 DUMMY(mq_unlink);
77 DUMMY(mq_timedsend);
78 DUMMY(mq_timedreceive);
79 DUMMY(mq_notify);
80 DUMMY(mq_getsetattr);
81 DUMMY(kexec_load);
82 /* linux 2.6.11: */
83 DUMMY(add_key);
84 DUMMY(request_key);
85 DUMMY(keyctl);
86 /* linux 2.6.13: */
87 DUMMY(ioprio_set);
88 DUMMY(ioprio_get);
89 DUMMY(inotify_init);
90 DUMMY(inotify_add_watch);
91 DUMMY(inotify_rm_watch);
92 /* linux 2.6.16: */
93 DUMMY(migrate_pages);
94 DUMMY(unshare);
95 /* linux 2.6.17: */
96 DUMMY(splice);
97 DUMMY(sync_file_range);
98 DUMMY(tee);
99 DUMMY(vmsplice);
100 /* linux 2.6.18: */
101 DUMMY(move_pages);
102 /* linux 2.6.19: */
103 DUMMY(getcpu);
104 /* linux 2.6.22: */
105 DUMMY(signalfd);
106 DUMMY(timerfd_create);
107 /* linux 2.6.25: */
108 DUMMY(timerfd_settime);
109 DUMMY(timerfd_gettime);
110 /* linux 2.6.27: */
111 DUMMY(signalfd4);
112 DUMMY(inotify_init1);
113 /* linux 2.6.31: */
114 DUMMY(perf_event_open);
115 /* linux 2.6.33: */
116 DUMMY(fanotify_init);
117 DUMMY(fanotify_mark);
118 /* linux 2.6.39: */
119 DUMMY(name_to_handle_at);
120 DUMMY(open_by_handle_at);
121 DUMMY(clock_adjtime);
122 /* linux 3.0: */
123 DUMMY(setns);
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(getrandom);
138 DUMMY(memfd_create);
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);