[Bug 1155695] Re: mq_overview(7) contains outdated, inaccurate fs.mqueue.queues_max limit description
Michael Kerrisk
mtk.manpages at gmail.com
Mon Mar 18 13:49:07 UTC 2013
Arto, it's the simple fix, but before I push it further, does the
attached patch fix your problem?
At this point (ii.e., since LInux 3.8), I suspect that the limit that
the kernel code currently tries to enforce on queues_max is anyway
meaningless. Unprivileged users can nowadays use
clone(CLONE_NEWUSER|CLONE_NEWIPC) to create an arbitrary number of new
IPC namespaces, each of which can be populated with queues_max MQs. So
the hard limit check doesn't really limit users at all (though, as
you've discovered, it does inconvenience them).
** Patch added: "mqueue_limit.patch"
https://bugs.launchpad.net/ubuntu/+source/manpages/+bug/1155695/+attachment/3581440/+files/mqueue_limit.patch
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to manpages in Ubuntu.
https://bugs.launchpad.net/bugs/1155695
Title:
mq_overview(7) contains outdated, inaccurate fs.mqueue.queues_max
limit description
Status in “manpages” package in Ubuntu:
Confirmed
Bug description:
The manpages 3.40-0.1ubuntu3 package in Ubuntu 12.10 contains an
mq_overview(7) man page with outdated, severely inaccurate information
regarding the /proc/sys/fs/mqueue/queues_max kernel limit, as follows:
"The default value for queues_max is 256; it can be changed to any
value in the range 0 to INT_MAX."
This used to be true in Linux 3.2.x, as shipped in Ubuntu 12.04.
However, it is no longer true with Linux 3.5.x, as shipped in 12.10.
For some inexplicable reason, upstream lowered the hard upper limit
for POSIX message queues (fs.mqueue.queues_max) from INT_MAX to 1024
in the 3.5 kernel:
# sysctl -w fs.mqueue.queues_max=1025
sysctl: setting key "fs.mqueue.queues_max": Invalid argument
fs.mqueue.queues_max = 1025
You can verify the new, post-3.5 limit at:
http://lxr.free-electrons.com/source/ipc/mq_sysctl.c?v=3.5#L40
http://lxr.free-electrons.com/source/include/linux/ipc_namespace.h?v=3.5#L121
Please amend the man page so that the new limit is correctly
documented. The undocumented change from INT_MAX queues to a mere 1024
queues is rather harsh, and it took quite some investigation to pin
this down as an upstream kernel change.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/manpages/+bug/1155695/+subscriptions
More information about the foundations-bugs
mailing list