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 11:09:40 +1000
Cc: kdb@xxxxxxxxxxx
In-reply-to: Your message of "Tue, 11 Oct 2005 15:28:18 +0200." <20051011132818.GA17868@suse.de>
Sender: kdb-bounce@xxxxxxxxxxx
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 got this crash this morning
>with our SP3 kernel. It seems there are alot of places where the pointer
>is not checked before dereferencing it.

Sometimes it is not worth checking all the addresses in every kdb
routine.  You can just use the addresses and let kdb recover from the
error.

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