opnsense-src/sys/compat
Austin Shafer d95675349a linuxkpi: Provide a non-NULL value for THIS_MODULE
THIS_MODULE is used to differentiate modules on Linux. We currently
completely stub out any Linux struct module usage, but THIS_MODULE
is still used to populate the "owner" fields of various drivers.
Even though we don't actually dereference these "owner" fields they
are still used by drivers to check if devices/dmabufs/etc come
from different modules. For example, during DRM GEM import some
drivers check if the dmabuf's owner matches the dev's owner. If
they match because they are both NULL drivers may incorrectly think
two resources come from the same module.

This adds a general purpose __this_linker_file which will point to
the linker file of the module that uses it. We can then use that
pointer to have a valid value for THIS_MODULE.

Reviewed by:	bz, jhb
Differential Revision:	https://reviews.freebsd.org/D44306

(cherry picked from commit 28a59100b54ff245a45fbd328266266f1c14eb8c)
2024-11-30 08:55:57 -05:00
..
freebsd32 Regen 2024-10-05 10:08:56 +03:00
ia32 sysentvec: add SV_SIGSYS flag 2023-10-09 06:24:31 +03:00
lindebugfs uio: Use switch statements when handling UIO_READ vs UIO_WRITE 2024-11-30 08:55:57 -05:00
linprocfs linprocfs: Avoid using a sysctl to get the CPU model string 2024-01-11 09:19:07 -05:00
linsysfs linsysfs(5): Remove sys/cdefs.h inclusion where it's not needed due to 685dc743 2023-08-18 13:12:02 +03:00
linux linux sendfile: Fix handling of non-blocking sockets 2024-11-20 21:41:08 +00:00
linuxkpi linuxkpi: Provide a non-NULL value for THIS_MODULE 2024-11-30 08:55:57 -05:00
x86bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00