opnsense-src/sys/compat
Mark Johnston 6223d0b67a linuxkpi: Handle direct-mapped addresses in linux_free_kmem()
See the analysis in PR 271333.  It is possible for driver code to
allocate a page, store its address as returned by page_address(), then
call free_page() on that address.  On most systems that'll result in the
LinuxKPI calling kmem_free() with a direct-mapped address, which is not
legal.

Fix the problem by making linux_free_kmem() check the address to see
whether it's direct-mapped or not, and handling it appropriately.

PR:		271333, 274515
Reviewed by:	hselasky, bz
Tested by:	trasz
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40028
2023-10-17 11:19:06 -04:00
..
freebsd32 timerfd: Relocate 32-bit compat code 2023-09-05 16:25:07 -06:00
ia32 sysentvec: add SV_SIGSYS flag 2023-10-03 01:30:52 +03:00
lindebugfs sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
linprocfs linprocfs(5): Follow style(9), sort includes 2023-08-18 13:12:02 +03: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 netlink: move NETLINK define to opt_global.h 2023-10-13 09:23:47 +02:00
linuxkpi linuxkpi: Handle direct-mapped addresses in linux_free_kmem() 2023-10-17 11:19:06 -04:00
x86bios sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00