Rusty Russell <[EMAIL PROTECTED]> wrote:
> static inline bool range_over_limit(unsigned long start,
> unsigned long len,
> unsigned long limit)
I'm still not sure the name is entirely clear, but it's better. I'd still
stick the word "check" in there personally, perhaps check_range_limit(), but
that's just my preference.
> PS. Previously this identical function was called __range_ok() (and
> returned 0 if it was not ok...)
Ummm... Didn't __range_ok() implicitly involve get_addr_limit() rather than
taking an explicit range? Certainly i386 thinks so:
#define __range_ok(addr,size) ({ \
unsigned long flag,roksum; \
__chk_user_ptr(addr); \
asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
:"=&r" (flag), "=r" (roksum) \
:"1" (addr),"g" ((int)(size)),"rm"
(current_thread_info()->addr_limit.seg)); \
flag; })
David
-
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html