From: kosaki.motohiro@gmail.com
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Amerigo Wang <amwang@redhat.com>,
"Serge E. Hallyn" <serue@us.ibm.com>, Jiri Slaby <jslaby@suse.cz>,
Doug Ledford <dledford@redhat.com> (commit_signer:5/9=56%),
"Eric W. Biederman" <ebiederm@xmission.com>
(commit_signer:2/9=22%),
Joe Korty <joe.korty@ccur.com> (commit_signer:2/9=22%),
David Howells <dhowells@redhat.com> (commit_signer:2/9=22%)
Subject: [resend][PATCH 1/3] mqueue: revert bump up DFLT_*MAX
Date: Fri, 9 Dec 2011 17:35:55 -0500 [thread overview]
Message-ID: <1323470163-8723-1-git-send-email-kosaki.motohiro@gmail.com> (raw)
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
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>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Jiri Slaby <jslaby@suse.cz>
---
include/linux/ipc_namespace.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index e2bac00..2488535 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -118,13 +118,13 @@ extern int mq_init_ns(struct ipc_namespace *ns);
#define DFLT_QUEUESMAX 256
#define HARD_QUEUESMAX 1024
#define MIN_MSGMAX 1
-#define DFLT_MSG 64U
-#define DFLT_MSGMAX 1024
+#define DFLT_MSG 10U
+#define DFLT_MSGMAX 10
#define HARD_MSGMAX 65536
#define MIN_MSGSIZEMAX 128
#define DFLT_MSGSIZE 8192U
-#define DFLT_MSGSIZEMAX (1024*1024)
-#define HARD_MSGSIZEMAX (16*1024*1024)
+#define DFLT_MSGSIZEMAX 8192
+#define HARD_MSGSIZEMAX (16*1024*1024)
#else
static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
#endif
--
1.7.1
next reply other threads:[~2011-12-09 22:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-09 22:35 kosaki.motohiro [this message]
2011-12-09 22:35 ` [resend][PATCH 2/3] mqueue: don't use kmalloc with KMALLOC_MAX_SIZE kosaki.motohiro
2011-12-09 22:35 ` [resend][PATCH 3/3] mqueue: separate mqueue default value from maximum value kosaki.motohiro
2011-12-18 18:29 ` [resend][PATCH 1/3] mqueue: revert bump up DFLT_*MAX KOSAKI Motohiro
2011-12-18 18:29 ` KOSAKI Motohiro
2011-12-18 18:38 ` Andrew Morton
2012-03-14 21:28 ` Doug Ledford
2012-03-14 21:38 ` Andrew Morton
2012-03-14 21:45 ` Doug Ledford
2012-03-19 18:02 ` KOSAKI Motohiro
2012-03-19 18:16 ` Doug Ledford
2012-03-19 20:49 ` KOSAKI Motohiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323470163-8723-1-git-send-email-kosaki.motohiro@gmail.com \
--to=kosaki.motohiro@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=amwang@redhat.com \
--cc=dhowells@redhat.com \
--cc=dledford@redhat.com \
--cc=ebiederm@xmission.com \
--cc=joe.korty@ccur.com \
--cc=jslaby@suse.cz \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®