Re: How can I verify a memory address exist?

From: Vamsi Krishna S . (
Date: Wed Nov 13 2002 - 03:13:42 EST

On Wed, Nov 13, 2002 at 12:48:44AM +0000, Rusty Lynch wrote:
> Is there a kernel function to find out if a given memory address exist?
I think you are trying to validate addresses to be passed into kprobes.
In that context, you need to check if the given address is a kernel
space code address.

Take a look at kernel_text_address() functions in
arch/i386/kernel/traps.c which do this. Unfortunately, they are defined
static inline, so, they can't be used outside of traps.c. You may
want to export that function from kernel and use it in your driver.


Vamsi Krishna S.
Linux Technology Center,
IBM Software Lab, Bangalore.
Ph: +91 80 5044959
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Nov 15 2002 - 22:00:28 EST