Lines Matching full:entry

378 static void ima_lsm_free_rule(struct ima_rule_entry *entry)  in ima_lsm_free_rule()  argument
383 ima_filter_rule_free(entry->lsm[i].rule); in ima_lsm_free_rule()
384 kfree(entry->lsm[i].args_p); in ima_lsm_free_rule()
388 static void ima_free_rule(struct ima_rule_entry *entry) in ima_free_rule() argument
390 if (!entry) in ima_free_rule()
394 * entry->template->fields may be allocated in ima_parse_rule() but that in ima_free_rule()
398 kfree(entry->fsname); in ima_free_rule()
399 ima_free_rule_opt_list(entry->keyrings); in ima_free_rule()
400 ima_lsm_free_rule(entry); in ima_free_rule()
401 kfree(entry); in ima_free_rule()
404 static struct ima_rule_entry *ima_lsm_copy_rule(struct ima_rule_entry *entry, in ima_lsm_copy_rule() argument
414 nentry = kmemdup(entry, sizeof(*nentry), gfp); in ima_lsm_copy_rule()
421 if (!entry->lsm[i].args_p) in ima_lsm_copy_rule()
424 nentry->lsm[i].type = entry->lsm[i].type; in ima_lsm_copy_rule()
425 nentry->lsm[i].args_p = entry->lsm[i].args_p; in ima_lsm_copy_rule()
438 static int ima_lsm_update_rule(struct ima_rule_entry *entry) in ima_lsm_update_rule() argument
443 nentry = ima_lsm_copy_rule(entry, GFP_KERNEL); in ima_lsm_update_rule()
447 list_replace_rcu(&entry->list, &nentry->list); in ima_lsm_update_rule()
451 * LSM references, from entry to nentry so we only want to free the LSM in ima_lsm_update_rule()
452 * references and the entry itself. All other memory references will now in ima_lsm_update_rule()
456 ima_filter_rule_free(entry->lsm[i].rule); in ima_lsm_update_rule()
457 kfree(entry); in ima_lsm_update_rule()
462 static bool ima_rule_contains_lsm_cond(struct ima_rule_entry *entry) in ima_rule_contains_lsm_cond() argument
467 if (entry->lsm[i].args_p) in ima_rule_contains_lsm_cond()
480 struct ima_rule_entry *entry, *e; in ima_lsm_update_rules() local
483 list_for_each_entry_safe(entry, e, &ima_policy_rules, list) { in ima_lsm_update_rules()
484 if (!ima_rule_contains_lsm_cond(entry)) in ima_lsm_update_rules()
487 result = ima_lsm_update_rule(entry); in ima_lsm_update_rules()
745 struct ima_rule_entry *entry; in ima_match_policy() local
754 list_for_each_entry_rcu(entry, ima_rules_tmp, list) { in ima_match_policy()
756 if (!(entry->action & actmask)) in ima_match_policy()
759 if (!ima_match_rules(entry, idmap, inode, cred, secid, in ima_match_policy()
763 action |= entry->flags & IMA_NONACTION_FLAGS; in ima_match_policy()
765 action |= entry->action & IMA_DO_MASK; in ima_match_policy()
766 if (entry->action & IMA_APPRAISE) { in ima_match_policy()
767 action |= get_subaction(entry, func); in ima_match_policy()
773 entry->flags & IMA_VALIDATE_ALGOS) in ima_match_policy()
774 *allowed_algos = entry->allowed_algos; in ima_match_policy()
777 if (entry->action & IMA_DO_MASK) in ima_match_policy()
778 actmask &= ~(entry->action | entry->action << 1); in ima_match_policy()
780 actmask &= ~(entry->action | entry->action >> 1); in ima_match_policy()
782 if ((pcr) && (entry->flags & IMA_PCR)) in ima_match_policy()
783 *pcr = entry->pcr; in ima_match_policy()
785 if (template_desc && entry->template) in ima_match_policy()
786 *template_desc = entry->template; in ima_match_policy()
813 struct ima_rule_entry *entry; in ima_update_policy_flags() local
819 list_for_each_entry_rcu(entry, ima_rules_tmp, list) { in ima_update_policy_flags()
832 if (entry->func == SETXATTR_CHECK) { in ima_update_policy_flags()
834 0, entry->allowed_algos); in ima_update_policy_flags()
839 if (entry->action & IMA_DO_MASK) in ima_update_policy_flags()
840 new_policy_flag |= entry->action; in ima_update_policy_flags()
870 struct ima_rule_entry *entry; in add_rules() local
876 entry = kmemdup(&entries[i], sizeof(*entry), in add_rules()
878 if (!entry) in add_rules()
881 list_add_tail(&entry->list, &ima_policy_rules); in add_rules()
894 static int ima_parse_rule(char *rule, struct ima_rule_entry *entry);
1130 static int ima_lsm_rule_init(struct ima_rule_entry *entry, in ima_lsm_rule_init() argument
1135 if (entry->lsm[lsm_rule].rule) in ima_lsm_rule_init()
1138 entry->lsm[lsm_rule].args_p = match_strdup(args); in ima_lsm_rule_init()
1139 if (!entry->lsm[lsm_rule].args_p) in ima_lsm_rule_init()
1142 entry->lsm[lsm_rule].type = audit_type; in ima_lsm_rule_init()
1143 result = ima_filter_rule_init(entry->lsm[lsm_rule].type, Audit_equal, in ima_lsm_rule_init()
1144 entry->lsm[lsm_rule].args_p, in ima_lsm_rule_init()
1145 &entry->lsm[lsm_rule].rule, in ima_lsm_rule_init()
1147 if (!entry->lsm[lsm_rule].rule) { in ima_lsm_rule_init()
1149 entry->lsm[lsm_rule].args_p); in ima_lsm_rule_init()
1152 kfree(entry->lsm[lsm_rule].args_p); in ima_lsm_rule_init()
1153 entry->lsm[lsm_rule].args_p = NULL; in ima_lsm_rule_init()
1242 static bool ima_validate_rule(struct ima_rule_entry *entry) in ima_validate_rule() argument
1245 if (entry->action == UNKNOWN) in ima_validate_rule()
1248 if (entry->action != MEASURE && entry->flags & IMA_PCR) in ima_validate_rule()
1251 if (entry->action != APPRAISE && in ima_validate_rule()
1252 entry->flags & (IMA_DIGSIG_REQUIRED | IMA_MODSIG_ALLOWED | in ima_validate_rule()
1262 if (((entry->flags & IMA_FUNC) && entry->func == NONE) || in ima_validate_rule()
1263 (!(entry->flags & IMA_FUNC) && entry->func != NONE)) in ima_validate_rule()
1270 switch (entry->func) { in ima_validate_rule()
1280 if (entry->flags & ~(IMA_FUNC | IMA_MASK | IMA_FSMAGIC | in ima_validate_rule()
1293 if (entry->flags & ~(IMA_FUNC | IMA_MASK | IMA_FSMAGIC | in ima_validate_rule()
1304 if (entry->action & ~(MEASURE | DONT_MEASURE)) in ima_validate_rule()
1307 if (entry->flags & ~(IMA_FUNC | IMA_FSMAGIC | IMA_UID | in ima_validate_rule()
1315 if (entry->action & ~(MEASURE | DONT_MEASURE)) in ima_validate_rule()
1318 if (entry->flags & ~(IMA_FUNC | IMA_UID | IMA_GID | IMA_PCR | in ima_validate_rule()
1322 if (ima_rule_contains_lsm_cond(entry)) in ima_validate_rule()
1327 if (entry->action & ~(MEASURE | DONT_MEASURE)) in ima_validate_rule()
1330 if (entry->flags & ~(IMA_FUNC | IMA_UID | IMA_GID | IMA_PCR | in ima_validate_rule()
1334 if (ima_rule_contains_lsm_cond(entry)) in ima_validate_rule()
1340 if (entry->action != APPRAISE) in ima_validate_rule()
1344 if (!(entry->flags & IMA_VALIDATE_ALGOS)) in ima_validate_rule()
1351 if (entry->flags & ~(IMA_FUNC | IMA_VALIDATE_ALGOS)) in ima_validate_rule()
1360 if (entry->flags & IMA_CHECK_BLACKLIST && in ima_validate_rule()
1361 !(entry->flags & IMA_DIGSIG_REQUIRED)) in ima_validate_rule()
1371 if (entry->action == APPRAISE && in ima_validate_rule()
1372 (entry->flags & IMA_VERITY_REQUIRED) && in ima_validate_rule()
1373 !(entry->flags & IMA_DIGSIG_REQUIRED)) in ima_validate_rule()
1407 static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) in ima_parse_rule() argument
1419 entry->uid = INVALID_UID; in ima_parse_rule()
1420 entry->gid = INVALID_GID; in ima_parse_rule()
1421 entry->fowner = INVALID_UID; in ima_parse_rule()
1422 entry->fgroup = INVALID_GID; in ima_parse_rule()
1423 entry->uid_op = &uid_eq; in ima_parse_rule()
1424 entry->gid_op = &gid_eq; in ima_parse_rule()
1425 entry->fowner_op = &vfsuid_eq_kuid; in ima_parse_rule()
1426 entry->fgroup_op = &vfsgid_eq_kgid; in ima_parse_rule()
1427 entry->action = UNKNOWN; in ima_parse_rule()
1442 if (entry->action != UNKNOWN) in ima_parse_rule()
1445 entry->action = MEASURE; in ima_parse_rule()
1450 if (entry->action != UNKNOWN) in ima_parse_rule()
1453 entry->action = DONT_MEASURE; in ima_parse_rule()
1458 if (entry->action != UNKNOWN) in ima_parse_rule()
1461 entry->action = APPRAISE; in ima_parse_rule()
1466 if (entry->action != UNKNOWN) in ima_parse_rule()
1469 entry->action = DONT_APPRAISE; in ima_parse_rule()
1474 if (entry->action != UNKNOWN) in ima_parse_rule()
1477 entry->action = AUDIT; in ima_parse_rule()
1482 if (entry->action != UNKNOWN) in ima_parse_rule()
1485 entry->action = HASH; in ima_parse_rule()
1490 if (entry->action != UNKNOWN) in ima_parse_rule()
1493 entry->action = DONT_HASH; in ima_parse_rule()
1498 if (entry->func) in ima_parse_rule()
1502 entry->func = FILE_CHECK; in ima_parse_rule()
1505 entry->func = FILE_CHECK; in ima_parse_rule()
1507 entry->func = MODULE_CHECK; in ima_parse_rule()
1509 entry->func = FIRMWARE_CHECK; in ima_parse_rule()
1512 entry->func = MMAP_CHECK; in ima_parse_rule()
1514 entry->func = MMAP_CHECK_REQPROT; in ima_parse_rule()
1516 entry->func = BPRM_CHECK; in ima_parse_rule()
1518 entry->func = CREDS_CHECK; in ima_parse_rule()
1521 entry->func = KEXEC_KERNEL_CHECK; in ima_parse_rule()
1524 entry->func = KEXEC_INITRAMFS_CHECK; in ima_parse_rule()
1526 entry->func = POLICY_CHECK; in ima_parse_rule()
1528 entry->func = KEXEC_CMDLINE; in ima_parse_rule()
1531 entry->func = KEY_CHECK; in ima_parse_rule()
1533 entry->func = CRITICAL_DATA; in ima_parse_rule()
1535 entry->func = SETXATTR_CHECK; in ima_parse_rule()
1539 entry->flags |= IMA_FUNC; in ima_parse_rule()
1544 if (entry->mask) in ima_parse_rule()
1552 entry->mask = MAY_EXEC; in ima_parse_rule()
1554 entry->mask = MAY_WRITE; in ima_parse_rule()
1556 entry->mask = MAY_READ; in ima_parse_rule()
1558 entry->mask = MAY_APPEND; in ima_parse_rule()
1562 entry->flags |= (*args[0].from == '^') in ima_parse_rule()
1568 if (entry->fsmagic) { in ima_parse_rule()
1573 result = kstrtoul(args[0].from, 16, &entry->fsmagic); in ima_parse_rule()
1575 entry->flags |= IMA_FSMAGIC; in ima_parse_rule()
1580 entry->fsname = kstrdup(args[0].from, GFP_KERNEL); in ima_parse_rule()
1581 if (!entry->fsname) { in ima_parse_rule()
1586 entry->flags |= IMA_FSNAME; in ima_parse_rule()
1592 entry->keyrings) { in ima_parse_rule()
1597 entry->keyrings = ima_alloc_rule_opt_list(args); in ima_parse_rule()
1598 if (IS_ERR(entry->keyrings)) { in ima_parse_rule()
1599 result = PTR_ERR(entry->keyrings); in ima_parse_rule()
1600 entry->keyrings = NULL; in ima_parse_rule()
1604 entry->flags |= IMA_KEYRINGS; in ima_parse_rule()
1609 if (entry->label) { in ima_parse_rule()
1614 entry->label = ima_alloc_rule_opt_list(args); in ima_parse_rule()
1615 if (IS_ERR(entry->label)) { in ima_parse_rule()
1616 result = PTR_ERR(entry->label); in ima_parse_rule()
1617 entry->label = NULL; in ima_parse_rule()
1621 entry->flags |= IMA_LABEL; in ima_parse_rule()
1626 if (!uuid_is_null(&entry->fsuuid)) { in ima_parse_rule()
1631 result = uuid_parse(args[0].from, &entry->fsuuid); in ima_parse_rule()
1633 entry->flags |= IMA_FSUUID; in ima_parse_rule()
1637 entry->uid_op = &uid_gt; in ima_parse_rule()
1642 entry->uid_op = &uid_lt; in ima_parse_rule()
1653 if (uid_valid(entry->uid)) { in ima_parse_rule()
1660 entry->uid = make_kuid(current_user_ns(), in ima_parse_rule()
1662 if (!uid_valid(entry->uid) || in ima_parse_rule()
1666 entry->flags |= eid_token in ima_parse_rule()
1672 entry->gid_op = &gid_gt; in ima_parse_rule()
1677 entry->gid_op = &gid_lt; in ima_parse_rule()
1688 if (gid_valid(entry->gid)) { in ima_parse_rule()
1695 entry->gid = make_kgid(current_user_ns(), in ima_parse_rule()
1697 if (!gid_valid(entry->gid) || in ima_parse_rule()
1701 entry->flags |= eid_token in ima_parse_rule()
1706 entry->fowner_op = &vfsuid_gt_kuid; in ima_parse_rule()
1710 entry->fowner_op = &vfsuid_lt_kuid; in ima_parse_rule()
1715 if (uid_valid(entry->fowner)) { in ima_parse_rule()
1722 entry->fowner = make_kuid(current_user_ns(), in ima_parse_rule()
1724 if (!uid_valid(entry->fowner) || in ima_parse_rule()
1728 entry->flags |= IMA_FOWNER; in ima_parse_rule()
1732 entry->fgroup_op = &vfsgid_gt_kgid; in ima_parse_rule()
1736 entry->fgroup_op = &vfsgid_lt_kgid; in ima_parse_rule()
1741 if (gid_valid(entry->fgroup)) { in ima_parse_rule()
1748 entry->fgroup = make_kgid(current_user_ns(), in ima_parse_rule()
1750 if (!gid_valid(entry->fgroup) || in ima_parse_rule()
1754 entry->flags |= IMA_FGROUP; in ima_parse_rule()
1759 result = ima_lsm_rule_init(entry, args, in ima_parse_rule()
1765 result = ima_lsm_rule_init(entry, args, in ima_parse_rule()
1771 result = ima_lsm_rule_init(entry, args, in ima_parse_rule()
1777 result = ima_lsm_rule_init(entry, args, in ima_parse_rule()
1783 result = ima_lsm_rule_init(entry, args, in ima_parse_rule()
1789 result = ima_lsm_rule_init(entry, args, in ima_parse_rule()
1795 if (entry->flags & IMA_DIGSIG_REQUIRED) in ima_parse_rule()
1798 entry->flags |= IMA_VERITY_REQUIRED; in ima_parse_rule()
1806 if (entry->flags & IMA_VERITY_REQUIRED) in ima_parse_rule()
1809 entry->flags |= IMA_DIGSIG_REQUIRED | IMA_CHECK_BLACKLIST; in ima_parse_rule()
1812 if (entry->flags & IMA_VERITY_REQUIRED) in ima_parse_rule()
1813 entry->flags |= IMA_DIGSIG_REQUIRED | IMA_CHECK_BLACKLIST; in ima_parse_rule()
1818 if (entry->flags & IMA_VERITY_REQUIRED) in ima_parse_rule()
1821 entry->flags |= IMA_DIGSIG_REQUIRED | in ima_parse_rule()
1833 if (entry->allowed_algos) { in ima_parse_rule()
1838 entry->allowed_algos = in ima_parse_rule()
1841 if (!entry->allowed_algos) { in ima_parse_rule()
1846 entry->flags |= IMA_VALIDATE_ALGOS; in ima_parse_rule()
1850 entry->flags |= IMA_PERMIT_DIRECTIO; in ima_parse_rule()
1855 result = kstrtoint(args[0].from, 10, &entry->pcr); in ima_parse_rule()
1856 if (result || INVALID_PCR(entry->pcr)) in ima_parse_rule()
1859 entry->flags |= IMA_PCR; in ima_parse_rule()
1864 if (entry->action != MEASURE) { in ima_parse_rule()
1869 if (!template_desc || entry->template) { in ima_parse_rule()
1882 entry->template = template_desc; in ima_parse_rule()
1890 if (!result && !ima_validate_rule(entry)) in ima_parse_rule()
1892 else if (entry->action == APPRAISE) in ima_parse_rule()
1893 temp_ima_appraise |= ima_appraise_flag(entry->func); in ima_parse_rule()
1895 if (!result && entry->flags & IMA_MODSIG_ALLOWED) { in ima_parse_rule()
1896 template_desc = entry->template ? entry->template : in ima_parse_rule()
1902 if (!result && entry->action == MEASURE && in ima_parse_rule()
1903 entry->flags & IMA_VERITY_REQUIRED) { in ima_parse_rule()
1904 template_desc = entry->template ? entry->template : in ima_parse_rule()
1926 struct ima_rule_entry *entry; in ima_parse_add_rule() local
1937 entry = kzalloc(sizeof(*entry), GFP_KERNEL); in ima_parse_add_rule()
1938 if (!entry) { in ima_parse_add_rule()
1944 INIT_LIST_HEAD(&entry->list); in ima_parse_add_rule()
1946 result = ima_parse_rule(p, entry); in ima_parse_add_rule()
1948 ima_free_rule(entry); in ima_parse_add_rule()
1955 list_add_tail(&entry->list, &ima_temp_rules); in ima_parse_add_rule()
1969 struct ima_rule_entry *entry, *tmp; in ima_delete_rules() local
1972 list_for_each_entry_safe(entry, tmp, &ima_temp_rules, list) { in ima_delete_rules()
1973 list_del(&entry->list); in ima_delete_rules()
1974 ima_free_rule(entry); in ima_delete_rules()
1999 struct ima_rule_entry *entry; in ima_policy_start() local
2004 list_for_each_entry_rcu(entry, ima_rules_tmp, list) { in ima_policy_start()
2007 return entry; in ima_policy_start()
2016 struct ima_rule_entry *entry = v; in ima_policy_next() local
2019 entry = list_entry_rcu(entry->list.next, struct ima_rule_entry, list); in ima_policy_next()
2023 return (&entry->list == &ima_default_rules || in ima_policy_next()
2024 &entry->list == &ima_policy_rules) ? NULL : entry; in ima_policy_next()
2073 struct ima_rule_entry *entry = v; in ima_policy_show() local
2082 if (entry->lsm[i].args_p && !entry->lsm[i].rule) { in ima_policy_show()
2088 if (entry->action & MEASURE) in ima_policy_show()
2090 if (entry->action & DONT_MEASURE) in ima_policy_show()
2092 if (entry->action & APPRAISE) in ima_policy_show()
2094 if (entry->action & DONT_APPRAISE) in ima_policy_show()
2096 if (entry->action & AUDIT) in ima_policy_show()
2098 if (entry->action & HASH) in ima_policy_show()
2100 if (entry->action & DONT_HASH) in ima_policy_show()
2105 if (entry->flags & IMA_FUNC) in ima_policy_show()
2106 policy_func_show(m, entry->func); in ima_policy_show()
2108 if ((entry->flags & IMA_MASK) || (entry->flags & IMA_INMASK)) { in ima_policy_show()
2109 if (entry->flags & IMA_MASK) in ima_policy_show()
2111 if (entry->mask & MAY_EXEC) in ima_policy_show()
2113 if (entry->mask & MAY_WRITE) in ima_policy_show()
2115 if (entry->mask & MAY_READ) in ima_policy_show()
2117 if (entry->mask & MAY_APPEND) in ima_policy_show()
2122 if (entry->flags & IMA_FSMAGIC) { in ima_policy_show()
2123 snprintf(tbuf, sizeof(tbuf), "0x%lx", entry->fsmagic); in ima_policy_show()
2128 if (entry->flags & IMA_FSNAME) { in ima_policy_show()
2129 snprintf(tbuf, sizeof(tbuf), "%s", entry->fsname); in ima_policy_show()
2134 if (entry->flags & IMA_KEYRINGS) { in ima_policy_show()
2136 ima_show_rule_opt_list(m, entry->keyrings); in ima_policy_show()
2140 if (entry->flags & IMA_LABEL) { in ima_policy_show()
2142 ima_show_rule_opt_list(m, entry->label); in ima_policy_show()
2146 if (entry->flags & IMA_PCR) { in ima_policy_show()
2147 snprintf(tbuf, sizeof(tbuf), "%d", entry->pcr); in ima_policy_show()
2152 if (entry->flags & IMA_FSUUID) { in ima_policy_show()
2153 seq_printf(m, "fsuuid=%pU", &entry->fsuuid); in ima_policy_show()
2157 if (entry->flags & IMA_UID) { in ima_policy_show()
2158 snprintf(tbuf, sizeof(tbuf), "%d", __kuid_val(entry->uid)); in ima_policy_show()
2159 if (entry->uid_op == &uid_gt) in ima_policy_show()
2161 else if (entry->uid_op == &uid_lt) in ima_policy_show()
2168 if (entry->flags & IMA_EUID) { in ima_policy_show()
2169 snprintf(tbuf, sizeof(tbuf), "%d", __kuid_val(entry->uid)); in ima_policy_show()
2170 if (entry->uid_op == &uid_gt) in ima_policy_show()
2172 else if (entry->uid_op == &uid_lt) in ima_policy_show()
2179 if (entry->flags & IMA_GID) { in ima_policy_show()
2180 snprintf(tbuf, sizeof(tbuf), "%d", __kgid_val(entry->gid)); in ima_policy_show()
2181 if (entry->gid_op == &gid_gt) in ima_policy_show()
2183 else if (entry->gid_op == &gid_lt) in ima_policy_show()
2190 if (entry->flags & IMA_EGID) { in ima_policy_show()
2191 snprintf(tbuf, sizeof(tbuf), "%d", __kgid_val(entry->gid)); in ima_policy_show()
2192 if (entry->gid_op == &gid_gt) in ima_policy_show()
2194 else if (entry->gid_op == &gid_lt) in ima_policy_show()
2201 if (entry->flags & IMA_FOWNER) { in ima_policy_show()
2202 snprintf(tbuf, sizeof(tbuf), "%d", __kuid_val(entry->fowner)); in ima_policy_show()
2203 if (entry->fowner_op == &vfsuid_gt_kuid) in ima_policy_show()
2205 else if (entry->fowner_op == &vfsuid_lt_kuid) in ima_policy_show()
2212 if (entry->flags & IMA_FGROUP) { in ima_policy_show()
2213 snprintf(tbuf, sizeof(tbuf), "%d", __kgid_val(entry->fgroup)); in ima_policy_show()
2214 if (entry->fgroup_op == &vfsgid_gt_kgid) in ima_policy_show()
2216 else if (entry->fgroup_op == &vfsgid_lt_kgid) in ima_policy_show()
2223 if (entry->flags & IMA_VALIDATE_ALGOS) { in ima_policy_show()
2225 ima_policy_show_appraise_algos(m, entry->allowed_algos); in ima_policy_show()
2230 if (entry->lsm[i].rule) { in ima_policy_show()
2234 entry->lsm[i].args_p); in ima_policy_show()
2238 entry->lsm[i].args_p); in ima_policy_show()
2242 entry->lsm[i].args_p); in ima_policy_show()
2246 entry->lsm[i].args_p); in ima_policy_show()
2250 entry->lsm[i].args_p); in ima_policy_show()
2254 entry->lsm[i].args_p); in ima_policy_show()
2260 if (entry->template) in ima_policy_show()
2261 seq_printf(m, "template=%s ", entry->template->name); in ima_policy_show()
2262 if (entry->flags & IMA_DIGSIG_REQUIRED) { in ima_policy_show()
2263 if (entry->flags & IMA_VERITY_REQUIRED) in ima_policy_show()
2265 else if (entry->flags & IMA_MODSIG_ALLOWED) in ima_policy_show()
2270 if (entry->flags & IMA_VERITY_REQUIRED) in ima_policy_show()
2272 if (entry->flags & IMA_PERMIT_DIRECTIO) in ima_policy_show()
2289 struct ima_rule_entry *entry; in ima_appraise_signature() local
2305 list_for_each_entry_rcu(entry, ima_rules_tmp, list) { in ima_appraise_signature()
2306 if (entry->action != APPRAISE) in ima_appraise_signature()
2310 * A generic entry will match, but otherwise require that it in ima_appraise_signature()
2313 if (entry->func && entry->func != func) in ima_appraise_signature()
2320 if (entry->flags & IMA_DIGSIG_REQUIRED) in ima_appraise_signature()