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);
68161310SnetchildDUMMY(sendfile);		/* different semantics */
6983221SmarcelDUMMY(setfsuid);
7083221SmarcelDUMMY(setfsgid);
7183221SmarcelDUMMY(pivot_root);
7283221SmarcelDUMMY(mincore);
73159799SnetchildDUMMY(lookup_dcookie);
74159799SnetchildDUMMY(remap_file_pages);
75159799SnetchildDUMMY(mbind);
76159799SnetchildDUMMY(get_mempolicy);
77159799SnetchildDUMMY(set_mempolicy);
78159799SnetchildDUMMY(kexec_load);
79232799Snetchild/* linux 2.6.11: */
80159799SnetchildDUMMY(add_key);
81159799SnetchildDUMMY(request_key);
82159799SnetchildDUMMY(keyctl);
83232799Snetchild/* linux 2.6.13: */
84159799SnetchildDUMMY(ioprio_set);
85159799SnetchildDUMMY(ioprio_get);
86159799SnetchildDUMMY(inotify_init);
87159799SnetchildDUMMY(inotify_add_watch);
88159799SnetchildDUMMY(inotify_rm_watch);
89232799Snetchild/* linux 2.6.16: */
90159799SnetchildDUMMY(migrate_pages);
91159799SnetchildDUMMY(unshare);
92232799Snetchild/* linux 2.6.17: */
93178257SjkimDUMMY(splice);
94178257SjkimDUMMY(sync_file_range);
95178257SjkimDUMMY(tee);
96178257SjkimDUMMY(vmsplice);
97232799Snetchild/* linux 2.6.18: */
98232799SnetchildDUMMY(move_pages);
99232799Snetchild/* linux 2.6.19: */
100232799SnetchildDUMMY(getcpu);
101232799Snetchild/* linux 2.6.22: */
102232799SnetchildDUMMY(signalfd);
103232799SnetchildDUMMY(timerfd_create);
104232799Snetchild/* linux 2.6.25: */
105232799SnetchildDUMMY(timerfd_settime);
106232799SnetchildDUMMY(timerfd_gettime);
107232799Snetchild/* linux 2.6.27: */
108232799SnetchildDUMMY(signalfd4);
109232799SnetchildDUMMY(inotify_init1);
110232799Snetchild/* linux 2.6.30: */
111232799SnetchildDUMMY(preadv);
112232799SnetchildDUMMY(pwritev);
113232799Snetchild/* linux 2.6.31 */
114232799SnetchildDUMMY(rt_tsigqueueinfo);
115232799SnetchildDUMMY(perf_event_open);
116232799Snetchild/* linux 2.6.33: */
117232799SnetchildDUMMY(fanotify_init);
118232799SnetchildDUMMY(fanotify_mark);
119232799Snetchild/* later: */
120232799SnetchildDUMMY(name_to_handle_at);
121232799SnetchildDUMMY(open_by_handle_at);
122232799SnetchildDUMMY(clock_adjtime);
123232799SnetchildDUMMY(setns);
124232799SnetchildDUMMY(process_vm_readv);
125232799SnetchildDUMMY(process_vm_writev);
126122802Ssobomax
127122802Ssobomax#define DUMMY_XATTR(s)						\
128122802Ssobomaxint								\
129122802Ssobomaxlinux_ ## s ## xattr(						\
130122802Ssobomax    struct thread *td, struct linux_ ## s ## xattr_args *arg)	\
131122802Ssobomax{								\
132122802Ssobomax								\
133122802Ssobomax	return (ENOATTR);					\
134122802Ssobomax}
135122802SsobomaxDUMMY_XATTR(set);
136122802SsobomaxDUMMY_XATTR(lset);
137122802SsobomaxDUMMY_XATTR(fset);
138122802SsobomaxDUMMY_XATTR(get);
139122802SsobomaxDUMMY_XATTR(lget);
140122802SsobomaxDUMMY_XATTR(fget);
141122802SsobomaxDUMMY_XATTR(list);
142122802SsobomaxDUMMY_XATTR(llist);
143122802SsobomaxDUMMY_XATTR(flist);
144122802SsobomaxDUMMY_XATTR(remove);
145122802SsobomaxDUMMY_XATTR(lremove);
146122802SsobomaxDUMMY_XATTR(fremove);
147