VirtualBox

Changeset 29959 in vbox


Ignore:
Timestamp:
Jun 1, 2010 3:43:19 PM (15 years ago)
Author:
vboxsync
Message:

More updates for kernel module sharing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp

    r29958 r29959  
    363363   
    364364        NTSTATUS ret = ZwQuerySystemInformation(SystemModuleInformation, (PVOID)&cbBuffer, 0, &cbBuffer);
    365         if (ret != STATUS_INFO_LENGTH_MISMATCH)
     365        if (!cbBuffer)
    366366        {
    367             VBoxServiceVerbose(1, "ZwQuerySystemInformation returned %x (1)\n", ret);
     367            VBoxServiceVerbose(1, "ZwQuerySystemInformation returned length 0\n");
    368368            goto skipkernelmodules;
    369369        }
     
    383383        for (unsigned i = 0; i < pSystemModules->NumberOfModules; i++)
    384384        {
     385            /* User-mode modules seem to have no flags set; skip them as we detected them above. */
     386            if (pSystemModules->Modules[i].flags == 0)
     387                continue;
     388
     389            char *pszDot = strrchr(pSystemModules->Modules[i].FullPathName, '.');
     390            if (    pszDot
     391                &&  (pszDot[1] == 'e' || pszDot[1] == 'E'))
     392                continue;   /* ignore executables for now. */
     393
    385394            /* Found it before? */
    386395            PAVLPVNODECORE pRec = RTAvlPVGet(&pNewTree, pSystemModules->Modules[i].ImageBase);
     
    401410
    402411                    /* skip \Systemroot\system32 */
    403                     char *lpPath = strstr(pSystemModules->Modules[i].FullPathName, "\\system32");
     412                    char *lpPath = strchr(&pSystemModules->Modules[i].FullPathName[1], '\\');
    404413                    if (!lpPath)
    405414                    {
     
    428437                    VBoxServiceVerbose(3, "\n     executable     = %s",             pModule->Info.szExePath );
    429438                    VBoxServiceVerbose(3, "\n     base address   = 0x%08X", (DWORD) pModule->Info.modBaseAddr );
     439                    VBoxServiceVerbose(3, "\n     flags          = 0x%08X",         pSystemModules->Modules[i].flags);
    430440                    VBoxServiceVerbose(3, "\n     base size      = %d",             pModule->Info.modBaseSize );
    431441
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