opnsense-src/sys/compat/linux
Gleb Smirnoff b977dd1ea5 linux: make linux_netlink_p->msg_from_linux be able to fail
The KPI for this function was misleading.  From the NetLink perspective it
looked like a function that: a) allocates new hdr, b) can fail.  Neither
was true.  Let the function return a error code instead of returning the
same hdr it was passed to.  In case if future Linux NetLink compatibility
support calls for reallocating header, pass hdr as pointer to pointer.

With KPI that returns a error, propagate domain conversion errors all the
way up to NetLink module.  This fixes panic when unknown domain is
converted to 0xff and this invalid value is passed into NetLink
processing.

PR:			274536
Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D44392
2024-03-29 13:35:51 -07:00
..
check_error.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
check_internal_locks.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux.c linux: use sa_family_t for address family conversions 2024-03-29 13:35:37 -07:00
linux.h linux(4): Update my copyrights, add SPDX tag 2023-08-17 23:54:36 +03:00
linux_common.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_common.h linux: use sa_family_t for address family conversions 2024-03-29 13:35:37 -07:00
linux_dtrace.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_dummy.c linux(4): Update syscalls.master to 6.5 2023-09-25 12:24:58 +03:00
linux_elf.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_elf.h spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
linux_elf32.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_elf64.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_emul.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_emul.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_errno.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_errno.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_errno.inc sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_event.c linux(4): Convert flags in timerfd_create 2023-09-05 11:53:02 +03:00
linux_event.h linux(4): Convert flags in timerfd_create 2023-09-05 11:53:02 +03:00
linux_file.c Abstract UIO allocation and deallocation. 2024-02-10 11:38:04 -05:00
linux_file.h linux(4): Add a write syscall wrapper 2023-08-20 10:36:29 +03:00
linux_fork.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_fork.h linux(4): Update my copyrights, add SPDX tag 2023-08-17 23:54:36 +03:00
linux_futex.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_futex.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_getcwd.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_ioctl.c linux: Check for copyout errors in ioctl handlers 2023-12-27 10:13:15 -05:00
linux_ioctl.h linux(4): Add 2 Linux socket ioctl commands 2023-08-17 22:57:16 +03:00
linux_ipc.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_ipc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_ipc64.h linux(4): Fix semid64_ds structure layout 2023-10-04 21:21:12 +03:00
linux_mib.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_mib.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_misc.c sys/compat/linux/linux_misc.c: remove an extra semicolon 2024-02-02 18:35:01 -07:00
linux_misc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_mmap.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_mmap.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_netlink.c linux: make linux_netlink_p->msg_from_linux be able to fail 2024-03-29 13:35:51 -07:00
linux_persona.h linux(4): Fix leftovers after 2ff63af9 2023-08-17 23:54:00 +03:00
linux_ptrace.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_rseq.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_siginfo.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_signal.c linux(4): On Linux SIGKILL can not be reset to default 2023-09-18 17:53:01 +03:00
linux_signal.h linux(4): Staticize lsiginfo_to_siginfo 2023-09-18 17:52:43 +03:00
linux_socket.c linux: use sa_family_t for address family conversions 2024-03-29 13:35:37 -07:00
linux_socket.h linux(4): Drop bogus __arm__ condition due to lack of 32-bit arm support 2023-08-17 22:57:17 +03:00
linux_stats.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_sysctl.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_time.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
linux_time.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
linux_timer.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_uid16.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_util.c linux_pwd_onexec: do not abort image activation if emul path does not exist 2024-02-22 03:31:39 +02:00
linux_util.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
linux_vdso.c linux(4): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux_vdso.h linux(4): Remove include of sys/types.h from linux_vdso.h 2023-08-18 15:58:32 +03:00
linux_vdso_gtod.inc linux(4): Fix linker warning about undefined vdso symbols 2023-08-20 00:48:36 +03:00
linux_videodev2_compat.h linux(4): Fix leftovers after 2ff63af9 2023-08-17 23:54:00 +03:00
linux_videodev_compat.h linux(4): Fix leftovers after 2ff63af9 2023-08-17 23:54:00 +03:00
linux_xattr.c linux(4): Return ENOTSUP from listxattr instead of EPERM 2023-09-05 11:52:27 +03:00
stats_timing.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
trace_futexes.d sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00