Lines Matching refs:expr
26 static int cond_evaluate_expr(struct policydb *p, struct cond_expr *expr) in cond_evaluate_expr() argument
33 for (cur = expr; cur; cur = cur->next) { in cond_evaluate_expr()
95 new_state = cond_evaluate_expr(p, node->expr); in evaluate_cond_node()
147 for (cur_expr = node->expr; cur_expr; cur_expr = next_expr) { in cond_node_destroy()
388 static int expr_isvalid(struct policydb *p, struct cond_expr *expr) in expr_isvalid() argument
390 if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { in expr_isvalid()
395 if (expr->bool > p->p_bools.nprim) { in expr_isvalid()
407 struct cond_expr *expr = NULL, *last = NULL; in cond_read_node() local
424 expr = kzalloc(sizeof(*expr), GFP_KERNEL); in cond_read_node()
425 if (!expr) in cond_read_node()
428 expr->expr_type = le32_to_cpu(buf[0]); in cond_read_node()
429 expr->bool = le32_to_cpu(buf[1]); in cond_read_node()
431 if (!expr_isvalid(p, expr)) { in cond_read_node()
433 kfree(expr); in cond_read_node()
438 node->expr = expr; in cond_read_node()
440 last->next = expr; in cond_read_node()
441 last = expr; in cond_read_node()
570 for (cur_expr = node->expr; cur_expr != NULL; cur_expr = cur_expr->next) in cond_write_node()
578 for (cur_expr = node->expr; cur_expr != NULL; cur_expr = cur_expr->next) { in cond_write_node()