linux_dummy.c revision 283465
1/*- 2 * Copyright (c) 2013 Dmitry Chagin 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 * 15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> 28__FBSDID("$FreeBSD: head/sys/amd64/linux/linux_dummy.c 283465 2015-05-24 17:33:21Z dchagin $"); 29 30#include "opt_compat.h" 31#include "opt_kdtrace.h" 32 33#include <sys/param.h> 34#include <sys/kernel.h> 35#include <sys/sdt.h> 36#include <sys/systm.h> 37#include <sys/proc.h> 38 39#include <amd64/linux/linux.h> 40#include <amd64/linux/linux_proto.h> 41#include <compat/linux/linux_dtrace.h> 42#include <compat/linux/linux_util.h> 43 44/* DTrace init */ 45LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 46 47DUMMY(mincore); 48DUMMY(sendfile); 49DUMMY(ptrace); 50DUMMY(syslog); 51DUMMY(setfsuid); 52DUMMY(setfsgid); 53DUMMY(sysfs); 54DUMMY(vhangup); 55DUMMY(pivot_root); 56DUMMY(adjtimex); 57DUMMY(swapoff); 58DUMMY(create_module); 59DUMMY(init_module); 60DUMMY(delete_module); 61DUMMY(get_kernel_syms); 62DUMMY(query_module); 63DUMMY(quotactl); 64DUMMY(nfsservctl); 65DUMMY(getpmsg); 66DUMMY(putpmsg); 67DUMMY(afs_syscall); 68DUMMY(tuxcall); 69DUMMY(security); 70DUMMY(set_thread_area); 71DUMMY(lookup_dcookie); 72DUMMY(epoll_ctl_old); 73DUMMY(epoll_wait_old); 74DUMMY(remap_file_pages); 75DUMMY(semtimedop); 76DUMMY(mbind); 77DUMMY(get_mempolicy); 78DUMMY(set_mempolicy); 79DUMMY(mq_open); 80DUMMY(mq_unlink); 81DUMMY(mq_timedsend); 82DUMMY(mq_timedreceive); 83DUMMY(mq_notify); 84DUMMY(mq_getsetattr); 85DUMMY(kexec_load); 86DUMMY(add_key); 87DUMMY(request_key); 88DUMMY(keyctl); 89DUMMY(ioprio_set); 90DUMMY(ioprio_get); 91DUMMY(inotify_init); 92DUMMY(inotify_add_watch); 93DUMMY(inotify_rm_watch); 94DUMMY(migrate_pages); 95DUMMY(unshare); 96DUMMY(splice); 97DUMMY(tee); 98DUMMY(sync_file_range); 99DUMMY(vmsplice); 100DUMMY(move_pages); 101DUMMY(utimensat); 102DUMMY(epoll_pwait); 103DUMMY(signalfd); 104DUMMY(timerfd); 105DUMMY(timerfd_settime); 106DUMMY(timerfd_gettime); 107DUMMY(signalfd4); 108DUMMY(inotify_init1); 109DUMMY(preadv); 110DUMMY(pwritev); 111DUMMY(rt_tsigqueueinfo); 112DUMMY(perf_event_open); 113DUMMY(recvmmsg); 114DUMMY(fanotify_init); 115DUMMY(fanotify_mark); 116DUMMY(name_to_handle_at); 117DUMMY(open_by_handle_at); 118DUMMY(clock_adjtime); 119DUMMY(syncfs); 120DUMMY(sendmmsg); 121DUMMY(setns); 122DUMMY(process_vm_readv); 123DUMMY(process_vm_writev); 124DUMMY(kcmp); 125DUMMY(finit_module); 126 127#define DUMMY_XATTR(s) \ 128int \ 129linux_ ## s ## xattr( \ 130 struct thread *td, struct linux_ ## s ## xattr_args *arg) \ 131{ \ 132 \ 133 return (ENOATTR); \ 134} 135DUMMY_XATTR(set); 136DUMMY_XATTR(lset); 137DUMMY_XATTR(fset); 138DUMMY_XATTR(get); 139DUMMY_XATTR(lget); 140DUMMY_XATTR(fget); 141DUMMY_XATTR(list); 142DUMMY_XATTR(llist); 143DUMMY_XATTR(flist); 144DUMMY_XATTR(remove); 145DUMMY_XATTR(lremove); 146DUMMY_XATTR(fremove); 147