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()
385 static int expr_isvalid(struct policydb *p, struct cond_expr *expr) in expr_isvalid() argument
387 if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { in expr_isvalid()
392 if (expr->bool > p->p_bools.nprim) { in expr_isvalid()
404 struct cond_expr *expr = NULL, *last = NULL; in cond_read_node() local
421 expr = kzalloc(sizeof(struct cond_expr), GFP_KERNEL); in cond_read_node()
422 if (!expr) in cond_read_node()
425 expr->expr_type = le32_to_cpu(buf[0]); in cond_read_node()
426 expr->bool = le32_to_cpu(buf[1]); in cond_read_node()
428 if (!expr_isvalid(p, expr)) { in cond_read_node()
430 kfree(expr); in cond_read_node()
435 node->expr = expr; in cond_read_node()
437 last->next = expr; in cond_read_node()
438 last = expr; in cond_read_node()
567 for (cur_expr = node->expr; cur_expr != NULL; cur_expr = cur_expr->next) in cond_write_node()
575 for (cur_expr = node->expr; cur_expr != NULL; cur_expr = cur_expr->next) { in cond_write_node()