Re: question about include/asm-ppc/uaccess.h on linux 2.6.0-test10
> just a quick question. Is it the right mailing list to ask something related to the kernel 2.6?
Not quite. linuxppc-dev would be more appropriate.
> I found a strange implementation of the #define __access_ok in the specified file.
> I cannot think it is a bug and I like to know where I can post issue like this.
If you don't think it's a bug, why bother?
>
> By the way, the problem is as follow
> The implementation of this define is
> #define __access_ok(addr,size) \
> ((addr) <= current->thread.fs.seg \
> && ((size) == 0 || (size) - 1 <= current->thread.fs.seg - (addr)))
>
> Il looks like it checking if a given pointer is in the user address space (stack) but,
> as far as I know, on the ppc the stack is growing from the highest addresses to the
> lowest.
And that seems to be what (addr) <= current->thread.fs.seg is checking,
no? The access is OK if the address in question is below the top of the
user stack, if the stack grows downwards.
Assuming current->thread.fs.seg marks the user stack area, of course.
Michael
Reply to: