[ros-dev] Re: [ros-diffs] [weiden] 17474: added a macro IsKernelPointer() to test whether a pointer value points to the kernel address space. This is needed because on IA-64 the MSB is not necessarily set for pointers to the kernel address space.

Thomas Weidenmueller w3seek at reactos.com
Mon Aug 22 17:14:46 CEST 2005


Filip Navara wrote:
> This looks really really wrong ... the macro will incorrectly evaluate
> to TRUE for user mode pointers on 3GB kernels. I don't understand the
> purpose of the code, but why don't you just check for Ptr >=
> MM_SYSTEM_RANGE_START ?

This is true. But this macro isn't supposed to be used to check whether
a pointer is a pointer to kernel or user memory range. It should rather
be used to check whether a given value is a pointer or an offset. Maybe
"IsPointer(An)Offset" would've been a better name for it. The macro
really isn't supposed to be used to evaluate pointer ranges.

Best Regards,
Thomas



More information about the Ros-dev mailing list