VirtualBox

Changeset 2324 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 23, 2007 8:22:00 PM (18 years ago)
Author:
vboxsync
Message:

fixed PGMVerifyAccess(), we sometimes did not check the last page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r2318 r2324  
    505505             || Addr + cbSize < Addr))
    506506    {
    507         Addr += PAGE_SIZE;
    508         if (cbSize > PAGE_SIZE)
    509             cbSize -= PAGE_SIZE;
    510         else
    511             cbSize = 0;
    512 
    513507        /* Don't recursively call PGMVerifyAccess as we might run out of stack. */
    514508        for (;;)
    515509        {
     510            Addr += PAGE_SIZE;
     511            if (cbSize > PAGE_SIZE)
     512                cbSize -= PAGE_SIZE;
     513            else
     514                cbSize = 1;
    516515            rc = PGMVerifyAccess(pVM, Addr, 1, fAccess);
    517516            if (rc != VINF_SUCCESS)
    518517                break;
    519 
    520             if (cbSize <= PAGE_SIZE)
     518            if (PAGE_ADDRESS(Addr) == PAGE_ADDRESS(Addr + cbSize - 1))
    521519                break;
    522             cbSize -= PAGE_SIZE;
    523             Addr += PAGE_SIZE;
    524520        }
    525521    }
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