From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Andrew Morton <akpm@osdl.org>
Cc: manfred@colorfullife.com, drepper@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] per-user signal pending and message queue limits
Date: Tue, 20 Apr 2004 20:13:52 -0300 [thread overview]
Message-ID: <20040420231351.GB13826@logos.cnet> (raw)
In-Reply-To: <20040420130439.23fae566.akpm@osdl.org>
On Tue, Apr 20, 2004 at 01:04:39PM -0700, Andrew Morton wrote:
> Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
> >
> > I wonder if it is a good idea to base mqueue limitation on the number of
> > > message queues and not take into account how big they are.
> > > 64 message queues with 1 byte msgsize and 1 maxmsg is certainly quite
> > > harmless and the system could have even more queues for such a user,
> > > while 64 message queues with 16K msgsize (current default) and 40 maxmsg
> > > (also default) eats ~ 40M of kernel memory.
> >
> > Indeed, it seems more correct to account for something else than "nr of message queues".
> >
> > Memory occupied sounds better, yeap?
> >
> > I'm sending the patch anyway, we can use the same RLIMIT_MSGQUEUE and user->msg_queues later
> > on with another meaning.
> >
> > Here it goes the update version, Andrew:
>
> But we still have the global mq and signal limits? These permit local
> denials of service attacks. See
> http://seclists.org/lists/linux-kernel/2004/Apr/2065.html
Right, but one user can't starve the whole system anymore. You need 4 users starving
their quotas for it to become a local denial of service attack. But you are right,
we can remove the global pending signal. I will prepare and test
another patch tomorrow morning.
As for mqueues, currently root is allowed to allocate infinite number of mqueues. We
want to remove that and calculate on the amount of memory allocated. I'll also think
about it and come with an implementation tomorrow morning.
> The major advantage of your work is that we can now remove those limits.
> You'll be needing a 2.4 backport ;)
Yeap. :)
And we also need to do the userspace part. ulimit is part of bash, so
probably all shell's should be awared of this? I never looked
how "ulimit" utility works.
next prev parent reply other threads:[~2004-04-20 23:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-19 21:28 Marcelo Tosatti
2004-04-19 22:49 ` Jakub Jelinek
2004-04-20 14:13 ` Marcelo Tosatti
2004-04-20 18:05 ` Manfred Spraul
2004-04-20 20:04 ` Andrew Morton
2004-04-20 23:13 ` Marcelo Tosatti [this message]
2004-04-20 23:34 ` Andrew Morton
2004-04-21 20:34 ` Marcelo Tosatti
2004-04-22 5:33 ` Manfred Spraul
2004-04-27 14:54 ` Marcelo Tosatti
2004-04-27 18:09 ` Manfred Spraul
2004-04-28 17:09 ` Marcelo Tosatti
2004-04-28 21:03 ` Andrew Morton
2004-04-29 1:33 ` Chris Wright
2004-04-29 12:17 ` Marcelo Tosatti
2004-04-29 19:58 ` Chris Wright
2004-05-06 0:08 ` Chris Wright
2004-05-06 12:09 ` Marcelo Tosatti
2004-05-06 12:32 ` Marcelo Tosatti
2004-05-07 0:56 ` Chris Wright
2004-04-19 22:59 ` Andrew Morton
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=20040420231351.GB13826@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=akpm@osdl.org \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.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®