View | Details | Raw Unified | Return to bug 252675
Collapse All | Expand All

(-)b/emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c (-1 / +6 lines)
Lines 418-427 Link Here
418
 
418
 
419
     if ((fProt & RTMEM_PROT_NONE) == RTMEM_PROT_NONE)
419
     if ((fProt & RTMEM_PROT_NONE) == RTMEM_PROT_NONE)
420
         ProtectionFlags = VM_PROT_NONE;
420
         ProtectionFlags = VM_PROT_NONE;
421
@@ -826,6 +885,7 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT
421
@@ -825,7 +884,12 @@
422
     if ((fProt & RTMEM_PROT_EXEC) == RTMEM_PROT_EXEC)
422
         ProtectionFlags |= VM_PROT_EXECUTE;
423
         ProtectionFlags |= VM_PROT_EXECUTE;
423
 
424
 
425
+#if __FreeBSD_version >= 1300136
426
+    int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFlags, FALSE, VM_MAP_PROTECT_SET_PROT);
427
+#else
424
     int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFlags, FALSE);
428
     int krc = vm_map_protect(pVmMap, AddrStart, AddrEnd, ProtectionFlags, FALSE);
429
+#endif
425
+    IPRT_FREEBSD_RESTORE_EFL_AC();
430
+    IPRT_FREEBSD_RESTORE_EFL_AC();
426
     if (krc == KERN_SUCCESS)
431
     if (krc == KERN_SUCCESS)
427
         return VINF_SUCCESS;
432
         return VINF_SUCCESS;

Return to bug 252675