19313Ssos/*- 29313Ssos * 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 32246290Sdchagin#include "opt_compat.h" 33246290Sdchagin#include "opt_kdtrace.h" 34246290Sdchagin 359313Ssos#include <sys/param.h> 36246290Sdchagin#include <sys/kernel.h> 37246290Sdchagin#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> 43246290Sdchagin#include <compat/linux/linux_dtrace.h> 4483221Smarcel#include <compat/linux/linux_util.h> 4512458Sbde 46246290Sdchagin/* DTrace init */ 47246290SdchaginLIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 48246290Sdchagin 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); 75159799SnetchildDUMMY(epoll_create); 76159799SnetchildDUMMY(epoll_ctl); 77159799SnetchildDUMMY(epoll_wait); 78159799SnetchildDUMMY(remap_file_pages); 79159799SnetchildDUMMY(fstatfs64); 80159799SnetchildDUMMY(mbind); 81159799SnetchildDUMMY(get_mempolicy); 82159799SnetchildDUMMY(set_mempolicy); 83159799SnetchildDUMMY(kexec_load); 84159799SnetchildDUMMY(waitid); 85234316Snetchild/* linux 2.6.11: */ 86159799SnetchildDUMMY(add_key); 87159799SnetchildDUMMY(request_key); 88159799SnetchildDUMMY(keyctl); 89234316Snetchild/* linux 2.6.13: */ 90159799SnetchildDUMMY(ioprio_set); 91159799SnetchildDUMMY(ioprio_get); 92159799SnetchildDUMMY(inotify_init); 93159799SnetchildDUMMY(inotify_add_watch); 94159799SnetchildDUMMY(inotify_rm_watch); 95234316Snetchild/* linux 2.6.16: */ 96159799SnetchildDUMMY(migrate_pages); 97159799SnetchildDUMMY(pselect6); 98159799SnetchildDUMMY(ppoll); 99159799SnetchildDUMMY(unshare); 100234316Snetchild/* linux 2.6.17: */ 101178257SjkimDUMMY(splice); 102178257SjkimDUMMY(sync_file_range); 103178257SjkimDUMMY(tee); 104178257SjkimDUMMY(vmsplice); 105234316Snetchild/* linux 2.6.18: */ 106234316SnetchildDUMMY(move_pages); 107234316Snetchild/* linux 2.6.19: */ 108234316SnetchildDUMMY(getcpu); 109234316SnetchildDUMMY(epoll_pwait); 110234316Snetchild/* linux 2.6.22: */ 111234316SnetchildDUMMY(utimensat); 112234316SnetchildDUMMY(signalfd); 113234316SnetchildDUMMY(timerfd_create); 114234316SnetchildDUMMY(eventfd); 115234316Snetchild/* linux 2.6.23: */ 116234316SnetchildDUMMY(fallocate); 117234316Snetchild/* linux 2.6.25: */ 118234316SnetchildDUMMY(timerfd_settime); 119234316SnetchildDUMMY(timerfd_gettime); 120234316Snetchild/* linux 2.6.27: */ 121234316SnetchildDUMMY(signalfd4); 122234316SnetchildDUMMY(eventfd2); 123234316SnetchildDUMMY(epoll_create1); 124234316SnetchildDUMMY(dup3); 125234316SnetchildDUMMY(inotify_init1); 126234316Snetchild/* linux 2.6.30: */ 127234316SnetchildDUMMY(preadv); 128234316SnetchildDUMMY(pwritev); 129234316Snetchild/* linux 2.6.31 */ 130234316SnetchildDUMMY(rt_tsigqueueinfo); 131234316SnetchildDUMMY(perf_event_open); 132234316Snetchild/* linux 2.6.33: */ 133234316SnetchildDUMMY(recvmmsg); 134234316SnetchildDUMMY(fanotify_init); 135234316SnetchildDUMMY(fanotify_mark); 136234316Snetchild/* linux 2.6.36: */ 137234316SnetchildDUMMY(prlimit64); 138234316Snetchild/* later: */ 139234316SnetchildDUMMY(name_to_handle_at); 140234316SnetchildDUMMY(open_by_handle_at); 141234316SnetchildDUMMY(clock_adjtime); 142234316SnetchildDUMMY(syncfs); 143234316SnetchildDUMMY(sendmmsg); 144234316SnetchildDUMMY(setns); 145234316SnetchildDUMMY(process_vm_readv); 146234316SnetchildDUMMY(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