From: Vasiliy Kulikov <segoon@openwall.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Balbir Singh <bsingharora@gmail.com>
Subject: Re: [PATCH v2] taskstats: don't allow duplicate entries in listener mode
Date: Wed, 22 Jun 2011 10:54:06 +0400 [thread overview]
Message-ID: <20110622065406.GA4011@albatros> (raw)
In-Reply-To: <20110621154900.ea6b8839.akpm@linux-foundation.org>
On Tue, Jun 21, 2011 at 15:49 -0700, Andrew Morton wrote:
> On Thu, 16 Jun 2011 19:55:59 +0400
> Vasiliy Kulikov <segoon@openwall.com> wrote:
>
> > Currently a single process may register exit handlers unlimited times.
> > It may lead to a bloated listeners chain and very slow process terminations.
> > E.g. after 10KK sent TASKSTATS_CMD_ATTR_REGISTER_CPUMASKs ~300 Mb of
> > kernel memory is stolen for the handlers chain and "time id" shows 2-7
> > seconds instead of normal 0.003. It makes it possible to exhaust all
> > kernel memory and to eat much of CPU time by triggerring numerous exits
> > on a single CPU.
> >
> > The patch limits the number of times a single process may register
> > itself on a single CPU to one.
> >
> > One little issue is kept unfixed - as taskstats_exit() is called before
> > exit_files() in do_exit(), the orphaned listener entry (if it was not
> > explicitly deregistered) is kept until the next someone's exit() and
> > implicit deregistration in send_cpu_listeners(). So, if a process
> > registered itself as a listener exits and the next spawned process gets
> > the same pid, it would inherit taskstats attributes.
>
> ow. That's an unprivileged operation, isn't it?
Yes.
Thanks,
--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments
prev parent reply other threads:[~2011-06-22 6:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 15:55 Vasiliy Kulikov
2011-06-21 22:49 ` Andrew Morton
2011-06-22 6:54 ` Vasiliy Kulikov [this message]
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=20110622065406.GA4011@albatros \
--to=segoon@openwall.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=bsingharora@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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®