1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2013 Dmitry Chagin <dchagin@FreeBSD.org> 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 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 AND CONTRIBUTORS ``AS IS'' AND 16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28 #include <sys/cdefs.h> 29 __FBSDID("$FreeBSD$"); 30 31 #include <sys/param.h> 32 #include <sys/systm.h> 33 #include <sys/sdt.h> 34 #include <sys/proc.h> 35 36 /* 37 * Including linux vs linux32 here is arbitrary -- the syscall args structures 38 * (proto.h) are not dereferenced by the DUMMY stub implementations, and 39 * suitable for use by both native and compat32 entrypoints. 40 */ 41 #include <machine/../linux/linux.h> 42 #include <machine/../linux/linux_proto.h> 43 44 #include <compat/linux/linux_dtrace.h> 45 #include <compat/linux/linux_util.h> 46 47 /* DTrace init */ 48 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 49 50 UNIMPLEMENTED(afs_syscall); 51 UNIMPLEMENTED(create_module); /* Added in Linux 1.0 removed in 2.6. */ 52 UNIMPLEMENTED(epoll_ctl_old); 53 UNIMPLEMENTED(epoll_wait_old); 54 UNIMPLEMENTED(get_kernel_syms); /* Added in Linux 1.0 removed in 2.6. */ 55 UNIMPLEMENTED(getpmsg); 56 UNIMPLEMENTED(nfsservctl); /* Added in Linux 2.2 removed in 3.1. */ 57 UNIMPLEMENTED(putpmsg); 58 UNIMPLEMENTED(query_module); /* Added in Linux 2.2 removed in 2.6. */ 59 UNIMPLEMENTED(security); 60 UNIMPLEMENTED(vserver); 61 62 DUMMY(setfsuid); 63 DUMMY(setfsgid); 64 DUMMY(vhangup); 65 DUMMY(pivot_root); 66 DUMMY(adjtimex); 67 DUMMY(swapoff); 68 DUMMY(init_module); 69 DUMMY(delete_module); 70 DUMMY(lookup_dcookie); 71 DUMMY(remap_file_pages); 72 DUMMY(mbind); 73 DUMMY(get_mempolicy); 74 DUMMY(set_mempolicy); 75 DUMMY(kexec_load); 76 /* Linux 2.6.11: */ 77 DUMMY(add_key); 78 DUMMY(request_key); 79 DUMMY(keyctl); 80 /* Linux 2.6.13: */ 81 DUMMY(inotify_add_watch); 82 DUMMY(inotify_rm_watch); 83 /* Linux 2.6.16: */ 84 DUMMY(migrate_pages); 85 DUMMY(unshare); 86 /* Linux 2.6.17: */ 87 DUMMY(tee); 88 DUMMY(vmsplice); 89 /* Linux 2.6.18: */ 90 DUMMY(move_pages); 91 /* Linux 2.6.27: */ 92 DUMMY(signalfd4); 93 DUMMY(inotify_init1); 94 /* Linux 2.6.31: */ 95 DUMMY(perf_event_open); 96 /* Linux 2.6.36: */ 97 DUMMY(fanotify_init); 98 DUMMY(fanotify_mark); 99 /* Linux 2.6.39: */ 100 DUMMY(clock_adjtime); 101 /* Linux 3.0: */ 102 DUMMY(setns); 103 /* Linux 3.2: */ 104 DUMMY(process_vm_readv); 105 DUMMY(process_vm_writev); 106 /* Linux 3.5: */ 107 DUMMY(kcmp); 108 /* Linux 3.8: */ 109 DUMMY(finit_module); 110 DUMMY(sched_setattr); 111 DUMMY(sched_getattr); 112 /* Linux 3.18: */ 113 DUMMY(bpf); 114 /* Linux 3.19: */ 115 DUMMY(execveat); 116 /* Linux 4.2: */ 117 DUMMY(userfaultfd); 118 /* Linux 4.3: */ 119 DUMMY(membarrier); 120 /* Linux 4.4: */ 121 DUMMY(mlock2); 122 /* Linux 4.6: */ 123 DUMMY(preadv2); 124 DUMMY(pwritev2); 125 /* Linux 4.8: */ 126 DUMMY(pkey_mprotect); 127 DUMMY(pkey_alloc); 128 DUMMY(pkey_free); 129 DUMMY(open_tree); 130 DUMMY(move_mount); 131 DUMMY(fsopen); 132 DUMMY(fsconfig); 133 DUMMY(fsmount); 134 DUMMY(fspick); 135 DUMMY(pidfd_open); 136 DUMMY(openat2); 137 DUMMY(pidfd_getfd); 138 DUMMY(process_madvise); 139 DUMMY(mount_setattr); 140 /* Linux 4.18: */ 141 DUMMY(io_pgetevents); 142 /* Linux 5.0: */ 143 DUMMY(pidfd_send_signal); 144 DUMMY(io_uring_setup); 145 DUMMY(io_uring_enter); 146 DUMMY(io_uring_register); 147