Re: make PROT_WRITE imply PROT_READ

From: Arjan van de Ven
Date: Fri Jun 30 2006 - 04:34:20 EST


On Thu, 2006-06-29 at 20:48 -0700, Ulrich Drepper wrote:
> On 6/29/06, Arjan van de Ven <arjan@xxxxxxxxxxxxx> wrote:
> > the thing is.. you can say EXACTLY the same about PROT_EXEC.. not all
> > processors support enforcing that.. so should we just always imply
> > PROT_EXEC as well?
>
> There is a fundamental difference: not setting PROT_EXEC has no
> negative side effects. You might be able to execute code and it just
> works.
>
> With PROT_READ this is not the case, there _are_ side effects which are visible.

there are side effects which are visible with PROT_EXEC too, and even
the same kind...

with PROT_READ you may read even if you didn't specify it
with PROT_EXEC you may execute even if you didn't specifiy it

apps like JVM's forgot PROT_EXEC and break when the hardware enforces it
apps that forget PROT_READ break when the kernel/hardware enforce it

not too much difference....


-
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/