1- /* $Id: initterm-r0drv-linux.c 113547 2026-03-24 23:42:47Z knut.osmundsen@oracle.com $ */
1+ /* $Id: initterm-r0drv-linux.c 113603 2026-03-26 23:37:08Z knut.osmundsen@oracle.com $ */
22/** @file
33 * IPRT - Initialization & Termination, R0 Driver, Linux.
44 */
@@ -130,10 +130,15 @@ DECLHIDDEN(int) rtR0InitNative(void)
130130
131131 /*
132132 * There are some unexported symbols we want, try get them:
133- * - 'init_mm' so we can protect kernel memory (esp on arm64).
133+ *
134+ * - 'init_mm' so we can protect kernel memory (esp on arm64) in
135+ * memobj-r0drv-linux.c (IPRT_USE_APPLY_TO_PAGE_RANGE_FOR_EXEC).
136+ * Which means it's needed for 5.10. The symbol was exported
137+ * before 2.6.25.
138+ *
134139 * - __flush_tlb_all is restricted since 6.19 (x86 & amd64).
135140 */
136- #if RTLNX_VER_MIN (3 , 16 ,0 ) /** @todo support this for older kernels (see also dbgkrnlinfo-r0drv-linux.c and fileio-r0drv-linux.c ) */
141+ #if RTLNX_VER_MIN (5 , 10 ,0 ) /* ( this works back to 2.30 in theory ) */
137142 {
138143 RTDBGKRNLINFO hKrnlInfo ;
139144 int rc2 = RTR0DbgKrnlInfoOpen (& hKrnlInfo , 0 );
@@ -149,7 +154,7 @@ DECLHIDDEN(int) rtR0InitNative(void)
149154 RTR0DbgKrnlInfoRelease (hKrnlInfo );
150155 }
151156 else
152- printk (KERN_WARNING "rtR0InitNative: RTR0DbgKrnlInfoOpen failed: %d\n" , rc );
157+ printk (KERN_WARNING "rtR0InitNative: RTR0DbgKrnlInfoOpen failed: %d\n" , rc2 );
153158
154159# if RTLNX_VER_MIN (6 ,19 ,0 ) && (defined(RT_ARCH_AMD64 ) || defined(RT_ARCH_X86 ))
155160 if (!RT_VALID_PTR (g_pfnLinuxFlushTlbAll ))
0 commit comments