Re: [CHECKER] amusing copy_from_user bug

From: David S. Miller (davem@redhat.com)
Date: Tue Apr 10 2001 - 13:07:06 EST


Petru Paler writes:
> On Tue, Apr 10, 2001 at 06:41:28AM -0400, Jakub Jelinek wrote:
> > some architectures don't care at all, because verify_area is a noop
> > (sparc64).
>
> Why (and how) is this?

On sparc64, the user lives in an entirely different address space.
The user cannot even generate addresses in kernel space. Basically,
addresses are prefix'd by an 8-bit tag called an ASI (Address Space
Identifier), which tells the cpu which TLB context to use etc.
When running in user space or accessing user space in kernel mode
we make the cpu use the special userspace ASI.

In fact the user can be given the complete 32-bit or 64-bit virtual
address space, the kernel takes up none of it.

Later,
David S. Miller
davem@redhat.com
-
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/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:14 EST