Re: A question about PROT_NONE on PPC and PPC64

From: Jamie Lokier
Date: Mon Jul 05 2004 - 14:13:49 EST


Hi Paul,

Gabriel Paubert tells me that PROT_NONE _might_ have the bug described
below on the PPC 4xx and 8xx architectures, because their MMUs don't
implement "Ks = Kp = 1" segments.

Can you or someone else confirm whether the potential bug occurs on
PPC 4xx/8xx?

Thanks,
-- Jamie

Paul Mackerras wrote:
> > It appears the only difference betwen PROT_READ and PROT_NONE is
> > whether _PAGE_USER is set.
> >
> > Thus PROT_NONE pages aren't readable from userspace, but it appears
> > they _are_ readable from kernel space. Is this correct?
>
> No. Kernel accesses to pages in the user portion of the address space
> (0 .. TASK_SIZE-1) are done using the user permissions. On classic
> PPC this is implemented (in part) by setting Ks = Kp = 1 in the
> segment descriptors for the user segments, which tells the hardware to
> check the access as if it was a user access even in supervisor mode.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/