Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2005,2006,2007,2008 IBM Corporation |
| 3 | * |
| 4 | * Authors: |
| 5 | * Kylene Hall <kjhall@us.ibm.com> |
| 6 | * Reiner Sailer <sailer@us.ibm.com> |
| 7 | * Mimi Zohar <zohar@us.ibm.com> |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License as |
| 11 | * published by the Free Software Foundation, version 2 of the |
| 12 | * License. |
| 13 | * |
| 14 | * File: ima_fs.c |
| 15 | * implemenents security file system for reporting |
| 16 | * current measurement list and IMA statistics |
| 17 | */ |
Eric Paris | f850a7c | 2009-05-12 15:13:55 -0400 | [diff] [blame] | 18 | #include <linux/fcntl.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 19 | #include <linux/slab.h> |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 20 | #include <linux/module.h> |
| 21 | #include <linux/seq_file.h> |
| 22 | #include <linux/rculist.h> |
| 23 | #include <linux/rcupdate.h> |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 24 | #include <linux/parser.h> |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 25 | |
| 26 | #include "ima.h" |
| 27 | |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 28 | static int valid_policy = 1; |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 29 | #define TMPBUFLEN 12 |
| 30 | static ssize_t ima_show_htable_value(char __user *buf, size_t count, |
| 31 | loff_t *ppos, atomic_long_t *val) |
| 32 | { |
| 33 | char tmpbuf[TMPBUFLEN]; |
| 34 | ssize_t len; |
| 35 | |
| 36 | len = scnprintf(tmpbuf, TMPBUFLEN, "%li\n", atomic_long_read(val)); |
| 37 | return simple_read_from_buffer(buf, count, ppos, tmpbuf, len); |
| 38 | } |
| 39 | |
| 40 | static ssize_t ima_show_htable_violations(struct file *filp, |
| 41 | char __user *buf, |
| 42 | size_t count, loff_t *ppos) |
| 43 | { |
| 44 | return ima_show_htable_value(buf, count, ppos, &ima_htable.violations); |
| 45 | } |
| 46 | |
Alexey Dobriyan | 828c095 | 2009-10-01 15:43:56 -0700 | [diff] [blame] | 47 | static const struct file_operations ima_htable_violations_ops = { |
Arnd Bergmann | cdcd90f | 2010-07-07 23:40:15 +0200 | [diff] [blame] | 48 | .read = ima_show_htable_violations, |
| 49 | .llseek = generic_file_llseek, |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 50 | }; |
| 51 | |
| 52 | static ssize_t ima_show_measurements_count(struct file *filp, |
| 53 | char __user *buf, |
| 54 | size_t count, loff_t *ppos) |
| 55 | { |
| 56 | return ima_show_htable_value(buf, count, ppos, &ima_htable.len); |
| 57 | |
| 58 | } |
| 59 | |
Alexey Dobriyan | 828c095 | 2009-10-01 15:43:56 -0700 | [diff] [blame] | 60 | static const struct file_operations ima_measurements_count_ops = { |
Arnd Bergmann | cdcd90f | 2010-07-07 23:40:15 +0200 | [diff] [blame] | 61 | .read = ima_show_measurements_count, |
| 62 | .llseek = generic_file_llseek, |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 63 | }; |
| 64 | |
| 65 | /* returns pointer to hlist_node */ |
| 66 | static void *ima_measurements_start(struct seq_file *m, loff_t *pos) |
| 67 | { |
| 68 | loff_t l = *pos; |
| 69 | struct ima_queue_entry *qe; |
| 70 | |
| 71 | /* we need a lock since pos could point beyond last element */ |
| 72 | rcu_read_lock(); |
| 73 | list_for_each_entry_rcu(qe, &ima_measurements, later) { |
| 74 | if (!l--) { |
| 75 | rcu_read_unlock(); |
| 76 | return qe; |
| 77 | } |
| 78 | } |
| 79 | rcu_read_unlock(); |
| 80 | return NULL; |
| 81 | } |
| 82 | |
| 83 | static void *ima_measurements_next(struct seq_file *m, void *v, loff_t *pos) |
| 84 | { |
| 85 | struct ima_queue_entry *qe = v; |
| 86 | |
| 87 | /* lock protects when reading beyond last element |
| 88 | * against concurrent list-extension |
| 89 | */ |
| 90 | rcu_read_lock(); |
Dmitry Kasatkin | 089bc8e | 2013-10-10 15:56:13 +0900 | [diff] [blame] | 91 | qe = list_entry_rcu(qe->later.next, struct ima_queue_entry, later); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 92 | rcu_read_unlock(); |
| 93 | (*pos)++; |
| 94 | |
| 95 | return (&qe->later == &ima_measurements) ? NULL : qe; |
| 96 | } |
| 97 | |
| 98 | static void ima_measurements_stop(struct seq_file *m, void *v) |
| 99 | { |
| 100 | } |
| 101 | |
Roberto Sassu | 3ce1217d | 2013-06-07 12:16:30 +0200 | [diff] [blame] | 102 | void ima_putc(struct seq_file *m, void *data, int datalen) |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 103 | { |
| 104 | while (datalen--) |
| 105 | seq_putc(m, *(char *)data++); |
| 106 | } |
| 107 | |
| 108 | /* print format: |
| 109 | * 32bit-le=pcr# |
| 110 | * char[20]=template digest |
| 111 | * 32bit-le=template name size |
| 112 | * char[n]=template name |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 113 | * [eventdata length] |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 114 | * eventdata[n]=template specific data |
| 115 | */ |
| 116 | static int ima_measurements_show(struct seq_file *m, void *v) |
| 117 | { |
| 118 | /* the list never shrinks, so we don't need a lock here */ |
| 119 | struct ima_queue_entry *qe = v; |
| 120 | struct ima_template_entry *e; |
| 121 | int namelen; |
| 122 | u32 pcr = CONFIG_IMA_MEASURE_PCR_IDX; |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 123 | int i; |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 124 | |
| 125 | /* get entry */ |
| 126 | e = qe->entry; |
| 127 | if (e == NULL) |
| 128 | return -1; |
| 129 | |
| 130 | /* |
| 131 | * 1st: PCRIndex |
| 132 | * PCR used is always the same (config option) in |
| 133 | * little-endian format |
| 134 | */ |
| 135 | ima_putc(m, &pcr, sizeof pcr); |
| 136 | |
| 137 | /* 2nd: template digest */ |
Mimi Zohar | 140d802 | 2013-03-11 20:29:47 -0400 | [diff] [blame] | 138 | ima_putc(m, e->digest, TPM_DIGEST_SIZE); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 139 | |
| 140 | /* 3rd: template name size */ |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 141 | namelen = strlen(e->template_desc->name); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 142 | ima_putc(m, &namelen, sizeof namelen); |
| 143 | |
| 144 | /* 4th: template name */ |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 145 | ima_putc(m, e->template_desc->name, namelen); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 146 | |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 147 | /* 5th: template length (except for 'ima' template) */ |
| 148 | if (strcmp(e->template_desc->name, IMA_TEMPLATE_IMA_NAME) != 0) |
| 149 | ima_putc(m, &e->template_data_len, |
| 150 | sizeof(e->template_data_len)); |
| 151 | |
| 152 | /* 6th: template specific data */ |
| 153 | for (i = 0; i < e->template_desc->num_fields; i++) { |
| 154 | e->template_desc->fields[i]->field_show(m, IMA_SHOW_BINARY, |
| 155 | &e->template_data[i]); |
| 156 | } |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 157 | return 0; |
| 158 | } |
| 159 | |
James Morris | 88e9d34 | 2009-09-22 16:43:43 -0700 | [diff] [blame] | 160 | static const struct seq_operations ima_measurments_seqops = { |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 161 | .start = ima_measurements_start, |
| 162 | .next = ima_measurements_next, |
| 163 | .stop = ima_measurements_stop, |
| 164 | .show = ima_measurements_show |
| 165 | }; |
| 166 | |
| 167 | static int ima_measurements_open(struct inode *inode, struct file *file) |
| 168 | { |
| 169 | return seq_open(file, &ima_measurments_seqops); |
| 170 | } |
| 171 | |
Alexey Dobriyan | 828c095 | 2009-10-01 15:43:56 -0700 | [diff] [blame] | 172 | static const struct file_operations ima_measurements_ops = { |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 173 | .open = ima_measurements_open, |
| 174 | .read = seq_read, |
| 175 | .llseek = seq_lseek, |
| 176 | .release = seq_release, |
| 177 | }; |
| 178 | |
Roberto Sassu | 3ce1217d | 2013-06-07 12:16:30 +0200 | [diff] [blame] | 179 | void ima_print_digest(struct seq_file *m, u8 *digest, int size) |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 180 | { |
| 181 | int i; |
| 182 | |
Mimi Zohar | 140d802 | 2013-03-11 20:29:47 -0400 | [diff] [blame] | 183 | for (i = 0; i < size; i++) |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 184 | seq_printf(m, "%02x", *(digest + i)); |
| 185 | } |
| 186 | |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 187 | /* print in ascii */ |
| 188 | static int ima_ascii_measurements_show(struct seq_file *m, void *v) |
| 189 | { |
| 190 | /* the list never shrinks, so we don't need a lock here */ |
| 191 | struct ima_queue_entry *qe = v; |
| 192 | struct ima_template_entry *e; |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 193 | int i; |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 194 | |
| 195 | /* get entry */ |
| 196 | e = qe->entry; |
| 197 | if (e == NULL) |
| 198 | return -1; |
| 199 | |
| 200 | /* 1st: PCR used (config option) */ |
| 201 | seq_printf(m, "%2d ", CONFIG_IMA_MEASURE_PCR_IDX); |
| 202 | |
| 203 | /* 2nd: SHA1 template hash */ |
Mimi Zohar | 140d802 | 2013-03-11 20:29:47 -0400 | [diff] [blame] | 204 | ima_print_digest(m, e->digest, TPM_DIGEST_SIZE); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 205 | |
| 206 | /* 3th: template name */ |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 207 | seq_printf(m, " %s", e->template_desc->name); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 208 | |
| 209 | /* 4th: template specific data */ |
Roberto Sassu | a71dc65 | 2013-06-07 12:16:33 +0200 | [diff] [blame] | 210 | for (i = 0; i < e->template_desc->num_fields; i++) { |
| 211 | seq_puts(m, " "); |
| 212 | if (e->template_data[i].len == 0) |
| 213 | continue; |
| 214 | |
| 215 | e->template_desc->fields[i]->field_show(m, IMA_SHOW_ASCII, |
| 216 | &e->template_data[i]); |
| 217 | } |
| 218 | seq_puts(m, "\n"); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 219 | return 0; |
| 220 | } |
| 221 | |
James Morris | 88e9d34 | 2009-09-22 16:43:43 -0700 | [diff] [blame] | 222 | static const struct seq_operations ima_ascii_measurements_seqops = { |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 223 | .start = ima_measurements_start, |
| 224 | .next = ima_measurements_next, |
| 225 | .stop = ima_measurements_stop, |
| 226 | .show = ima_ascii_measurements_show |
| 227 | }; |
| 228 | |
| 229 | static int ima_ascii_measurements_open(struct inode *inode, struct file *file) |
| 230 | { |
| 231 | return seq_open(file, &ima_ascii_measurements_seqops); |
| 232 | } |
| 233 | |
Alexey Dobriyan | 828c095 | 2009-10-01 15:43:56 -0700 | [diff] [blame] | 234 | static const struct file_operations ima_ascii_measurements_ops = { |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 235 | .open = ima_ascii_measurements_open, |
| 236 | .read = seq_read, |
| 237 | .llseek = seq_lseek, |
| 238 | .release = seq_release, |
| 239 | }; |
| 240 | |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 241 | static ssize_t ima_write_policy(struct file *file, const char __user *buf, |
| 242 | size_t datalen, loff_t *ppos) |
| 243 | { |
Eric Paris | 6ccd045 | 2010-04-20 10:20:54 -0400 | [diff] [blame] | 244 | char *data = NULL; |
| 245 | ssize_t result; |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 246 | |
| 247 | if (datalen >= PAGE_SIZE) |
Eric Paris | 6ccd045 | 2010-04-20 10:20:54 -0400 | [diff] [blame] | 248 | datalen = PAGE_SIZE - 1; |
| 249 | |
| 250 | /* No partial writes. */ |
| 251 | result = -EINVAL; |
| 252 | if (*ppos != 0) |
| 253 | goto out; |
| 254 | |
| 255 | result = -ENOMEM; |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 256 | data = kmalloc(datalen + 1, GFP_KERNEL); |
| 257 | if (!data) |
Eric Paris | 6ccd045 | 2010-04-20 10:20:54 -0400 | [diff] [blame] | 258 | goto out; |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 259 | |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 260 | *(data + datalen) = '\0'; |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 261 | |
Eric Paris | 6ccd045 | 2010-04-20 10:20:54 -0400 | [diff] [blame] | 262 | result = -EFAULT; |
| 263 | if (copy_from_user(data, buf, datalen)) |
| 264 | goto out; |
| 265 | |
| 266 | result = ima_parse_add_rule(data); |
| 267 | out: |
| 268 | if (result < 0) |
| 269 | valid_policy = 0; |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 270 | kfree(data); |
Eric Paris | 6ccd045 | 2010-04-20 10:20:54 -0400 | [diff] [blame] | 271 | return result; |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 272 | } |
| 273 | |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 274 | static struct dentry *ima_dir; |
| 275 | static struct dentry *binary_runtime_measurements; |
| 276 | static struct dentry *ascii_runtime_measurements; |
| 277 | static struct dentry *runtime_measurements_count; |
| 278 | static struct dentry *violations; |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 279 | static struct dentry *ima_policy; |
| 280 | |
Mimi Zohar | f4bd857 | 2009-02-04 09:07:01 -0500 | [diff] [blame] | 281 | static atomic_t policy_opencount = ATOMIC_INIT(1); |
| 282 | /* |
| 283 | * ima_open_policy: sequentialize access to the policy file |
| 284 | */ |
James Morris | b97e145 | 2011-08-30 10:18:30 +1000 | [diff] [blame] | 285 | static int ima_open_policy(struct inode * inode, struct file * filp) |
Mimi Zohar | f4bd857 | 2009-02-04 09:07:01 -0500 | [diff] [blame] | 286 | { |
Eric Paris | f850a7c | 2009-05-12 15:13:55 -0400 | [diff] [blame] | 287 | /* No point in being allowed to open it if you aren't going to write */ |
| 288 | if (!(filp->f_flags & O_WRONLY)) |
| 289 | return -EACCES; |
Mimi Zohar | f4bd857 | 2009-02-04 09:07:01 -0500 | [diff] [blame] | 290 | if (atomic_dec_and_test(&policy_opencount)) |
| 291 | return 0; |
| 292 | return -EBUSY; |
| 293 | } |
| 294 | |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 295 | /* |
| 296 | * ima_release_policy - start using the new measure policy rules. |
| 297 | * |
| 298 | * Initially, ima_measure points to the default policy rules, now |
Mimi Zohar | f4bd857 | 2009-02-04 09:07:01 -0500 | [diff] [blame] | 299 | * point to the new policy rules, and remove the securityfs policy file, |
| 300 | * assuming a valid policy. |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 301 | */ |
| 302 | static int ima_release_policy(struct inode *inode, struct file *file) |
| 303 | { |
| 304 | if (!valid_policy) { |
| 305 | ima_delete_rules(); |
Mimi Zohar | f4bd857 | 2009-02-04 09:07:01 -0500 | [diff] [blame] | 306 | valid_policy = 1; |
| 307 | atomic_set(&policy_opencount, 1); |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 308 | return 0; |
| 309 | } |
| 310 | ima_update_policy(); |
| 311 | securityfs_remove(ima_policy); |
| 312 | ima_policy = NULL; |
| 313 | return 0; |
| 314 | } |
| 315 | |
Alexey Dobriyan | 828c095 | 2009-10-01 15:43:56 -0700 | [diff] [blame] | 316 | static const struct file_operations ima_measure_policy_ops = { |
Mimi Zohar | f4bd857 | 2009-02-04 09:07:01 -0500 | [diff] [blame] | 317 | .open = ima_open_policy, |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 318 | .write = ima_write_policy, |
Arnd Bergmann | cdcd90f | 2010-07-07 23:40:15 +0200 | [diff] [blame] | 319 | .release = ima_release_policy, |
| 320 | .llseek = generic_file_llseek, |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 321 | }; |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 322 | |
Eric Paris | 932995f | 2009-05-21 15:43:32 -0400 | [diff] [blame] | 323 | int __init ima_fs_init(void) |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 324 | { |
| 325 | ima_dir = securityfs_create_dir("ima", NULL); |
| 326 | if (IS_ERR(ima_dir)) |
| 327 | return -1; |
| 328 | |
| 329 | binary_runtime_measurements = |
| 330 | securityfs_create_file("binary_runtime_measurements", |
| 331 | S_IRUSR | S_IRGRP, ima_dir, NULL, |
| 332 | &ima_measurements_ops); |
| 333 | if (IS_ERR(binary_runtime_measurements)) |
| 334 | goto out; |
| 335 | |
| 336 | ascii_runtime_measurements = |
| 337 | securityfs_create_file("ascii_runtime_measurements", |
| 338 | S_IRUSR | S_IRGRP, ima_dir, NULL, |
| 339 | &ima_ascii_measurements_ops); |
| 340 | if (IS_ERR(ascii_runtime_measurements)) |
| 341 | goto out; |
| 342 | |
| 343 | runtime_measurements_count = |
| 344 | securityfs_create_file("runtime_measurements_count", |
| 345 | S_IRUSR | S_IRGRP, ima_dir, NULL, |
| 346 | &ima_measurements_count_ops); |
| 347 | if (IS_ERR(runtime_measurements_count)) |
| 348 | goto out; |
| 349 | |
| 350 | violations = |
| 351 | securityfs_create_file("violations", S_IRUSR | S_IRGRP, |
| 352 | ima_dir, NULL, &ima_htable_violations_ops); |
| 353 | if (IS_ERR(violations)) |
| 354 | goto out; |
| 355 | |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 356 | ima_policy = securityfs_create_file("policy", |
Eric Paris | f850a7c | 2009-05-12 15:13:55 -0400 | [diff] [blame] | 357 | S_IWUSR, |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 358 | ima_dir, NULL, |
| 359 | &ima_measure_policy_ops); |
| 360 | if (IS_ERR(ima_policy)) |
| 361 | goto out; |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 362 | |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 363 | return 0; |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 364 | out: |
Dmitry Kasatkin | 0ea4f8a | 2012-01-29 19:19:08 -0500 | [diff] [blame] | 365 | securityfs_remove(violations); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 366 | securityfs_remove(runtime_measurements_count); |
| 367 | securityfs_remove(ascii_runtime_measurements); |
| 368 | securityfs_remove(binary_runtime_measurements); |
| 369 | securityfs_remove(ima_dir); |
Mimi Zohar | 4af4662 | 2009-02-04 09:07:00 -0500 | [diff] [blame] | 370 | securityfs_remove(ima_policy); |
Mimi Zohar | bab7393 | 2009-02-04 09:06:59 -0500 | [diff] [blame] | 371 | return -1; |
| 372 | } |