From: Pavel Machek <pavel@ucw.cz>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: jmorris@namei.org, linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [TOMOYO 1/2] tomoyo: add Documentation/tomoyo.txt
Date: Sun, 3 May 2009 23:56:15 +0200 [thread overview]
Message-ID: <20090503215615.GA1368@ucw.cz> (raw)
In-Reply-To: <200905012207.BFC60616.QStOHOMJFOLFFV@I-love.SAKURA.ne.jp>
On Fri 2009-05-01 22:07:31, Tetsuo Handa wrote:
> Sorry for delayed response.
>
> Pavel Machek wrote:
> > 2.5 Memory Allocation Rules
> >
> > In TOMOYO Linux, memory allocated for holding access permissions and
> > words are never freed. There is no way except rebooting the system
> > that can free unneeded memory.
> >
> > But don't worry. The policy seldom changes after you start production
> > mode. By tuning policy before starting production mode, you can reduce
> > memory usage to (usually) less than 1 MB.
> >
> > ....does that mean that it leaks memory by design?
>
> This is memory leak, but *controlled* memory allocation with a strategy for
> avoiding memory fragmentation and reducing memory usage. kstrdup()ing string
> data produces partially unused memory block since string data's length is
> unlikely power of two. Therefore, TOMOYO allocates memory in PAGE_SIZE bytes
> block and embeds string data as much as possible.
> TOMOYO does not continue allocating forever.
The document above says otherwise. 'There is no way except rebooting
the system that can free unneeded memory' certainly looks like memory
leak. Plus it sounds like if you change the policy, it will not free
the old one, either.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-05-03 21:56 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 13:31 [TOMOYO 0/2] Final patches for kenrel 2.6.30 Tetsuo Handa
2009-04-08 13:31 ` [TOMOYO 1/2] tomoyo: add Documentation/tomoyo.txt Tetsuo Handa
2009-04-10 12:26 ` Peter Dolding
2009-04-10 17:10 ` Pavel Machek
2009-04-13 2:04 ` Tetsuo Handa
2009-04-29 13:13 ` Pavel Machek
2009-05-01 10:24 ` Pavel Machek
2009-05-01 13:07 ` Tetsuo Handa
2009-05-03 21:56 ` Pavel Machek [this message]
2009-05-04 6:24 ` Tetsuo Handa
2009-05-06 12:16 ` Tetsuo Handa
2009-05-07 11:42 ` [TOMOYO] Add garbage collector support Tetsuo Handa
2009-05-08 1:43 ` James Morris
2009-05-08 2:10 ` Tetsuo Handa
2009-05-08 8:26 ` James Morris
2009-05-08 9:22 ` Tetsuo Handa
2009-05-08 9:32 ` Pavel Machek
2009-05-14 12:08 ` [PATCH] TOMOYO: Add garbage collector support. (v2) Tetsuo Handa
2009-05-15 1:49 ` James Morris
2009-05-16 12:07 ` Tetsuo Handa
2009-05-25 0:37 ` Tetsuo Handa
2009-05-25 0:39 ` Tetsuo Handa
2009-05-25 0:41 ` Tetsuo Handa
2009-05-27 0:16 ` Paul E. McKenney
2009-05-27 1:25 ` Tetsuo Handa
2009-05-27 4:12 ` Paul E. McKenney
2009-06-01 13:27 ` Tetsuo Handa
2009-06-02 0:11 ` Serge E. Hallyn
2009-06-02 0:30 ` Tetsuo Handa
2009-06-02 1:03 ` Serge E. Hallyn
2009-06-02 1:16 ` Tetsuo Handa
2009-06-02 3:35 ` Paul E. McKenney
2009-04-08 13:31 ` [TOMOYO 2/2] Hello Tetsuo Handa
2009-04-10 11:55 ` Tetsuo Handa
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=20090503215615.GA1368@ucw.cz \
--to=pavel@ucw.cz \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
/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