aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/common.h
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2011-06-26 10:21:50 -0400
committerJames Morris <jmorris@namei.org>2011-06-28 19:31:22 -0400
commitb22b8b9fd90eecfb7133e56b4e113595f09f4492 (patch)
tree6e15e497a05aa219c598b8b8690fbdb5ae5f0b0a /security/tomoyo/common.h
parent2c47ab9353242b0f061959318f83c55360b88fa4 (diff)
TOMOYO: Rename meminfo to stat and show more statistics.
Show statistics such as last policy update time and last policy violation time in addition to memory usage. 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/common.h')
-rw-r--r--security/tomoyo/common.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/security/tomoyo/common.h b/security/tomoyo/common.h
index b54455dfe0ca..7984a0ed548b 100644
--- a/security/tomoyo/common.h
+++ b/security/tomoyo/common.h
@@ -133,6 +133,7 @@ enum tomoyo_path_acl_index {
133 TOMOYO_MAX_PATH_OPERATION 133 TOMOYO_MAX_PATH_OPERATION
134}; 134};
135 135
136/* Index numbers for /sys/kernel/security/tomoyo/stat interface. */
136enum tomoyo_memory_stat_type { 137enum tomoyo_memory_stat_type {
137 TOMOYO_MEMORY_POLICY, 138 TOMOYO_MEMORY_POLICY,
138 TOMOYO_MEMORY_AUDIT, 139 TOMOYO_MEMORY_AUDIT,
@@ -173,7 +174,7 @@ enum tomoyo_securityfs_interface_index {
173 TOMOYO_EXCEPTIONPOLICY, 174 TOMOYO_EXCEPTIONPOLICY,
174 TOMOYO_DOMAIN_STATUS, 175 TOMOYO_DOMAIN_STATUS,
175 TOMOYO_PROCESS_STATUS, 176 TOMOYO_PROCESS_STATUS,
176 TOMOYO_MEMINFO, 177 TOMOYO_STAT,
177 TOMOYO_SELFDOMAIN, 178 TOMOYO_SELFDOMAIN,
178 TOMOYO_AUDIT, 179 TOMOYO_AUDIT,
179 TOMOYO_VERSION, 180 TOMOYO_VERSION,
@@ -237,6 +238,16 @@ enum tomoyo_mac_category_index {
237 */ 238 */
238#define TOMOYO_RETRY_REQUEST 1 239#define TOMOYO_RETRY_REQUEST 1
239 240
241/* Index numbers for /sys/kernel/security/tomoyo/stat interface. */
242enum tomoyo_policy_stat_type {
243 /* Do not change this order. */
244 TOMOYO_STAT_POLICY_UPDATES,
245 TOMOYO_STAT_POLICY_LEARNING, /* == TOMOYO_CONFIG_LEARNING */
246 TOMOYO_STAT_POLICY_PERMISSIVE, /* == TOMOYO_CONFIG_PERMISSIVE */
247 TOMOYO_STAT_POLICY_ENFORCING, /* == TOMOYO_CONFIG_ENFORCING */
248 TOMOYO_MAX_POLICY_STAT
249};
250
240/* Index numbers for profile's PREFERENCE values. */ 251/* Index numbers for profile's PREFERENCE values. */
241enum tomoyo_pref_index { 252enum tomoyo_pref_index {
242 TOMOYO_PREF_MAX_AUDIT_LOG, 253 TOMOYO_PREF_MAX_AUDIT_LOG,
@@ -648,8 +659,8 @@ char *tomoyo_realpath_from_path(struct path *path);
648bool tomoyo_memory_ok(void *ptr); 659bool tomoyo_memory_ok(void *ptr);
649void *tomoyo_commit_ok(void *data, const unsigned int size); 660void *tomoyo_commit_ok(void *data, const unsigned int size);
650const struct tomoyo_path_info *tomoyo_get_name(const char *name); 661const struct tomoyo_path_info *tomoyo_get_name(const char *name);
651void tomoyo_read_memory_counter(struct tomoyo_io_buffer *head); 662void tomoyo_convert_time(time_t time, struct tomoyo_time *stamp);
652int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head); 663void tomoyo_update_stat(const u8 index);
653void __init tomoyo_mm_init(void); 664void __init tomoyo_mm_init(void);
654int tomoyo_path_permission(struct tomoyo_request_info *r, u8 operation, 665int tomoyo_path_permission(struct tomoyo_request_info *r, u8 operation,
655 const struct tomoyo_path_info *filename); 666 const struct tomoyo_path_info *filename);