VirtualBox

Changeset 27669 in vbox


Ignore:
Timestamp:
Mar 24, 2010 3:04:38 PM (15 years ago)
Author:
vboxsync
Message:

Runtime/r0drv/linux: fixed RTR0MemKernelIsValidAddr() for AMD64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/memuserkernel-r0drv-linux.c

    r21356 r27669  
    7676
    7777#elif defined(RT_ARCH_AMD64)
    78 # ifdef KERNEL_IMAGE_START
    79     return (uintptr_t)pv >= KERNEL_IMAGE_START;
     78# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11)
     79    /* Linux 2.6.0 ... 2.6.10 set PAGE_OFFSET to 0x0000010000000000.
     80     * Linux 2.6.11 sets PAGE_OFFSET to 0xffff810000000000.
     81     * Linux 2.6.33 sets PAGE_OFFSET to 0xffff880000000000. */
     82    return (uintptr_t)pv >= PAGE_OFFSET;
    8083# else
     84    /* Not correct (KERNEL_TEXT_START=0xffffffff80000000),
     85     * VMALLOC_START (0xffffff0000000000) would be better */
    8186    return (uintptr_t)pv >= KERNEL_TEXT_START;
    8287# endif
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