Re: [TOMOYO 05/15](repost) Domain transition handler functions.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tetsuo Handa
Date: Thursday, October 4, 2007 - 5:57 am

About use of singly-linked list:

What my SLL (singly-linked list) holds is bit different from other lists.

Almost all lists hold list of elements (e.g. buffer) that are used *temporarily*.
Thus, adding to the list and removing from the list are essential.

My SLL holds ACL (access control list) entries that are used *permanently*
(i.e. throughout the kernel's lifetime).
These ACL entries are policy used for MAC (mandatory access control).
You don't change MAC's policy without clear reason, do you?
Therefore, ACL entries of MAC's policy seldom need to be removed.

So I wonder
"Remodeling the mechanism of holding ACL entries to support removal of individual entry
 worth the cost of reference-counter manipulation and the risk of dead-pointers?"

Your next question would be
"Why are you using SLL for holding elements that are used *permanently*?"
"Why not allocate a large memory block and hold all elements in that block?"
Yes, you are right. But I can't do so.
The reason is explained in "policy file handling" at http://lkml.org/lkml/2007/10/2/56 .



About use of list that can't remove elements:

I think that many of you are misunderstanding about
"When entries are automatically appended to a list".

If you run the system in "learning mode" *forever*,
it will consume all memory; so DoS attacks are possible.

But please be aware that entries are automatically appended
only while you are running the system in "learning mode".
Also, there is a safeguard mechanism that controls upper limit.
These lists consume less than some hundreds KB
for embedded systems and/or targeted protection of PC systems,
less than 1 MB for complete protection of PC systems.
You can see how much memory is used for holding ACL entries
via /sys/kernel/security/tomoyo/meminfo interface
and you will find that these lists won't consume all memory in your system.

When you are running the system in "enforcing mode",
no entries are appended automatically; so DoS attacks are impossible.

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

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