Messages in this thread | | | Date | Wed, 30 Jun 2004 08:21:07 -0700 | From | wesolows@foobazco ... | Subject | Re: A question about PROT_NONE on Sparc and Sparc64 |
| |
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 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/
| |