VirtualBox

Changeset 51999 in vbox


Ignore:
Timestamp:
Jul 11, 2014 9:43:11 PM (10 years ago)
Author:
vboxsync
Message:

Removed left over DEBUG_bird bits in iprt/asn1.h and added VBOX_PERMIT_VISUAL_STUDIO_PROFILING.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asn1.h

    r51770 r51999  
    2626#ifndef ___iprt_asn1_h
    2727#define ___iprt_asn1_h
    28 
    29 #if defined(DEBUG_bird) && !defined(IN_SUP_HARDENED_R3) && defined(IN_RING3) /* TEMPORARY! */
    30 # define RTMEM_WRAP_TO_EF_APIS                                               /* TEMPORARY! */
    31 # include <iprt/mem.h>                                                       /* TEMPORARY! */
    32 #endif                                                                       /* TEMPORARY! */
    3328
    3429#include <iprt/time.h>
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r51973 r51999  
    182182        $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,) \
    183183        $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,) \
    184         $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,)
     184        $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,) \
     185        $(if $(VBOX_PERMIT_VISUAL_STUDIO_PROFILING),VBOX_PERMIT_VISUAL_STUDIO_PROFILING,)
    185186ifdef VBOX_WITH_VISTA_NO_SP
    186187 SUPR3HardenedStatic_DEFS.win += VBOX_WITH_VISTA_NO_SP
     
    531532  VBoxDrv_DEFS           += VBOX_WITHOUT_DEBUGGER_CHECKS
    532533 endif
     534 ifdef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
     535  VBoxDrv_DEFS           += VBOX_PERMIT_VISUAL_STUDIO_PROFILING
     536 endif
    533537 #VBoxDrv_DEFS.debug      += DEBUG_DARWIN_GIP
    534538 VBoxDrv_DEFS.darwin     := VBOX_WITH_HOST_VMX
  • trunk/src/VBox/HostDrivers/Support/win/SUPHardenedVerifyProcess-win.cpp

    r51977 r51999  
    122122     * The array is large enough to hold the executable, all allowed DLLs, and one
    123123     * more so we can get the image name of the first unwanted DLL. */
    124     SUPHNTVPIMAGE           aImages[1+6+1];
     124    SUPHNTVPIMAGE           aImages[1 + 6 + 1
     125#ifdef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
     126                                    + 16
     127#endif
     128                                   ];
    125129    /** Memory compare scratch buffer.*/
    126130    uint8_t                 abMemory[_4K];
     
    150154    "apphelp.dll",
    151155    "apisetschema.dll",
    152     "sfc.dll"
     156    "sfc.dll",
     157#ifdef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
     158    "psapi.dll",
     159    "msvcrt.dll",
     160    "advapi32.dll",
     161    "sechost.dll",
     162    "rpcrt4.dll",
     163    "SamplingRuntime.dll",
     164#endif
    153165};
    154166
     
    817829            pImage->fDll    = true;
    818830
     831#ifndef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
    819832            /* The directory name must match the one we've got for System32. */
    820833            if (   cwcDirName * sizeof(WCHAR) != g_System32NtPath.UniStr.Length
     
    825838                                           "Expected %ls to be loaded from %ls.",
    826839                                           pImage->Name.UniStr.Buffer, g_System32NtPath.UniStr.Buffer);
    827 
     840#endif
    828841            break;
    829842        }
     
    10381051         * Executable memory?
    10391052         */
     1053#ifndef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
    10401054        else if (MemInfo.Protect & (PAGE_EXECUTE | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY))
    10411055        {
     
    10501064                                MemInfo.AllocationBase,
    10511065                                MemInfo.AllocationProtect);
    1052 #ifdef IN_RING3
     1066# ifdef IN_RING3
    10531067            /* Continue add more information about the problematic process. */
    1054 #else
     1068# else
    10551069            return pThis->rcResult;
    1056 #endif
     1070# endif
    10571071        }
     1072#endif
    10581073
    10591074        /*
  • trunk/src/VBox/HostDrivers/Support/win/SUPR3HardenedMain-win.cpp

    r51945 r51999  
    624624                               g_offSupLibHardenedExeNtName * sizeof(WCHAR)) == 0)
    625625                fFlags |= SUPHNTVI_F_REQUIRE_KERNEL_CODE_SIGNING | SUPHNTVI_F_REQUIRE_SIGNATURE_ENFORCEMENT;
     626#ifdef VBOX_PERMIT_VISUAL_STUDIO_PROFILING
     627            /* Hack to allow profiling our code with Visual Studio. */
     628            else if (   uBuf.UniStr.Length > sizeof(L"\\SamplingRuntime.dll")
     629                     && memcmp(uBuf.UniStr.Buffer + (uBuf.UniStr.Length - sizeof(L"\\SamplingRuntime.dll") + sizeof(WCHAR)) / sizeof(WCHAR),
     630                               L"\\SamplingRuntime.dll", sizeof(L"\\SamplingRuntime.dll") - sizeof(WCHAR)) == 0 )
     631            {
     632                if (hMyFile != hFile)
     633                    NtClose(hMyFile);
     634                return g_pfnNtCreateSectionReal(phSection, fAccess, pObjAttribs, pcbSection, fProtect, fAttribs, hFile);
     635            }
     636#endif
    626637            else
    627638            {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette