Re: [PATCH][2.5.47]Add exported valid_kernel_address()

Rusty Lynch (rusty@linux.co.intel.com)
Wed, 13 Nov 2002 13:24:32 -0800


I had a need for it in a sample kprobes driver where I wanted to verify that
some address
was a valid kernel space address before I handed a probe to kprobes.

So I would do something like:

if (!valid_kernel_address(probe->addr)) {
ret = -EINVAL;
goto out;
}

register_kprobe(probe);

and then kpboes will go and attempt to set *(probe->addr) = BREAK_POINT;

-rustyl
----- Original Message -----
From: "Andi Kleen" <ak@suse.de>
To: "Arjan van de Ven" <arjanv@redhat.com>
Cc: <linux-kernel@vger.kernel.org>; <rusty@linux.co.intel.com>
Sent: Wednesday, November 13, 2002 1:14 PM
Subject: Re: [PATCH][2.5.47]Add exported valid_kernel_address()

> Arjan van de Ven <arjanv@redhat.com> writes:
>
> > it is customary that people who ask for an export explain why they need
> > it.... would you mind explaining that ?
>
> For modular lkcd I guess. Make a lot of sense to do it modular.
>
> -Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/