aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorWilliam Lee Irwin III <wli@holomorphy.com>2004-08-23 21:28:18 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:28:18 -0700
commitb60e5e711ad490216cc39f0cdfac91a789d85694 (patch)
tree5f5b6d17eafaf71f697aab83e61525a8904d9d02 /ipc
parent93ff334616e5c841afdfc795362b03a7b4ec664c (diff)
downloadhistory-b60e5e711ad490216cc39f0cdfac91a789d85694.tar.gz
[PATCH] hugetlb: permit executable mappings
During the kernel summit, some discussion was had about the support requirements for a userspace program loader that loads executables into hugetlb on behalf of a major application (Oracle). In order to support this in a robust fashion, the cleanup of the hugetlb must be robust in the presence of disorderly termination of the programs (e.g. kill -9). Hence, the cleanup semantics are those of System V shared memory, but Linux' System V shared memory needs one critical extension for this use: executability. The following microscopic patch enables this major application to provide robust hugetlb cleanup. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 31a925745c25d9..530fb1f6ae1d63 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -688,6 +688,10 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
o_flags = O_RDWR;
acc_mode = S_IRUGO | S_IWUGO;
}
+ if (shmflg & SHM_EXEC) {
+ prot |= PROT_EXEC;
+ acc_mode |= S_IXUGO;
+ }
/*
* We cannot rely on the fs check since SYSV IPC does have an