diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2012-05-31 19:26:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-31 20:49:31 -0400 |
commit | e6315bb154e778391ce64b194756bd3d108dadf6 (patch) | |
tree | 6b0df724ed5e52058f61261d93f807ea0ee77d11 /include/linux/ipc_namespace.h | |
parent | 5b5c4d1a1440e94994c73dddbad7be0676cd8b9a (diff) |
mqueue: revert bump up DFLT_*MAX
Mqueue limitation is slightly naieve parameter likes other ipcs because
unprivileged user can consume kernel memory by using ipcs.
Thus, too aggressive raise bring us security issue. Example, current
setting allow evil unprivileged user use 256GB (= 256 * 1024 * 1024*1024)
and it's enough large to system will belome unresponsive. Don't do that.
Instead, every admin should adjust the knobs for their own systems.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Doug Ledford <dledford@redhat.com>
Acked-by: Joe Korty <joe.korty@ccur.com>
Cc: Amerigo Wang <amwang@redhat.com>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/ipc_namespace.h')
-rw-r--r-- | include/linux/ipc_namespace.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 6e1dd08194fd..2488535a32a3 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -118,12 +118,12 @@ extern int mq_init_ns(struct ipc_namespace *ns); | |||
118 | #define DFLT_QUEUESMAX 256 | 118 | #define DFLT_QUEUESMAX 256 |
119 | #define HARD_QUEUESMAX 1024 | 119 | #define HARD_QUEUESMAX 1024 |
120 | #define MIN_MSGMAX 1 | 120 | #define MIN_MSGMAX 1 |
121 | #define DFLT_MSG 64U | 121 | #define DFLT_MSG 10U |
122 | #define DFLT_MSGMAX 1024 | 122 | #define DFLT_MSGMAX 10 |
123 | #define HARD_MSGMAX 65536 | 123 | #define HARD_MSGMAX 65536 |
124 | #define MIN_MSGSIZEMAX 128 | 124 | #define MIN_MSGSIZEMAX 128 |
125 | #define DFLT_MSGSIZE 8192U | 125 | #define DFLT_MSGSIZE 8192U |
126 | #define DFLT_MSGSIZEMAX (1024*1024) | 126 | #define DFLT_MSGSIZEMAX 8192 |
127 | #define HARD_MSGSIZEMAX (16*1024*1024) | 127 | #define HARD_MSGSIZEMAX (16*1024*1024) |
128 | #else | 128 | #else |
129 | static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } | 129 | static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; } |