1133819Stjr/*- 2133819Stjr * 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 32246290Sdchagin#include "opt_compat.h" 33246290Sdchagin#include "opt_kdtrace.h" 34246290Sdchagin 35133819Stjr#include <sys/param.h> 36246290Sdchagin#include <sys/kernel.h> 37246290Sdchagin#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> 43246290Sdchagin#include <compat/linux/linux_dtrace.h> 44133819Stjr#include <compat/linux/linux_util.h> 45133819Stjr 46246290Sdchagin/* DTrace init */ 47246290SdchaginLIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 48246290Sdchagin 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); 73159824SnetchildDUMMY(epoll_create); 74159824SnetchildDUMMY(epoll_ctl); 75159824SnetchildDUMMY(epoll_wait); 76159824SnetchildDUMMY(remap_file_pages); 77159824SnetchildDUMMY(timer_create); 78159824SnetchildDUMMY(timer_settime); 79159824SnetchildDUMMY(timer_gettime); 80159824SnetchildDUMMY(timer_getoverrun); 81159824SnetchildDUMMY(timer_delete); 82159824SnetchildDUMMY(fstatfs64); 83159824SnetchildDUMMY(mbind); 84159824SnetchildDUMMY(get_mempolicy); 85159824SnetchildDUMMY(set_mempolicy); 86159824SnetchildDUMMY(mq_open); 87159824SnetchildDUMMY(mq_unlink); 88159824SnetchildDUMMY(mq_timedsend); 89159824SnetchildDUMMY(mq_timedreceive); 90159824SnetchildDUMMY(mq_notify); 91159824SnetchildDUMMY(mq_getsetattr); 92159824SnetchildDUMMY(kexec_load); 93159824SnetchildDUMMY(waitid); 94234316Snetchild/* linux 2.6.11: */ 95159824SnetchildDUMMY(add_key); 96159824SnetchildDUMMY(request_key); 97159824SnetchildDUMMY(keyctl); 98234316Snetchild/* linux 2.6.13: */ 99159824SnetchildDUMMY(ioprio_set); 100159824SnetchildDUMMY(ioprio_get); 101159824SnetchildDUMMY(inotify_init); 102159824SnetchildDUMMY(inotify_add_watch); 103159824SnetchildDUMMY(inotify_rm_watch); 104234316Snetchild/* linux 2.6.16: */ 105159824SnetchildDUMMY(migrate_pages); 106159824SnetchildDUMMY(pselect6); 107159824SnetchildDUMMY(ppoll); 108159824SnetchildDUMMY(unshare); 109234316Snetchild/* linux 2.6.17: */ 110178257SjkimDUMMY(splice); 111178257SjkimDUMMY(sync_file_range); 112178257SjkimDUMMY(tee); 113178257SjkimDUMMY(vmsplice); 114234316Snetchild/* linux 2.6.18: */ 115234316SnetchildDUMMY(move_pages); 116234316Snetchild/* linux 2.6.19: */ 117234316SnetchildDUMMY(getcpu); 118234316SnetchildDUMMY(epoll_pwait); 119234316Snetchild/* linux 2.6.22: */ 120234316SnetchildDUMMY(utimensat); 121234316SnetchildDUMMY(signalfd); 122234316SnetchildDUMMY(timerfd_create); 123234316SnetchildDUMMY(eventfd); 124234316Snetchild/* linux 2.6.23: */ 125234316SnetchildDUMMY(fallocate); 126234316Snetchild/* linux 2.6.25: */ 127234316SnetchildDUMMY(timerfd_settime); 128234316SnetchildDUMMY(timerfd_gettime); 129234316Snetchild/* linux 2.6.27: */ 130234316SnetchildDUMMY(signalfd4); 131234316SnetchildDUMMY(eventfd2); 132234316SnetchildDUMMY(epoll_create1); 133234316SnetchildDUMMY(dup3); 134234316SnetchildDUMMY(inotify_init1); 135234316Snetchild/* linux 2.6.30: */ 136234316SnetchildDUMMY(preadv); 137234316SnetchildDUMMY(pwritev); 138234316Snetchild/* linux 2.6.31: */ 139234316SnetchildDUMMY(rt_tsigqueueinfo); 140234316SnetchildDUMMY(perf_event_open); 141234316Snetchild/* linux 2.6.33: */ 142234316SnetchildDUMMY(recvmmsg); 143234316SnetchildDUMMY(fanotify_init); 144234316SnetchildDUMMY(fanotify_mark); 145234316Snetchild/* linux 2.6.36: */ 146234316SnetchildDUMMY(prlimit64); 147234316Snetchild/* later: */ 148234316SnetchildDUMMY(name_to_handle_at); 149234316SnetchildDUMMY(open_by_handle_at); 150234316SnetchildDUMMY(clock_adjtime); 151234316SnetchildDUMMY(syncfs); 152234316SnetchildDUMMY(sendmmsg); 153234316SnetchildDUMMY(setns); 154234316SnetchildDUMMY(process_vm_readv); 155234316SnetchildDUMMY(process_vm_writev); 156133819Stjr 157133819Stjr#define DUMMY_XATTR(s) \ 158133819Stjrint \ 159133819Stjrlinux_ ## s ## xattr( \ 160133819Stjr struct thread *td, struct linux_ ## s ## xattr_args *arg) \ 161133819Stjr{ \ 162133819Stjr \ 163133819Stjr return (ENOATTR); \ 164133819Stjr} 165133819StjrDUMMY_XATTR(set); 166133819StjrDUMMY_XATTR(lset); 167133819StjrDUMMY_XATTR(fset); 168133819StjrDUMMY_XATTR(get); 169133819StjrDUMMY_XATTR(lget); 170133819StjrDUMMY_XATTR(fget); 171133819StjrDUMMY_XATTR(list); 172133819StjrDUMMY_XATTR(llist); 173133819StjrDUMMY_XATTR(flist); 174133819StjrDUMMY_XATTR(remove); 175133819StjrDUMMY_XATTR(lremove); 176133819StjrDUMMY_XATTR(fremove); 177