VirtualBox

Changeset 90825 in vbox


Ignore:
Timestamp:
Aug 23, 2021 10:48:26 PM (3 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h: RT_VALID_PTR now only recognize kernel address in linux/r0.

File:
1 edited

Legend:

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

    r90823 r90825  
    43254325# else /* !IN_RING3 */
    43264326#  if defined(RT_OS_LINUX) /* May use 5-level paging (see Documentation/x86/x86_64/mm.rst). */
    4327 #   define RT_VALID_PTR(ptr)    (   (uintptr_t)(ptr) + 0x200000 >= 0x201000U /* one invalid page at the bottom and 2MB at the top */ \
     4327#   if 1 /* User address are no longer considered valid in kernel mode (SMAP, etc). */
     4328#    define RT_VALID_PTR(ptr)   ((uintptr_t)(ptr) - 0xff00000000000000ULL < 0x00ffffffffe00000ULL) /* 2MB invalid space at the top */
     4329#   else
     4330#    define RT_VALID_PTR(ptr)   (   (uintptr_t)(ptr) + 0x200000 >= 0x201000U /* one invalid page at the bottom and 2MB at the top */ \
    43284331                                 && (   ((uintptr_t)(ptr) & 0xff00000000000000ULL) == 0xff00000000000000ULL \
    43294332                                     || ((uintptr_t)(ptr) & 0xff00000000000000ULL) == 0) )
     4333#   endif
    43304334#  else
    43314335#   define RT_VALID_PTR(ptr)    (   (uintptr_t)(ptr) + 0x1000U >= 0x2000U \
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