lkml.org 
[lkml]   [2004]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: A question about PROT_NONE on ARM and ARM26
Nicolas Pitre wrote:
> > cmp r0, #(TASK_SIZE - (1<<24))
> >
> > I.e. just compare against the largest constant that can be
> > represented. For accesses to the last part of userspace, it's a
> > penalty of 4 instructions -- but it might work out to be a net gain.
>
> Maybe not. The user stack is located at the top so any user buffer
> allocated on the stack would be penalized.

I agree. I don't know if it would work out to be a net gain on
average or a net loss.

It saves a couple of instructions, but when it fails the cost is only
a few instructions anyway.

Probably for get_user & put_user, the common case _is_ to be on the
user's stack, so Russell's code would be better.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.069 / U:1.516 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site