Re: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps

From: Valdis . Kletnieks
Date: Sun Sep 24 2006 - 21:13:23 EST


On Sat, 23 Sep 2006 19:47:19 +0400, Stas Sergeev said:
> Hi.
>
> Ulrich Drepper wrote:
> > Definitely not. The test should stay. It does the right thing. Yes,
> > some applications might break, but this is the fault of the application.
> But why exactly? They do:
> shm_open();
> mmap(PROT_READ|PROT_WRITE|PROT_EXEC);
> and mmap fails.
> Where is the fault of an app here?

'man 2 open' reports the following error code as a possibility:
EROFS pathname refers to a file on a read-only filesystem and write
access was requested.

Are you suggesting that it's not an app's fault/problem if it tries to
open a writable file on a R/O filesystem? Because it's essentially the
same problem....

Attachment: pgp00000.pgp
Description: PGP signature