Changeset 93256 in vbox
- Timestamp:
- Jan 17, 2022 12:14:27 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r93255 r93256 6314 6314 TEMPLATE_VBOXR3HARDENEDEXE_SDKS = VBOX_NTDLL $(TEMPLATE_VBOXR3EXE_SDKS) 6315 6315 TEMPLATE_VBOXR3HARDENEDEXE_SDKS.x86 = VBOX_WIN_INT64 6316 TEMPLATE_VBOXR3HARDENEDEXE_LIBS.x86 = \ 6317 $(PATH_TOOL_$(TEMPLATE_VBOXR3HARDENEDEXE_TOOL.win.x86)_LIB)/chkstk.obj 6318 TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -GS- 6319 TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS.debug= $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)) -GS- #-O2 -Oy- 6320 TEMPLATE_VBOXR3HARDENEDEXE_PCHFLAGS = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_PCHFLAGS)) -GS- 6321 TEMPLATE_VBOXR3HARDENEDEXE_PCHFLAGS.debug= $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_PCHFLAGS.debug)) -GS- #-O2 -Oy- 6322 TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CFLAGS)) -GS- 6323 TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS.debug = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CFLAGS.debug)) -GS- -O2 -Oy- 6316 ifneq ($(VBOX_VCC_LD_GUARD_CF),) 6317 TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS = $(filter-out -RTC% -GZ,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) 6318 TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS.debug = $(filter-out -RTC% -GZ,$(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)) #-O2 -Oy- 6319 TEMPLATE_VBOXR3HARDENEDEXE_PCHFLAGS = $(filter-out -RTC% -GZ,$(TEMPLATE_VBOXR3EXE_PCHFLAGS)) 6320 TEMPLATE_VBOXR3HARDENEDEXE_PCHFLAGS.debug = $(filter-out -RTC% -GZ,$(TEMPLATE_VBOXR3EXE_PCHFLAGS.debug)) #-O2 -Oy- 6321 TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS = $(filter-out -RTC% -GZ,$(TEMPLATE_VBOXR3EXE_CFLAGS)) 6322 TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS.debug = $(filter-out -RTC% -GZ,$(TEMPLATE_VBOXR3EXE_CFLAGS.debug)) -O2 -Oy- 6323 else 6324 TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -GS- 6325 TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS.debug = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)) -GS- #-O2 -Oy- 6326 TEMPLATE_VBOXR3HARDENEDEXE_PCHFLAGS = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_PCHFLAGS)) -GS- 6327 TEMPLATE_VBOXR3HARDENEDEXE_PCHFLAGS.debug = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_PCHFLAGS.debug)) -GS- #-O2 -Oy- 6328 TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CFLAGS)) -GS- 6329 TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS.debug = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CFLAGS.debug)) -GS- -O2 -Oy- 6330 endif 6324 6331 TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(TEMPLATE_VBOXR3EXE_LDFLAGS) \ 6325 6332 /DISALLOWLIB:msvcrt$(VBOX_VCC_CRT_TYPE).lib \ -
trunk/src/VBox/HostDrivers/Support/Makefile.kmk
r93254 r93256 438 438 ifneq ($(VBOX_VCC_LD_GUARD_CF),) 439 439 SUPR3HardenedStatic_SOURCES.win += \ 440 $(SUPR3HardenedStatic_0_OUTDIR)/loadcfg.obj 441 # These are for the /guard option. 442 SUPR3HardenedStatic_SOURCES.win += \ 440 443 $(SUPR3HardenedStatic_0_OUTDIR)/loadcfg.obj \ 441 444 $(SUPR3HardenedStatic_0_OUTDIR)/gs_cookie.obj \ … … 443 446 $(SUPR3HardenedStatic_0_OUTDIR)/guard_dispatch.obj \ 444 447 $(SUPR3HardenedStatic_0_OUTDIR)/guard_xfg_dispatch.obj 448 # These next ones are for supporting the /GS option. We skip gs_report.obj as it 449 # import lots from kernel32 and we're better of reporting the problem ourselves. 450 SUPR3HardenedStatic_SOURCES.win += \ 451 $(SUPR3HardenedStatic_0_OUTDIR)/amdsecgs.obj \ 452 $(SUPR3HardenedStatic_0_OUTDIR)/gshandler.obj 445 453 446 454 $$(SUPR3HardenedStatic_0_OUTDIR)/loadcfg.obj \ … … 449 457 $$(SUPR3HardenedStatic_0_OUTDIR)/guard_dispatch.obj \ 450 458 $$(SUPR3HardenedStatic_0_OUTDIR)/guard_xfg_dispatch.obj \ 459 $$(SUPR3HardenedStatic_0_OUTDIR)/amdsecgs.obj \ 460 $$(SUPR3HardenedStatic_0_OUTDIR)/gs_report.obj \ 461 $$(SUPR3HardenedStatic_0_OUTDIR)/gshandler.obj \ 451 462 : \ 452 463 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/libcmt.lib | $$(dir $$@) -
trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp
r93115 r93256 485 485 } 486 486 487 488 /** 489 * Called when there is some /GS (or maybe /RTCsu) related stack problem. 490 * 491 * We don't want the CRT version living in gshandle.obj, as it uses a lot of 492 * kernel32 imports, we want to report this error ourselves. 493 */ 494 extern "C" __declspec(noreturn guard(nosspro) guard(nossepi)) 495 void __cdecl __report_rangecheckfailure(void) 496 { 497 supR3HardenedFatal("__report_rangecheckfailure called from %p", ASMReturnAddress()); 498 } 499 500 501 /** 502 * Called when there is some /GS problem has been detected. 503 * 504 * We don't want the CRT version living in gshandle.obj, as it uses a lot of 505 * kernel32 imports, we want to report this error ourselves. 506 */ 507 extern "C" __declspec(noreturn guard(nosspro) guard(nossepi)) 508 #ifdef RT_ARCH_X86 509 void __cdecl __report_gsfailure(void) 510 #else 511 void __report_gsfailure(uintptr_t uCookie) 512 #endif 513 { 514 #ifdef RT_ARCH_X86 515 supR3HardenedFatal("__report_gsfailure called from %p", ASMReturnAddress()); 516 #else 517 supR3HardenedFatal("__report_gsfailure called from %p, cookie=%p", ASMReturnAddress(), uCookie); 518 #endif 519 } 487 520 488 521
Note:
See TracChangeset
for help on using the changeset viewer.