Re: [TOMOYO 03/15](repost) Memory and pathname management functions.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <jmorris@...>
Cc: <linux-kernel@...>, <linux-security-module@...>, <chrisw@...>
Date: Wednesday, October 3, 2007 - 7:12 am

Hello.

James Morris wrote:

Difference between tmy_alloc() and kmalloc() are

  tmy_alloc() allows administrator know "how much memory is used by TOMOYO Linux modules"
  via /sys/kernel/security/tomoyo/meminfo interface.
  This feature was requested by TOMOYO Linux users.
  /proc/slabinfo can show how much memory is used by all modules,
  but it cannot show how much memory is used by TOMOYO Linux modules.

  tmy_alloc() can indicate memory-leaking bug and can avoid double-kfree() bug
  by keeping the pointer returned by kmalloc() in a local "cache_list" list.

  tmy_alloc() also keeps the size of memory allocated by kmalloc() in "cache_list" list
  so that administrator can know "how much memory is used by TOMOYO Linux modules".
  Calling ksize() after kmalloc() in tmy_alloc() and
  calling ksize() before kfree() in tmy_free() might be better
  if double-kfree-checks and memory-leaking-checks (i.e. "tmy_cachep") are unneeded.

Regards.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [TOMOYO 03/15](repost) Memory and pathname management fu..., Tetsuo Handa, (Wed Oct 3, 7:12 am)
[TOMOYO 14/15](repost) LSM expansion for TOMOYO Linux., Kentaro Takeda, (Tue Oct 2, 3:39 am)
[TOMOYO 13/15](repost) Conditional permission support., Kentaro Takeda, (Tue Oct 2, 3:39 am)
[TOMOYO 12/15](repost) LSM adapter for TOMOYO., Kentaro Takeda, (Tue Oct 2, 3:38 am)
[TOMOYO 08/15](repost) Argv[0] access control functions., Kentaro Takeda, (Tue Oct 2, 3:35 am)
[TOMOYO 07/15](repost) File access control functions., Kentaro Takeda, (Tue Oct 2, 3:34 am)
[TOMOYO 06/15](repost) Auditing interface., Kentaro Takeda, (Tue Oct 2, 3:33 am)
Re: [TOMOYO 05/15](repost) Domain transition handler functio..., YOSHIFUJI Hideaki / , (Wed Oct 3, 7:43 am)
Sleeping in RCU list traversal, Tetsuo Handa, (Sun Oct 7, 6:38 am)
Re: [TOMOYO 05/15](repost) Domain transition handler functio..., YOSHIFUJI Hideaki / , (Wed Oct 3, 10:32 am)
Re: [TOMOYO 05/15](repost) Domain transition handler functio..., YOSHIFUJI Hideaki / , (Wed Oct 3, 9:11 am)
Re: [TOMOYO 05/15](repost) Domain transition handler functio..., YOSHIFUJI Hideaki / , (Tue Oct 2, 9:00 am)