Changeset 53877 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jan 21, 2015 12:30:58 AM (10 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ldr/ldrPE.cpp
r53818 r53877 2931 2931 * volatile everywhere! Trying to prevent the compiler being a smarta$$ and reorder stuff. 2932 2932 */ 2933 IMAGE_LOAD_CONFIG_DIRECTORY32_V3 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V3 volatile *)pLoadCfg; 2934 IMAGE_LOAD_CONFIG_DIRECTORY64_V3 volatile *pLoadCfg64 = pLoadCfg; 2935 2933 IMAGE_LOAD_CONFIG_DIRECTORY32_V4 volatile *pLoadCfg32 = (IMAGE_LOAD_CONFIG_DIRECTORY32_V4 volatile *)pLoadCfg; 2934 IMAGE_LOAD_CONFIG_DIRECTORY64_V4 volatile *pLoadCfg64 = pLoadCfg; 2935 2936 pLoadCfg64->CodeIntegrity.Reserved = pLoadCfg32->CodeIntegrity.Reserved; 2937 pLoadCfg64->CodeIntegrity.CatalogOffset = pLoadCfg32->CodeIntegrity.CatalogOffset; 2938 pLoadCfg64->CodeIntegrity.Catalog = pLoadCfg32->CodeIntegrity.Catalog; 2939 pLoadCfg64->CodeIntegrity.Flags = pLoadCfg32->CodeIntegrity.Flags; 2936 2940 pLoadCfg64->GuardFlags = pLoadCfg32->GuardFlags; 2937 2941 pLoadCfg64->GuardCFFunctionCount = pLoadCfg32->GuardCFFunctionCount; … … 3433 3437 if (Dir.Size) 3434 3438 { 3439 const size_t cbExpectV4 = !pModPe->f64Bit 3440 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V4) 3441 : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V4); 3435 3442 const size_t cbExpectV3 = !pModPe->f64Bit 3436 3443 ? sizeof(IMAGE_LOAD_CONFIG_DIRECTORY32_V3) … … 3443 3450 : sizeof(IMAGE_LOAD_CONFIG_DIRECTORY64_V2) /*No V1*/; 3444 3451 3445 if ( Dir.Size != cbExpectV3 3452 if ( Dir.Size != cbExpectV4 3453 && Dir.Size != cbExpectV3 3446 3454 && Dir.Size != cbExpectV2 3447 3455 && Dir.Size != cbExpectV1) 3448 3456 { 3449 Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %d bytes, expected %d, %d, or %d.\n",3450 pszLogName, Dir.Size, cbExpectV 3, cbExpectV2, cbExpectV1));3457 Log(("rtldrPEOpen: %s: load cfg dir: unexpected dir size of %d bytes, expected %d, %d, %d, or %d.\n", 3458 pszLogName, Dir.Size, cbExpectV4, cbExpectV3, cbExpectV2, cbExpectV1)); 3451 3459 return VERR_LDRPE_LOAD_CONFIG_SIZE; 3452 3460 } … … 3455 3463 * Read and convert to 64-bit. 3456 3464 */ 3457 memset(&u.Cfg64, 0, sizeof(u.Cfg64));3465 RT_ZERO(u.Cfg64); 3458 3466 int rc = rtldrPEReadRVA(pModPe, &u.Cfg64, Dir.Size, Dir.VirtualAddress); 3459 3467 if (RT_FAILURE(rc)) -
trunk/src/VBox/Runtime/include/internal/ldrPE.h
r51770 r53877 540 540 541 541 542 /** @since Windows 10 (preview 9879) */ 543 typedef struct _IMAGE_LOAD_CONFIG_CODE_INTEGRITY 544 { 545 uint16_t Flags; 546 uint16_t Catalog; 547 uint32_t CatalogOffset; 548 uint32_t Reserved; 549 } IMAGE_LOAD_CONFIG_CODE_INTEGRITY; 550 AssertCompileSize(IMAGE_LOAD_CONFIG_CODE_INTEGRITY, 12); 551 typedef IMAGE_LOAD_CONFIG_CODE_INTEGRITY *PIMAGE_LOAD_CONFIG_CODE_INTEGRITY; 552 typedef IMAGE_LOAD_CONFIG_CODE_INTEGRITY const *PCIMAGE_LOAD_CONFIG_CODE_INTEGRITY; 542 553 543 554 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V1 … … 625 636 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V3 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V3; 626 637 627 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V3 IMAGE_LOAD_CONFIG_DIRECTORY32; 628 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V3 PIMAGE_LOAD_CONFIG_DIRECTORY32; 629 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V3 PCIMAGE_LOAD_CONFIG_DIRECTORY32; 638 /** @since Windows 10 (preview 9879) */ 639 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY32_V4 640 { 641 uint32_t Size; 642 uint32_t TimeDateStamp; 643 uint16_t MajorVersion; 644 uint16_t MinorVersion; 645 uint32_t GlobalFlagsClear; 646 uint32_t GlobalFlagsSet; 647 uint32_t CriticalSectionDefaultTimeout; 648 uint32_t DeCommitFreeBlockThreshold; 649 uint32_t DeCommitTotalFreeThreshold; 650 uint32_t LockPrefixTable; 651 uint32_t MaximumAllocationSize; 652 uint32_t VirtualMemoryThreshold; 653 uint32_t ProcessHeapFlags; 654 uint32_t ProcessAffinityMask; 655 uint16_t CSDVersion; 656 uint16_t Reserved1; 657 uint32_t EditList; 658 uint32_t SecurityCookie; 659 uint32_t SEHandlerTable; 660 uint32_t SEHandlerCount; 661 uint32_t GuardCFCCheckFunctionPointer; 662 uint32_t Reserved2; 663 uint32_t GuardCFFunctionTable; 664 uint32_t GuardCFFunctionCount; 665 uint32_t GuardFlags; 666 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; 667 } IMAGE_LOAD_CONFIG_DIRECTORY32_V4; 668 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY32_V4, 0x68); 669 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4 *PIMAGE_LOAD_CONFIG_DIRECTORY32_V4; 670 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4 const *PCIMAGE_LOAD_CONFIG_DIRECTORY32_V4; 671 672 typedef IMAGE_LOAD_CONFIG_DIRECTORY32_V4 IMAGE_LOAD_CONFIG_DIRECTORY32; 673 typedef PIMAGE_LOAD_CONFIG_DIRECTORY32_V4 PIMAGE_LOAD_CONFIG_DIRECTORY32; 674 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY32_V4 PCIMAGE_LOAD_CONFIG_DIRECTORY32; 630 675 631 676 /* No _IMAGE_LOAD_CONFIG_DIRECTORY64_V1 exists. */ … … 692 737 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V3 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V3; 693 738 694 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V3 IMAGE_LOAD_CONFIG_DIRECTORY64; 695 typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V3 PIMAGE_LOAD_CONFIG_DIRECTORY64; 696 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V3 PCIMAGE_LOAD_CONFIG_DIRECTORY64; 739 /** @since Windows 10 (Preview (9879). */ 740 typedef struct _IMAGE_LOAD_CONFIG_DIRECTORY64_V4 741 { 742 uint32_t Size; 743 uint32_t TimeDateStamp; 744 uint16_t MajorVersion; 745 uint16_t MinorVersion; 746 uint32_t GlobalFlagsClear; 747 uint32_t GlobalFlagsSet; 748 uint32_t CriticalSectionDefaultTimeout; 749 uint64_t DeCommitFreeBlockThreshold; 750 uint64_t DeCommitTotalFreeThreshold; 751 uint64_t LockPrefixTable; 752 uint64_t MaximumAllocationSize; 753 uint64_t VirtualMemoryThreshold; 754 uint64_t ProcessAffinityMask; 755 uint32_t ProcessHeapFlags; 756 uint16_t CSDVersion; 757 uint16_t Reserved1; 758 uint64_t EditList; 759 uint64_t SecurityCookie; 760 uint64_t SEHandlerTable; 761 uint64_t SEHandlerCount; 762 uint64_t GuardCFCCheckFunctionPointer; 763 uint64_t Reserved2; 764 uint64_t GuardCFFunctionTable; 765 uint64_t GuardCFFunctionCount; 766 uint32_t GuardFlags; 767 IMAGE_LOAD_CONFIG_CODE_INTEGRITY CodeIntegrity; 768 } IMAGE_LOAD_CONFIG_DIRECTORY64_V4; 769 AssertCompileSize(IMAGE_LOAD_CONFIG_DIRECTORY64_V4, 0xa0); 770 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4 *PIMAGE_LOAD_CONFIG_DIRECTORY64_V4; 771 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4 const *PCIMAGE_LOAD_CONFIG_DIRECTORY64_V4; 772 773 typedef IMAGE_LOAD_CONFIG_DIRECTORY64_V4 IMAGE_LOAD_CONFIG_DIRECTORY64; 774 typedef PIMAGE_LOAD_CONFIG_DIRECTORY64_V4 PIMAGE_LOAD_CONFIG_DIRECTORY64; 775 typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V4 PCIMAGE_LOAD_CONFIG_DIRECTORY64; 776 697 777 698 778 typedef struct _IMAGE_DEBUG_DIRECTORY
Note:
See TracChangeset
for help on using the changeset viewer.