linux-mips
[Top] [All Lists]

Re: mips64 _access_ok fix

To: linux-mips@linux-mips.org
Subject: Re: mips64 _access_ok fix
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Thu, 11 Sep 2003 13:43:23 +0900 (JST)
In-reply-to: <20030911.124350.41627177.nemoto@toshiba-tops.co.jp>
Organization: TOSHIBA Personal Computer System Corporation
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20030911.124350.41627177.nemoto@toshiba-tops.co.jp>
Sender: linux-mips-bounce@linux-mips.org
>>>>> On Thu, 11 Sep 2003 12:43:50 +0900 (JST), Atsushi Nemoto 
>>>>> <anemo@mba.ocn.ne.jp> said:
anemo> The mips64 _access_ok macro in 2.4 tree returns 0 if 'addr' +
anemo> 'size' == TASK_SIZE.

anemo> Also, __ua_size macro returus 0 if 'size' is negative constant.
anemo> I think we must not skip checking negative constant.

anemo> Here is a fix.  For 2.6 tree, only _access_ok fix will be
anemo> needed (__ua_size is already fixed).

I know this fix is not complete.  __access_ok(0, 0, __access_mask)
will return 0.

I could not find out good expression (i.e. no conditional branch) to
handle this case.

I suppose nobody do take care of this since addr 0 is invalid pointer
anyway.

---
Atsushi Nemoto

<Prev in Thread] Current Thread [Next in Thread>