Re: make PROT_WRITE imply PROT_READ
From: Alan Cox
Date: Sun Jul 02 2006 - 05:38:28 EST
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 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.
That gets quite random and has bizarre effects.
Alan
-
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/