2008/12/12 Usman S. Ansari <[email protected]>:
> I am looking for a macro, which can verify, if given address is valid kernel 
> virtual address. Does something like this exist ?
>

I am not sure if the macro exists, but, since the Kernel occupies the
first half of the virtual address space, the following macro would
work for a Kernel meant for a 32-bit architecture.

#define KERNEL_VOK(addr) ((addr) < (0x80000000U))

Assuming that the addr passed is an unsigned quantity. This should be
easily extensible for other architectures.

-- 
Vimal

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to