19313Ssos/*-
2230132Suqs * Copyright (c) 1994-1995 S��ren Schmidt
39313Ssos * All rights reserved.
49313Ssos *
59313Ssos * Redistribution and use in source and binary forms, with or without
69313Ssos * modification, are permitted provided that the following conditions
79313Ssos * are met:
89313Ssos * 1. Redistributions of source code must retain the above copyright
99313Ssos *    notice, this list of conditions and the following disclaimer
109313Ssos *    in this position and unchanged.
119313Ssos * 2. Redistributions in binary form must reproduce the above copyright
129313Ssos *    notice, this list of conditions and the following disclaimer in the
139313Ssos *    documentation and/or other materials provided with the distribution.
149313Ssos * 3. The name of the author may not be used to endorse or promote products
1597748Sschweikh *    derived from this software without specific prior written permission
169313Ssos *
179313Ssos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
189313Ssos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
199313Ssos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
209313Ssos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
219313Ssos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
229313Ssos * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
239313Ssos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
249313Ssos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
259313Ssos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
269313Ssos * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
279313Ssos */
289313Ssos
29115705Sobrien#include <sys/cdefs.h>
30115705Sobrien__FBSDID("$FreeBSD$");
31115705Sobrien
32235063Snetchild#include "opt_compat.h"
33235063Snetchild#include "opt_kdtrace.h"
34235063Snetchild
359313Ssos#include <sys/param.h>
36235063Snetchild#include <sys/kernel.h>
37235063Snetchild#include <sys/sdt.h>
389313Ssos#include <sys/systm.h>
399313Ssos#include <sys/proc.h>
409313Ssos
4114331Speter#include <i386/linux/linux.h>
4268583Smarcel#include <i386/linux/linux_proto.h>
43235063Snetchild#include <compat/linux/linux_dtrace.h>
4483221Smarcel#include <compat/linux/linux_util.h>
4512458Sbde
46235063Snetchild/* DTrace init */
47235063SnetchildLIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
48235063Snetchild
4949850SmarcelDUMMY(stime);
5049850SmarcelDUMMY(fstat);
5149850SmarcelDUMMY(olduname);
5283221SmarcelDUMMY(syslog);
5349850SmarcelDUMMY(uname);
5449850SmarcelDUMMY(vhangup);
5550345SmarcelDUMMY(vm86old);
5649850SmarcelDUMMY(swapoff);
5749850SmarcelDUMMY(adjtimex);
5849850SmarcelDUMMY(create_module);
5949850SmarcelDUMMY(init_module);
6049850SmarcelDUMMY(delete_module);
6149850SmarcelDUMMY(get_kernel_syms);
6249850SmarcelDUMMY(quotactl);
6349850SmarcelDUMMY(bdflush);
6450345SmarcelDUMMY(sysfs);
6550345SmarcelDUMMY(vm86);
6650345SmarcelDUMMY(query_module);
6750345SmarcelDUMMY(nfsservctl);
6850345SmarcelDUMMY(rt_sigqueueinfo);
69161310SnetchildDUMMY(sendfile);		/* different semantics */
7083221SmarcelDUMMY(setfsuid);
7183221SmarcelDUMMY(setfsgid);
7283221SmarcelDUMMY(pivot_root);
7383221SmarcelDUMMY(mincore);
74159799SnetchildDUMMY(lookup_dcookie);
75255675SrdivackyDUMMY(epoll_create);
76255675SrdivackyDUMMY(epoll_ctl);
77255675SrdivackyDUMMY(epoll_wait);
78159799SnetchildDUMMY(remap_file_pages);
79159799SnetchildDUMMY(fstatfs64);
80159799SnetchildDUMMY(mbind);
81159799SnetchildDUMMY(get_mempolicy);
82159799SnetchildDUMMY(set_mempolicy);
83159799SnetchildDUMMY(kexec_load);
84159799SnetchildDUMMY(waitid);
85232799Snetchild/* linux 2.6.11: */
86159799SnetchildDUMMY(add_key);
87159799SnetchildDUMMY(request_key);
88159799SnetchildDUMMY(keyctl);
89232799Snetchild/* linux 2.6.13: */
90159799SnetchildDUMMY(ioprio_set);
91159799SnetchildDUMMY(ioprio_get);
92159799SnetchildDUMMY(inotify_init);
93159799SnetchildDUMMY(inotify_add_watch);
94159799SnetchildDUMMY(inotify_rm_watch);
95232799Snetchild/* linux 2.6.16: */
96159799SnetchildDUMMY(migrate_pages);
97159799SnetchildDUMMY(pselect6);
98159799SnetchildDUMMY(ppoll);
99159799SnetchildDUMMY(unshare);
100232799Snetchild/* linux 2.6.17: */
101178257SjkimDUMMY(splice);
102178257SjkimDUMMY(sync_file_range);
103178257SjkimDUMMY(tee);
104178257SjkimDUMMY(vmsplice);
105232799Snetchild/* linux 2.6.18: */
106232799SnetchildDUMMY(move_pages);
107232799Snetchild/* linux 2.6.19: */
108232799SnetchildDUMMY(getcpu);
109232799SnetchildDUMMY(epoll_pwait);
110232799Snetchild/* linux 2.6.22: */
111232799SnetchildDUMMY(utimensat);
112232799SnetchildDUMMY(signalfd);
113232799SnetchildDUMMY(timerfd_create);
114232799SnetchildDUMMY(eventfd);
115232799Snetchild/* linux 2.6.23: */
116232799SnetchildDUMMY(fallocate);
117232799Snetchild/* linux 2.6.25: */
118232799SnetchildDUMMY(timerfd_settime);
119232799SnetchildDUMMY(timerfd_gettime);
120232799Snetchild/* linux 2.6.27: */
121232799SnetchildDUMMY(signalfd4);
122232799SnetchildDUMMY(eventfd2);
123255675SrdivackyDUMMY(epoll_create1);
124232799SnetchildDUMMY(dup3);
125232799SnetchildDUMMY(inotify_init1);
126232799Snetchild/* linux 2.6.30: */
127232799SnetchildDUMMY(preadv);
128232799SnetchildDUMMY(pwritev);
129232799Snetchild/* linux 2.6.31 */
130232799SnetchildDUMMY(rt_tsigqueueinfo);
131232799SnetchildDUMMY(perf_event_open);
132232799Snetchild/* linux 2.6.33: */
133232799SnetchildDUMMY(recvmmsg);
134232799SnetchildDUMMY(fanotify_init);
135232799SnetchildDUMMY(fanotify_mark);
136232799Snetchild/* linux 2.6.36: */
137232799SnetchildDUMMY(prlimit64);
138232799Snetchild/* later: */
139232799SnetchildDUMMY(name_to_handle_at);
140232799SnetchildDUMMY(open_by_handle_at);
141232799SnetchildDUMMY(clock_adjtime);
142232799SnetchildDUMMY(syncfs);
143232799SnetchildDUMMY(sendmmsg);
144232799SnetchildDUMMY(setns);
145232799SnetchildDUMMY(process_vm_readv);
146232799SnetchildDUMMY(process_vm_writev);
147122802Ssobomax
148122802Ssobomax#define DUMMY_XATTR(s)						\
149122802Ssobomaxint								\
150122802Ssobomaxlinux_ ## s ## xattr(						\
151122802Ssobomax    struct thread *td, struct linux_ ## s ## xattr_args *arg)	\
152122802Ssobomax{								\
153122802Ssobomax								\
154122802Ssobomax	return (ENOATTR);					\
155122802Ssobomax}
156122802SsobomaxDUMMY_XATTR(set);
157122802SsobomaxDUMMY_XATTR(lset);
158122802SsobomaxDUMMY_XATTR(fset);
159122802SsobomaxDUMMY_XATTR(get);
160122802SsobomaxDUMMY_XATTR(lget);
161122802SsobomaxDUMMY_XATTR(fget);
162122802SsobomaxDUMMY_XATTR(list);
163122802SsobomaxDUMMY_XATTR(llist);
164122802SsobomaxDUMMY_XATTR(flist);
165122802SsobomaxDUMMY_XATTR(remove);
166122802SsobomaxDUMMY_XATTR(lremove);
167122802SsobomaxDUMMY_XATTR(fremove);
168