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.13: */ 78 DUMMY(inotify_add_watch); 79 DUMMY(inotify_rm_watch); 80 /* Linux 2.6.16: */ 81 DUMMY(migrate_pages); 82 DUMMY(unshare); 83 /* Linux 2.6.17: */ 84 DUMMY(tee); 85 DUMMY(vmsplice); 86 /* Linux 2.6.18: */ 87 DUMMY(move_pages); 88 /* Linux 2.6.27: */ 89 DUMMY(signalfd4); 90 DUMMY(inotify_init1); 91 /* Linux 2.6.31: */ 92 DUMMY(perf_event_open); 93 /* Linux 2.6.36: */ 94 DUMMY(fanotify_init); 95 DUMMY(fanotify_mark); 96 /* Linux 2.6.39: */ 97 DUMMY(clock_adjtime); 98 /* Linux 3.0: */ 99 DUMMY(setns); 100 /* Linux 3.2: */ 101 DUMMY(process_vm_readv); 102 DUMMY(process_vm_writev); 103 /* Linux 3.5: */ 104 DUMMY(kcmp); 105 /* Linux 3.8: */ 106 DUMMY(finit_module); 107 DUMMY(sched_setattr); 108 DUMMY(sched_getattr); 109 /* Linux 3.18: */ 110 DUMMY(bpf); 111 /* Linux 3.19: */ 112 DUMMY(execveat); 113 /* Linux 4.2: */ 114 DUMMY(userfaultfd); 115 /* Linux 4.3: */ 116 DUMMY(membarrier); 117 /* Linux 4.4: */ 118 DUMMY(mlock2); 119 /* Linux 4.6: */ 120 DUMMY(preadv2); 121 DUMMY(pwritev2); 122 /* Linux 4.8: */ 123 DUMMY(pkey_mprotect); 124 DUMMY(pkey_alloc); 125 DUMMY(pkey_free); 126 /* Linux 4.18: */ 127 DUMMY(io_pgetevents); 128 /* Linux 5.1: */ 129 DUMMY(pidfd_send_signal); 130 DUMMY(io_uring_setup); 131 DUMMY(io_uring_enter); 132 DUMMY(io_uring_register); 133 /* Linux 5.2: */ 134 DUMMY(open_tree); 135 DUMMY(move_mount); 136 DUMMY(fsopen); 137 DUMMY(fsconfig); 138 DUMMY(fsmount); 139 DUMMY(fspick); 140 /* Linux 5.3: */ 141 DUMMY(pidfd_open); 142 /* Linux 5.6: */ 143 DUMMY(openat2); 144 DUMMY(pidfd_getfd); 145 /* Linux 5.10: */ 146 DUMMY(process_madvise); 147 /* Linux 5.12: */ 148 DUMMY(mount_setattr); 149 /* Linux 5.13: */ 150 DUMMY(landlock_create_ruleset); 151 DUMMY(landlock_add_rule); 152 DUMMY(landlock_restrict_self); 153 /* Linux 5.14: */ 154 DUMMY(memfd_secret); 155 DUMMY(quotactl_fd); 156 /* Linux 5.15: */ 157 DUMMY(process_mrelease); 158 /* Linux 5.16: */ 159 DUMMY(futex_waitv); 160 DUMMY(set_mempolicy_home_node); 161 /* Linux 6.5: */ 162 DUMMY(cachestat); 163 /* Linux 6.6: */ 164 DUMMY(fchmodat2); 165