1133819Stjr/*-
2230132Suqs * Copyright (c) 1994-1995 S��ren Schmidt
3133819Stjr * All rights reserved.
4133819Stjr *
5133819Stjr * Redistribution and use in source and binary forms, with or without
6133819Stjr * modification, are permitted provided that the following conditions
7133819Stjr * are met:
8133819Stjr * 1. Redistributions of source code must retain the above copyright
9133819Stjr *    notice, this list of conditions and the following disclaimer
10133819Stjr *    in this position and unchanged.
11133819Stjr * 2. Redistributions in binary form must reproduce the above copyright
12133819Stjr *    notice, this list of conditions and the following disclaimer in the
13133819Stjr *    documentation and/or other materials provided with the distribution.
14133819Stjr * 3. The name of the author may not be used to endorse or promote products
15133819Stjr *    derived from this software without specific prior written permission
16133819Stjr *
17133819Stjr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18133819Stjr * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19133819Stjr * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20133819Stjr * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21133819Stjr * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22133819Stjr * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23133819Stjr * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24133819Stjr * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25133819Stjr * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26133819Stjr * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27133819Stjr */
28133819Stjr
29133819Stjr#include <sys/cdefs.h>
30133819Stjr__FBSDID("$FreeBSD$");
31133819Stjr
32235063Snetchild#include "opt_compat.h"
33235063Snetchild#include "opt_kdtrace.h"
34235063Snetchild
35133819Stjr#include <sys/param.h>
36235063Snetchild#include <sys/kernel.h>
37235063Snetchild#include <sys/sdt.h>
38133819Stjr#include <sys/systm.h>
39133819Stjr#include <sys/proc.h>
40133819Stjr
41133819Stjr#include <amd64/linux32/linux.h>
42133819Stjr#include <amd64/linux32/linux32_proto.h>
43235063Snetchild#include <compat/linux/linux_dtrace.h>
44133819Stjr#include <compat/linux/linux_util.h>
45133819Stjr
46235063Snetchild/* DTrace init */
47235063SnetchildLIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
48235063Snetchild
49133819StjrDUMMY(stime);
50133819StjrDUMMY(olduname);
51133819StjrDUMMY(syslog);
52133819StjrDUMMY(uname);
53133819StjrDUMMY(vhangup);
54133819StjrDUMMY(swapoff);
55133819StjrDUMMY(adjtimex);
56133819StjrDUMMY(create_module);
57133819StjrDUMMY(init_module);
58133819StjrDUMMY(delete_module);
59133819StjrDUMMY(get_kernel_syms);
60133819StjrDUMMY(quotactl);
61133819StjrDUMMY(bdflush);
62133819StjrDUMMY(sysfs);
63133819StjrDUMMY(query_module);
64133819StjrDUMMY(nfsservctl);
65133819StjrDUMMY(rt_sigqueueinfo);
66133819StjrDUMMY(sendfile);
67133819StjrDUMMY(setfsuid);
68133819StjrDUMMY(setfsgid);
69133819StjrDUMMY(pivot_root);
70133819StjrDUMMY(mincore);
71133819StjrDUMMY(ptrace);
72159824SnetchildDUMMY(lookup_dcookie);
73255675SrdivackyDUMMY(epoll_create);
74255675SrdivackyDUMMY(epoll_ctl);
75255675SrdivackyDUMMY(epoll_wait);
76159824SnetchildDUMMY(remap_file_pages);
77159824SnetchildDUMMY(fstatfs64);
78159824SnetchildDUMMY(mbind);
79159824SnetchildDUMMY(get_mempolicy);
80159824SnetchildDUMMY(set_mempolicy);
81159824SnetchildDUMMY(mq_open);
82159824SnetchildDUMMY(mq_unlink);
83159824SnetchildDUMMY(mq_timedsend);
84159824SnetchildDUMMY(mq_timedreceive);
85159824SnetchildDUMMY(mq_notify);
86159824SnetchildDUMMY(mq_getsetattr);
87159824SnetchildDUMMY(kexec_load);
88159824SnetchildDUMMY(waitid);
89232799Snetchild/* linux 2.6.11: */
90159824SnetchildDUMMY(add_key);
91159824SnetchildDUMMY(request_key);
92159824SnetchildDUMMY(keyctl);
93232799Snetchild/* linux 2.6.13: */
94159824SnetchildDUMMY(ioprio_set);
95159824SnetchildDUMMY(ioprio_get);
96159824SnetchildDUMMY(inotify_init);
97159824SnetchildDUMMY(inotify_add_watch);
98159824SnetchildDUMMY(inotify_rm_watch);
99232799Snetchild/* linux 2.6.16: */
100159824SnetchildDUMMY(migrate_pages);
101159824SnetchildDUMMY(pselect6);
102159824SnetchildDUMMY(ppoll);
103159824SnetchildDUMMY(unshare);
104232799Snetchild/* linux 2.6.17: */
105178257SjkimDUMMY(splice);
106178257SjkimDUMMY(sync_file_range);
107178257SjkimDUMMY(tee);
108178257SjkimDUMMY(vmsplice);
109232799Snetchild/* linux 2.6.18: */
110232799SnetchildDUMMY(move_pages);
111232799Snetchild/* linux 2.6.19: */
112232799SnetchildDUMMY(getcpu);
113232799SnetchildDUMMY(epoll_pwait);
114232799Snetchild/* linux 2.6.22: */
115232799SnetchildDUMMY(utimensat);
116232799SnetchildDUMMY(signalfd);
117232799SnetchildDUMMY(timerfd_create);
118232799SnetchildDUMMY(eventfd);
119232799Snetchild/* linux 2.6.23: */
120232799SnetchildDUMMY(fallocate);
121232799Snetchild/* linux 2.6.25: */
122232799SnetchildDUMMY(timerfd_settime);
123232799SnetchildDUMMY(timerfd_gettime);
124232799Snetchild/* linux 2.6.27: */
125232799SnetchildDUMMY(signalfd4);
126232799SnetchildDUMMY(eventfd2);
127255675SrdivackyDUMMY(epoll_create1);
128232799SnetchildDUMMY(dup3);
129232799SnetchildDUMMY(inotify_init1);
130232799Snetchild/* linux 2.6.30: */
131232799SnetchildDUMMY(preadv);
132232799SnetchildDUMMY(pwritev);
133232799Snetchild/* linux 2.6.31: */
134232799SnetchildDUMMY(rt_tsigqueueinfo);
135232799SnetchildDUMMY(perf_event_open);
136232799Snetchild/* linux 2.6.33: */
137232799SnetchildDUMMY(recvmmsg);
138232799SnetchildDUMMY(fanotify_init);
139232799SnetchildDUMMY(fanotify_mark);
140232799Snetchild/* linux 2.6.36: */
141232799SnetchildDUMMY(prlimit64);
142232799Snetchild/* later: */
143232799SnetchildDUMMY(name_to_handle_at);
144232799SnetchildDUMMY(open_by_handle_at);
145232799SnetchildDUMMY(clock_adjtime);
146232799SnetchildDUMMY(syncfs);
147232799SnetchildDUMMY(sendmmsg);
148232799SnetchildDUMMY(setns);
149232799SnetchildDUMMY(process_vm_readv);
150232799SnetchildDUMMY(process_vm_writev);
151133819Stjr
152133819Stjr#define DUMMY_XATTR(s)						\
153133819Stjrint								\
154133819Stjrlinux_ ## s ## xattr(						\
155133819Stjr    struct thread *td, struct linux_ ## s ## xattr_args *arg)	\
156133819Stjr{								\
157133819Stjr								\
158133819Stjr	return (ENOATTR);					\
159133819Stjr}
160133819StjrDUMMY_XATTR(set);
161133819StjrDUMMY_XATTR(lset);
162133819StjrDUMMY_XATTR(fset);
163133819StjrDUMMY_XATTR(get);
164133819StjrDUMMY_XATTR(lget);
165133819StjrDUMMY_XATTR(fget);
166133819StjrDUMMY_XATTR(list);
167133819StjrDUMMY_XATTR(llist);
168133819StjrDUMMY_XATTR(flist);
169133819StjrDUMMY_XATTR(remove);
170133819StjrDUMMY_XATTR(lremove);
171133819StjrDUMMY_XATTR(fremove);
172