Changeset 52033 in vbox for trunk/src/VBox
- Timestamp:
- Jul 15, 2014 9:23:37 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/memsafer-generic.cpp
r52020 r52033 116 116 * 117 117 * @note: The allocation will have an extra page allocated before and after the 118 * user area with all access rights removed to prevent heartbleed like119 * attacks.118 * user area with all access rights removed if the host supports that to 119 * prevent heartbleed like attacks. 120 120 */ 121 121 static int rtMemSaferSupR3Alloc(void **ppvNew, size_t cb) … … 132 132 if (RT_SUCCESS(rc)) 133 133 { 134 /* Change the memory protection of the pages guarding the allocation. */ 134 /* 135 * Change the memory protection of the pages guarding the allocation. 136 * Some hosts don't support changing the page protection, ignore these 137 * errors. 138 */ 135 139 rc = SUPR3PageProtect(pvNew, NIL_RTR0PTR, 0, PAGE_SIZE, RTMEM_PROT_NONE); 136 if (RT_SUCCESS(rc) )140 if (RT_SUCCESS(rc) || rc == VERR_NOT_SUPPORTED) 137 141 { 138 Assert(cb == (size_t)((uint32_t)(PAGE_SIZE + cbUser))); 139 rc = SUPR3PageProtect(pvNew, NIL_RTR0PTR, PAGE_SIZE + (uint32_t)cbUser, PAGE_SIZE, RTMEM_PROT_NONE); 142 Assert(PAGE_SIZE + cbUser == (size_t)((uint32_t)(PAGE_SIZE + cbUser))); 143 if (rc == VERR_NOT_SUPPORTED) 144 rc = VINF_SUCCESS; 145 else 146 rc = SUPR3PageProtect(pvNew, NIL_RTR0PTR, PAGE_SIZE + (uint32_t)cbUser, PAGE_SIZE, RTMEM_PROT_NONE); 147 140 148 if (RT_SUCCESS(rc)) 141 149 {
Note:
See TracChangeset
for help on using the changeset viewer.