kdb
[Top] [All Lists]

Re: kdb version of acces_ok

To: Olaf Hering <olh@xxxxxxx>
Subject: Re: kdb version of acces_ok
From: Keith Owens <kaos@xxxxxxx>
Date: Wed, 12 Oct 2005 21:15:24 +1000
Cc: kdb@xxxxxxxxxxx
In-reply-to: Your message of "Wed, 12 Oct 2005 13:08:11 +0200." <20051012110811.GA27478@suse.de>
Sender: kdb-bounce@xxxxxxxxxxx
On Wed, 12 Oct 2005 13:08:11 +0200, 
Olaf Hering <olh@xxxxxxx> wrote:
> On Wed, Oct 12, Keith Owens wrote:
>
>> On Tue, 11 Oct 2005 15:28:18 +0200, 
>> Olaf Hering <olh@xxxxxxx> wrote:
>> >
>> >What is the kdb equivalent of access_ok()?
>> 
>> kdb_getarea() and kdb_getarea_size(), you would normally use
>> kdb_getarea().  It uses __copy_to_user_inatomic() to catch invalid
>> addresses and recover.
>
>I was hoping for a generic function that checks wether a given memory
>range is valid.
>
>In my case, it should have checked sizeof(struct task_struct) at addr
>before calling kdba_bt_address().

There is kdba_verify_rw(), I can always add a kdba_verify_r() function
as well.

>I will add such a check to kdba_bt_stack_ppc now. How do other archs
>deal with 'bt 72' (which should have been 'btp 72')?

ia64 does not allow bt <address>, because of the strange ia64 unwind
data.  Other architectures such as i386 and x86_64 just use the
address, if it is invalid then you get an oops, kdb recovers from the
oops and continues.

---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.
<Prev in Thread] Current Thread [Next in Thread>