Re: verify kernel virtual address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/12/12 Usman S. Ansari <uansari@xxxxxxxxx>:
> 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 ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux