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/param.h> 29 #include <sys/systm.h> 30 #include <sys/sdt.h> 31 #include <sys/proc.h> 32 33 /* 34 * Including linux vs linux32 here is arbitrary -- the syscall args structures 35 * (proto.h) are not dereferenced by the DUMMY stub implementations, and 36 * suitable for use by both native and compat32 entrypoints. 37 */ 38 #include <machine/../linux/linux.h> 39 #include <machine/../linux/linux_proto.h> 40 41 #include <compat/linux/linux_dtrace.h> 42 #include <compat/linux/linux_util.h> 43 44 /* DTrace init */ 45 LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); 46 47 UNIMPLEMENTED(afs_syscall); 48 UNIMPLEMENTED(create_module); /* Added in Linux 1.0 removed in 2.6. */ 49 UNIMPLEMENTED(epoll_ctl_old); 50 UNIMPLEMENTED(epoll_wait_old); 51 UNIMPLEMENTED(get_kernel_syms); /* Added in Linux 1.0 removed in 2.6. */ 52 UNIMPLEMENTED(getpmsg); 53 UNIMPLEMENTED(nfsservctl); /* Added in Linux 2.2 removed in 3.1. */ 54 UNIMPLEMENTED(putpmsg); 55 UNIMPLEMENTED(query_module); /* Added in Linux 2.2 removed in 2.6. */ 56 UNIMPLEMENTED(security); 57 UNIMPLEMENTED(vserver); 58 59 DUMMY(setfsuid); 60 DUMMY(setfsgid); 61 DUMMY(vhangup); 62 DUMMY(pivot_root); 63 DUMMY(adjtimex); 64 DUMMY(swapoff); 65 DUMMY(init_module); 66 DUMMY(delete_module); 67 DUMMY(lookup_dcookie); 68 DUMMY(remap_file_pages); 69 DUMMY(mbind); 70 DUMMY(get_mempolicy); 71 DUMMY(set_mempolicy); 72 DUMMY(kexec_load); 73 /* Linux 2.6.11: */ 74 DUMMY(add_key); 75 DUMMY(request_key); 76 DUMMY(keyctl); 77 /* Linux 2.6.16: */ 78 DUMMY(migrate_pages); 79 DUMMY(unshare); 80 /* Linux 2.6.17: */ 81 DUMMY(tee); 82 DUMMY(vmsplice); 83 /* Linux 2.6.18: */ 84 DUMMY(move_pages); 85 /* Linux 2.6.27: */ 86 DUMMY(signalfd4); 87 /* Linux 2.6.31: */ 88 DUMMY(perf_event_open); 89 /* Linux 2.6.36: */ 90 DUMMY(fanotify_init); 91 DUMMY(fanotify_mark); 92 /* Linux 2.6.39: */ 93 DUMMY(clock_adjtime); 94 /* Linux 3.0: */ 95 DUMMY(setns); 96 /* Linux 3.2: */ 97 DUMMY(process_vm_readv); 98 DUMMY(process_vm_writev); 99 /* Linux 3.5: */ 100 DUMMY(kcmp); 101 /* Linux 3.8: */ 102 DUMMY(finit_module); 103 DUMMY(sched_setattr); 104 DUMMY(sched_getattr); 105 /* Linux 3.18: */ 106 DUMMY(bpf); 107 /* Linux 3.19: */ 108 DUMMY(execveat); 109 /* Linux 4.2: */ 110 DUMMY(userfaultfd); 111 /* Linux 4.3: */ 112 DUMMY(membarrier); 113 /* Linux 4.4: */ 114 DUMMY(mlock2); 115 /* Linux 4.6: */ 116 DUMMY(preadv2); 117 DUMMY(pwritev2); 118 /* Linux 4.8: */ 119 DUMMY(pkey_mprotect); 120 DUMMY(pkey_alloc); 121 DUMMY(pkey_free); 122 /* Linux 4.18: */ 123 DUMMY(io_pgetevents); 124 /* Linux 5.1: */ 125 DUMMY(pidfd_send_signal); 126 DUMMY(io_uring_setup); 127 DUMMY(io_uring_enter); 128 DUMMY(io_uring_register); 129 /* Linux 5.2: */ 130 DUMMY(open_tree); 131 DUMMY(move_mount); 132 DUMMY(fsopen); 133 DUMMY(fsconfig); 134 DUMMY(fsmount); 135 DUMMY(fspick); 136 /* Linux 5.3: */ 137 DUMMY(pidfd_open); 138 /* Linux 5.6: */ 139 DUMMY(openat2); 140 DUMMY(pidfd_getfd); 141 /* Linux 5.10: */ 142 DUMMY(process_madvise); 143 /* Linux 5.12: */ 144 DUMMY(mount_setattr); 145 /* Linux 5.13: */ 146 DUMMY(landlock_create_ruleset); 147 DUMMY(landlock_add_rule); 148 DUMMY(landlock_restrict_self); 149 /* Linux 5.14: */ 150 DUMMY(memfd_secret); 151 DUMMY(quotactl_fd); 152 /* Linux 5.15: */ 153 DUMMY(process_mrelease); 154 /* Linux 5.16: */ 155 DUMMY(futex_waitv); 156 DUMMY(set_mempolicy_home_node); 157 /* Linux 6.5: */ 158 DUMMY(cachestat); 159 /* Linux 6.6: */ 160 DUMMY(fchmodat2); 161