VirtualBox

Ignore:
Timestamp:
Jul 29, 2020 10:21:19 AM (4 years ago)
Author:
vboxsync
Message:

SUP,*: Some changes to the SUP_IOCTL_LDR_OPEN and SUP_IOCTL_LDR_LOAD interfaces adding memory protection regions for better WX compliance. Preps for linux 5.8 where we'll be using RTR0MemObjAllocPage rather than RTMemExecAlloc for images, switch from relocatable ELF files to shared objects. [build fix] bugref:9801

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPLibLdr.cpp

    r85507 r85511  
    594594        return RTErrInfoSetF(pErrInfo, rc, "RTLdrEnumSegments #2 failed");
    595595    }
    596     SegArgs.uEndRva = cbImage;
     596    SegArgs.uEndRva = (uint32_t)cbImage;
     597    AssertReturn(SegArgs.uEndRva == cbImage, VERR_OUT_OF_RANGE);
    597598    if (SegArgs.uEndRva > SegArgs.uStartRva)
    598599    {
     
    759760        {
    760761            Assert(SegArgs.uEndRva <= RTLdrSize(hLdrMod));
    761             SegArgs.uEndRva = RTLdrSize(hLdrMod);
     762            SegArgs.uEndRva = (uint32_t)CalcArgs.cbImage; /* overflow is checked later */
    762763            if (SegArgs.uEndRva > SegArgs.uStartRva)
    763764                SegArgs.iSegs++;
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