Re: make PROT_WRITE imply PROT_READ

From: Bodo Eggert
Date: Sun Jul 02 2006 - 18:03:42 EST


On Sun, 2 Jul 2006, Alan Cox wrote:
> Ar Sad, 2006-07-01 am 15:19 +0200, ysgrifennodd Bodo Eggert:

> > > unpredictably depending on the precise ordering of events on a clean
> > > page.
> >
> > You asked for a fault, and as long as the hardware supports it, you'll
> > get one (and you're supposed to). If the hardware doesn't support read
> > faults on mapped pages, you may not get all the read faults you want. The
> > proposed patch makes the situation worse by disabeling the _requested_
> > failures even in situations where it can be done.
>
> The later patch as posted has no effect on such platforms

I'm talking about the affected platforms.

> because it
> does not touch anything but the architecture code. Without that its
> random what happens because the CPU cannot enforce write only but the
> fault handler tries to. That means if you fault reading because the page
> is not present you may get a fault while if you access a page which is
> present you won't get a fault.

IMO it's the best we can get, even if the results are ...

> That gets quite random and has bizarre effects.

OTOH, there is not much difference between randomly wrong and consistently
wrong, so I shall be happy either way (as if it would even matter).
--
'Calm down -- it's only ones and zeros.'
-
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/