Re: A question about PROT_NONE on Sparc and Sparc64

[email protected]
Newsgroups gmane.linux.ports.sparc,gmane.linux.ports.ultrapenguin,gmane.linux.kernel
Message-ID <[email protected]>
On Tue, Jun 29, 2004 at 10:17:11PM -0700, David S. Miller wrote:

> > In include/asm-sparc/pgtsrmmu.h, there's:
> > 
> > #define SRMMU_PAGE_NONE    __pgprot(SRMMU_VALID | SRMMU_CACHE | \
> > 				    SRMMU_PRIV | SRMMU_REF)
> > #define SRMMU_PAGE_RDONLY  __pgprot(SRMMU_VALID | SRMMU_CACHE | \
> > 				    SRMMU_EXEC | SRMMU_REF)
> > 
> > This one bothers me.  The difference is that PROT_NONE pages are not
> > accessible to userspace, and not executable.
> > 
> > So userspace will get a fault if it tries to read a PROT_NONE page.
> > 
> > But what happens when the kernel reads one?  Don't those bits mean
> > that the read will succeed?  I.e. write() on a PROT_NONE page will
> > succeed, instead of returning EFAULT?
> > 
> > If so, this is a bug.  A minor bug, perhaps, but nonetheless I wish to
> > document it.
> 
> Yes this one is a bug and not intentional.
> 
> Keith W., we need to fix this.  Probably the simplest fix is just to
> drop the SRMMU_VALID bit.

Ok, I'll try this approach and see what happens.

-- 
Keith M Wesolowski
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.