lkml.org 
[lkml]   [2006]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] remove MNT_NOEXEC check for PROT_EXEC mmaps
Hi.

Valdis.Kletnieks@vt.edu wrote:
>> 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?
> 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....
It is not really the same - the app is not trying to
create an "executable" file on a noexec filesystem.
PROT_EXEC never required the exec permission on a file
btw. The MAP_PRIVATE mmap roughly means a read of the
file into the memory, where the program can do anything
with its data, including an execution. Does the R/O
filesystem disallow PROT_WRITE for MAP_PRIVATE? Haven't
tried, but I hope it doesn't.

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

\
 
 \ /
  Last update: 2006-09-25 06:37    [W:0.344 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site