1218912Slstewart/*- 2218912Slstewart * Copyright (c) 2013 Dmitry Chagin 3218912Slstewart * All rights reserved. 4218912Slstewart * 5218912Slstewart * Redistribution and use in source and binary forms, with or without 6220560Slstewart * modification, are permitted provided that the following conditions 7220560Slstewart * are met: 8218912Slstewart * 1. Redistributions of source code must retain the above copyright 9218912Slstewart * notice, this list of conditions and the following disclaimer 10218912Slstewart * in this position and unchanged. 11218912Slstewart * 2. Redistributions in binary form must reproduce the above copyright 12218912Slstewart * notice, this list of conditions and the following disclaimer in the 13218912Slstewart * documentation and/or other materials provided with the distribution. 14218912Slstewart * 15218912Slstewart * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16218912Slstewart * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17218912Slstewart * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18218912Slstewart * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19218912Slstewart * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20218912Slstewart * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21218912Slstewart * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22218912Slstewart * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23218912Slstewart * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24218912Slstewart * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25218912Slstewart */ 26218912Slstewart 27218912Slstewart#include <sys/cdefs.h> 28218912Slstewart__FBSDID("$FreeBSD$"); 29218912Slstewart 30218912Slstewart#include "opt_compat.h" 31218912Slstewart#include "opt_kdtrace.h" 32225583Slstewart 33218912Slstewart#include <sys/param.h> 34218912Slstewart#include <sys/kernel.h> 35218912Slstewart#include <sys/sdt.h> 36218912Slstewart#include <sys/systm.h> 37218912Slstewart#include <sys/proc.h> 38218912Slstewart 39218912Slstewart#include <amd64/linux/linux.h> 40218912Slstewart#include <amd64/linux/linux_proto.h> 41218912Slstewart#include <compat/linux/linux_dtrace.h> 42218912Slstewart#include <compat/linux/linux_util.h> 43218912Slstewart 44218912Slstewart/* DTrace init */ 45218912SlstewartLIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 46218912Slstewart 47218912SlstewartDUMMY(mincore); 48218912SlstewartDUMMY(sendfile); 49218912SlstewartDUMMY(ptrace); 50218912SlstewartDUMMY(syslog); 51218912SlstewartDUMMY(setfsuid); 52218912SlstewartDUMMY(setfsgid); 53218912SlstewartDUMMY(sysfs); 54218912SlstewartDUMMY(vhangup); 55218912SlstewartDUMMY(pivot_root); 56218912SlstewartDUMMY(adjtimex); 57218912SlstewartDUMMY(swapoff); 58218912SlstewartDUMMY(create_module); 59218912SlstewartDUMMY(init_module); 60218912SlstewartDUMMY(delete_module); 61220237SlstewartDUMMY(get_kernel_syms); 62218912SlstewartDUMMY(query_module); 63218912SlstewartDUMMY(quotactl); 64218912SlstewartDUMMY(nfsservctl); 65218912SlstewartDUMMY(getpmsg); 66218912SlstewartDUMMY(putpmsg); 67218912SlstewartDUMMY(afs_syscall); 68218912SlstewartDUMMY(tuxcall); 69218912SlstewartDUMMY(security); 70218912SlstewartDUMMY(set_thread_area); 71218912SlstewartDUMMY(lookup_dcookie); 72218912SlstewartDUMMY(epoll_ctl_old); 73218912SlstewartDUMMY(epoll_wait_old); 74218912SlstewartDUMMY(remap_file_pages); 75218912SlstewartDUMMY(semtimedop); 76218912SlstewartDUMMY(mbind); 77218912SlstewartDUMMY(get_mempolicy); 78218912SlstewartDUMMY(set_mempolicy); 79218912SlstewartDUMMY(mq_open); 80218912SlstewartDUMMY(mq_unlink); 81218912SlstewartDUMMY(mq_timedsend); 82218912SlstewartDUMMY(mq_timedreceive); 83218912SlstewartDUMMY(mq_notify); 84218912SlstewartDUMMY(mq_getsetattr); 85218912SlstewartDUMMY(kexec_load); 86218912SlstewartDUMMY(add_key); 87218912SlstewartDUMMY(request_key); 88218912SlstewartDUMMY(keyctl); 89218912SlstewartDUMMY(ioprio_set); 90218912SlstewartDUMMY(ioprio_get); 91218912SlstewartDUMMY(inotify_init); 92218912SlstewartDUMMY(inotify_add_watch); 93218912SlstewartDUMMY(inotify_rm_watch); 94218912SlstewartDUMMY(migrate_pages); 95225583SlstewartDUMMY(unshare); 96218912SlstewartDUMMY(splice); 97225583SlstewartDUMMY(tee); 98225583SlstewartDUMMY(sync_file_range); 99218912SlstewartDUMMY(vmsplice); 100218912SlstewartDUMMY(move_pages); 101218912SlstewartDUMMY(signalfd); 102218912SlstewartDUMMY(timerfd); 103218912SlstewartDUMMY(timerfd_settime); 104218912SlstewartDUMMY(timerfd_gettime); 105218912SlstewartDUMMY(signalfd4); 106218912SlstewartDUMMY(inotify_init1); 107218912SlstewartDUMMY(preadv); 108218912SlstewartDUMMY(pwritev); 109218912SlstewartDUMMY(rt_tsigqueueinfo); 110218912SlstewartDUMMY(perf_event_open); 111218912SlstewartDUMMY(fanotify_init); 112218912SlstewartDUMMY(fanotify_mark); 113218912SlstewartDUMMY(name_to_handle_at); 114218912SlstewartDUMMY(open_by_handle_at); 115218912SlstewartDUMMY(clock_adjtime); 116218912SlstewartDUMMY(setns); 117218912SlstewartDUMMY(process_vm_readv); 118220560SlstewartDUMMY(process_vm_writev); 119220560SlstewartDUMMY(kcmp); 120218912SlstewartDUMMY(finit_module); 121218912Slstewart 122218912Slstewart#define DUMMY_XATTR(s) \ 123218912Slstewartint \ 124218912Slstewartlinux_ ## s ## xattr( \ 125218912Slstewart struct thread *td, struct linux_ ## s ## xattr_args *arg) \ 126218912Slstewart{ \ 127218912Slstewart \ 128218912Slstewart return (ENOATTR); \ 129} 130DUMMY_XATTR(set); 131DUMMY_XATTR(lset); 132DUMMY_XATTR(fset); 133DUMMY_XATTR(get); 134DUMMY_XATTR(lget); 135DUMMY_XATTR(fget); 136DUMMY_XATTR(list); 137DUMMY_XATTR(llist); 138DUMMY_XATTR(flist); 139DUMMY_XATTR(remove); 140DUMMY_XATTR(lremove); 141DUMMY_XATTR(fremove); 142