aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/realpath.c
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>2009-06-07 23:37:39 -0400
committerJames Morris <jmorris@namei.org>2009-06-08 19:30:24 -0400
commitc3fa109a5894077d1eaf8731ea741a15dd117b3c (patch)
treea3d5f58ea878868b48a1493055e6f2cb6dd3c9de /security/tomoyo/realpath.c
parent5bf1692f65c12a8aa359dc883468284ffc3c4587 (diff)
TOMOYO: Add description of lists and structures.
This patch adds some descriptions of lists and structures. This patch contains no code changes. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/realpath.c')
-rw-r--r--security/tomoyo/realpath.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index 3948f6b56ae2..5f2e33263371 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -265,7 +265,16 @@ static unsigned int tomoyo_quota_for_savename;
265 */ 265 */
266#define TOMOYO_MAX_HASH 256 266#define TOMOYO_MAX_HASH 256
267 267
268/* Structure for string data. */ 268/*
269 * tomoyo_name_entry is a structure which is used for linking
270 * "struct tomoyo_path_info" into tomoyo_name_list .
271 *
272 * Since tomoyo_name_list manages a list of strings which are shared by
273 * multiple processes (whereas "struct tomoyo_path_info" inside
274 * "struct tomoyo_path_info_with_data" is not shared), a reference counter will
275 * be added to "struct tomoyo_name_entry" rather than "struct tomoyo_path_info"
276 * when TOMOYO starts supporting garbage collector.
277 */
269struct tomoyo_name_entry { 278struct tomoyo_name_entry {
270 struct list_head list; 279 struct list_head list;
271 struct tomoyo_path_info entry; 280 struct tomoyo_path_info entry;
@@ -279,10 +288,10 @@ struct tomoyo_free_memory_block_list {
279}; 288};
280 289
281/* 290/*
282 * The list for "struct tomoyo_name_entry". 291 * tomoyo_name_list is used for holding string data used by TOMOYO.
283 * 292 * Since same string data is likely used for multiple times (e.g.
284 * This list is updated only inside tomoyo_save_name(), thus 293 * "/lib/libc-2.5.so"), TOMOYO shares string data in the form of
285 * no global mutex exists. 294 * "const struct tomoyo_path_info *".
286 */ 295 */
287static struct list_head tomoyo_name_list[TOMOYO_MAX_HASH]; 296static struct list_head tomoyo_name_list[TOMOYO_MAX_HASH];
288 297