opnsense-src/sys/compat/linux
Dmitry Chagin ccdf2cd423 linux(4): Check the socket before any others sanity checks
Strictly speaking, this check is performed by the kern_recvit(), but in
the Linux emulation layer before calling the kernel we do other sanity
checks and conversions from Linux types to the native types. This changes
an order of the error returning that is critical for some buggy Linux
applications.

For recvmmsg() syscall this fixes a panic in case when the user-supplied
vlen value is 0, then error is not initialized and garbage passed to the
bsd_to_linux_errno().

MFC after:		2 weeks

(cherry picked from commit 3a99aac66f)
2022-06-17 22:35:32 +03:00
..
check_error.d linux(4): Eliminating remnants of futex sdt. 2022-06-17 22:33:22 +03:00
check_internal_locks.d
linux.c linux(4): Microoptimize bsd_to_linux_sockaddr(). 2022-06-17 22:33:54 +03:00
linux.h linux(4): Add struct clone_args for future clone3 system call. 2022-06-17 22:33:30 +03:00
linux_common.c linux(4): Reimplement futexes using umtx. 2022-06-17 22:33:17 +03:00
linux_common.h linux(4): Cleanup empty lines. 2022-06-17 22:33:48 +03:00
linux_dtrace.h
linux_dummy.c linux(4): Add epoll_pwai2 syscall. 2022-06-17 22:34:10 +03:00
linux_elf.c linux: Drop some unnecessary includes 2022-06-17 22:33:38 +03:00
linux_elf.h linux(4): implement coredump support 2022-06-17 22:33:02 +03:00
linux_elf32.c linux(4): implement coredump support 2022-06-17 22:33:02 +03:00
linux_elf64.c linux(4): implement coredump support 2022-06-17 22:33:02 +03:00
linux_emul.c linux(4): Cleanup empty lines. 2022-06-17 22:33:48 +03:00
linux_emul.h linprocfs: Add /proc/self/oom_score_adj. 2022-06-17 22:33:47 +03:00
linux_errno.c Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts. 2020-11-04 19:54:18 +00:00
linux_errno.h linux: Fix ptrace panic with ERESTART 2022-02-21 13:36:11 +00:00
linux_errno.inc Add linux_to_bsd_errtbl[], mapping Linux errnos to their BSD counterparts. 2020-11-04 19:54:18 +00:00
linux_event.c linux(4): Add a helper intended for copying timespec's from the userspace. 2022-06-17 22:34:59 +03:00
linux_event.h Drop rdivacky@ "All rights reserved" from linux_event. 2022-06-17 22:33:09 +03:00
linux_file.c linux(4): Fix unlinkat() after a125ed50 2022-06-17 22:35:30 +03:00
linux_file.h linux(4): Add AT_NO_AUTOMOUNT to statx. 2022-06-17 22:33:43 +03:00
linux_fork.c linux(4): Fix "set but not used" warnings 2022-06-17 22:33:38 +03:00
linux_fork.h linux(4): Add CLONE_PIDFD option bit. 2022-06-17 22:33:31 +03:00
linux_futex.c linux(4): To improve readability use FUTEX_UNOWNED instead of 0 2022-06-17 22:35:27 +03:00
linux_futex.h linux(4): Handle FUTEX_LOCK_PI2 oeration. 2022-06-17 22:33:24 +03:00
linux_getcwd.c linux(4): make getcwd(2) return ERANGE instead of ENOMEM 2021-03-15 13:00:17 +00:00
linux_ioctl.c linux: add sysctl to pass untranslated interface names 2022-03-28 08:49:23 +00:00
linux_ioctl.h linux: Improve debugging by recognizing TIOCGPTPEER 2022-02-13 22:26:01 +00:00
linux_ipc.c linux(4): Add a helper intended for copying timespec's from the userspace. 2022-06-17 22:34:59 +03:00
linux_ipc.h linux(4): Implement semtimedop syscalls. 2022-06-17 22:34:53 +03:00
linux_ipc64.h
linux_mib.c linux: Make compat.linux.preserve_vstatus default to 1 2022-02-14 19:35:25 +00:00
linux_mib.h linux(4): Rid unused defines from linux_mib. 2022-06-17 22:33:46 +03:00
linux_misc.c Finish cpuset_getaffinity() after f35093f8 2022-06-17 22:35:31 +03:00
linux_misc.h linux(4): Add AT_MINSIGSTKSZ to arm64 port 2022-06-17 22:35:23 +03:00
linux_mmap.c linux: plug set-but-not-unused vars 2022-06-17 22:33:43 +03:00
linux_mmap.h Add linux_madvise(2) instead of having Linux apps call the native 2020-06-20 18:29:22 +00:00
linux_persona.h
linux_ptrace.c linux: Drop some unnecessary includes 2022-06-17 22:33:38 +03:00
linux_rseq.c linux(4): Add a simple rseq syscall implementation. 2022-06-17 22:34:03 +03:00
linux_siginfo.h linux(4): Add kernel signal code definitions 2022-06-17 22:35:26 +03:00
linux_signal.c linux(4): Convert the native kernel signal codes into the Linux codes 2022-06-17 22:35:26 +03:00
linux_signal.h linux(4): Move signal codes definitions to the appropriate header 2022-06-17 22:35:26 +03:00
linux_socket.c linux(4): Check the socket before any others sanity checks 2022-06-17 22:35:32 +03:00
linux_socket.h linux(4): Handle SO_DOMAIN in getsockopt syscall. 2022-06-17 22:33:51 +03:00
linux_stats.c linux(4): Cleanup empty lines. 2022-06-17 22:33:48 +03:00
linux_sysctl.c linux: remove redundant SDT tracepoints 2022-06-17 22:22:15 +03:00
linux_sysproto.h
linux_time.c linux(4): Add a helper intended for copying timespec's from the userspace. 2022-06-17 22:34:59 +03:00
linux_timer.c linux(4): Implement timer_settime64 syscall. 2022-06-17 22:34:26 +03:00
linux_timer.h linux(4): Add a helper intended for copying timespec's from the userspace. 2022-06-17 22:34:59 +03:00
linux_uid16.c linux: remove the always curthread argument from lconvpath 2022-06-17 22:33:39 +03:00
linux_util.c linux: remove the always curthread argument from lconvpath 2022-06-17 22:33:39 +03:00
linux_util.h linux: remove the always curthread argument from lconvpath 2022-06-17 22:33:39 +03:00
linux_vdso.c Drop "All rights reserved" from my copyright statements. 2022-06-17 22:33:09 +03:00
linux_vdso.h Drop "All rights reserved" from my copyright statements. 2022-06-17 22:33:09 +03:00
linux_vdso_gtod.inc linux(4): Use the right function to get the bit index in vdso binuptime. 2022-06-17 22:35:00 +03:00
linux_videodev2_compat.h
linux_videodev_compat.h
stats_timing.d
trace_futexes.d