1 /*- 2 * Copyright (c) 1994-1995 Søren Schmidt 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer 10 * in this position and unchanged. 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * 3. The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 #include <sys/cdefs.h> 30 __FBSDID("$FreeBSD$"); 31 32 #include "opt_compat.h" 33 34 #include <sys/param.h> 35 #include <sys/kernel.h> 36 #include <sys/sdt.h> 37 #include <sys/systm.h> 38 #include <sys/proc.h> 39 40 #include <amd64/linux32/linux.h> 41 #include <amd64/linux32/linux32_proto.h> 42 #include <compat/linux/linux_dtrace.h> 43 #include <compat/linux/linux_util.h> 44 45 /* DTrace init */ 46 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 47 48 DUMMY(stime); 49 DUMMY(olduname); 50 DUMMY(syslog); 51 DUMMY(uname); 52 DUMMY(vhangup); 53 DUMMY(swapoff); 54 DUMMY(adjtimex); 55 DUMMY(create_module); 56 DUMMY(init_module); 57 DUMMY(delete_module); 58 DUMMY(get_kernel_syms); 59 DUMMY(quotactl); 60 DUMMY(bdflush); 61 DUMMY(sysfs); 62 DUMMY(query_module); 63 DUMMY(nfsservctl); 64 DUMMY(sendfile); 65 DUMMY(setfsuid); 66 DUMMY(setfsgid); 67 DUMMY(pivot_root); 68 DUMMY(mincore); 69 DUMMY(ptrace); 70 DUMMY(lookup_dcookie); 71 DUMMY(remap_file_pages); 72 DUMMY(fstatfs64); 73 DUMMY(mbind); 74 DUMMY(get_mempolicy); 75 DUMMY(set_mempolicy); 76 DUMMY(mq_open); 77 DUMMY(mq_unlink); 78 DUMMY(mq_timedsend); 79 DUMMY(mq_timedreceive); 80 DUMMY(mq_notify); 81 DUMMY(mq_getsetattr); 82 DUMMY(kexec_load); 83 /* linux 2.6.11: */ 84 DUMMY(add_key); 85 DUMMY(request_key); 86 DUMMY(keyctl); 87 /* linux 2.6.13: */ 88 DUMMY(ioprio_set); 89 DUMMY(ioprio_get); 90 DUMMY(inotify_init); 91 DUMMY(inotify_add_watch); 92 DUMMY(inotify_rm_watch); 93 /* linux 2.6.16: */ 94 DUMMY(migrate_pages); 95 DUMMY(unshare); 96 /* linux 2.6.17: */ 97 DUMMY(splice); 98 DUMMY(sync_file_range); 99 DUMMY(tee); 100 DUMMY(vmsplice); 101 /* linux 2.6.18: */ 102 DUMMY(move_pages); 103 /* linux 2.6.19: */ 104 DUMMY(getcpu); 105 /* linux 2.6.22: */ 106 DUMMY(signalfd); 107 DUMMY(timerfd_create); 108 /* linux 2.6.25: */ 109 DUMMY(timerfd_settime); 110 DUMMY(timerfd_gettime); 111 /* linux 2.6.27: */ 112 DUMMY(signalfd4); 113 DUMMY(inotify_init1); 114 /* linux 2.6.30: */ 115 DUMMY(preadv); 116 DUMMY(pwritev); 117 /* linux 2.6.31: */ 118 DUMMY(rt_tsigqueueinfo); 119 DUMMY(perf_event_open); 120 /* linux 2.6.33: */ 121 DUMMY(fanotify_init); 122 DUMMY(fanotify_mark); 123 /* later: */ 124 DUMMY(name_to_handle_at); 125 DUMMY(open_by_handle_at); 126 DUMMY(clock_adjtime); 127 DUMMY(setns); 128 DUMMY(process_vm_readv); 129 DUMMY(process_vm_writev); 130 131 #define DUMMY_XATTR(s) \ 132 int \ 133 linux_ ## s ## xattr( \ 134 struct thread *td, struct linux_ ## s ## xattr_args *arg) \ 135 { \ 136 \ 137 return (ENOATTR); \ 138 } 139 DUMMY_XATTR(set); 140 DUMMY_XATTR(lset); 141 DUMMY_XATTR(fset); 142 DUMMY_XATTR(get); 143 DUMMY_XATTR(lget); 144 DUMMY_XATTR(fget); 145 DUMMY_XATTR(list); 146 DUMMY_XATTR(llist); 147 DUMMY_XATTR(flist); 148 DUMMY_XATTR(remove); 149 DUMMY_XATTR(lremove); 150 DUMMY_XATTR(fremove); 151