Lines Matching refs:expr
25 static int cond_evaluate_expr(struct policydb *p, struct cond_expr *expr) in cond_evaluate_expr() argument
32 for (cur = expr; cur; cur = cur->next) { in cond_evaluate_expr()
94 new_state = cond_evaluate_expr(p, node->expr); in evaluate_cond_node()
146 for (cur_expr = node->expr; cur_expr; cur_expr = next_expr) { in cond_node_destroy()
384 static int expr_isvalid(struct policydb *p, struct cond_expr *expr) in expr_isvalid() argument
386 if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { in expr_isvalid()
391 if (expr->bool > p->p_bools.nprim) { in expr_isvalid()
403 struct cond_expr *expr = NULL, *last = NULL; in cond_read_node() local
420 expr = kzalloc(sizeof(struct cond_expr), GFP_KERNEL); in cond_read_node()
421 if (!expr) in cond_read_node()
424 expr->expr_type = le32_to_cpu(buf[0]); in cond_read_node()
425 expr->bool = le32_to_cpu(buf[1]); in cond_read_node()
427 if (!expr_isvalid(p, expr)) { in cond_read_node()
429 kfree(expr); in cond_read_node()
434 node->expr = expr; in cond_read_node()
436 last->next = expr; in cond_read_node()
437 last = expr; in cond_read_node()
566 for (cur_expr = node->expr; cur_expr != NULL; cur_expr = cur_expr->next) in cond_write_node()
574 for (cur_expr = node->expr; cur_expr != NULL; cur_expr = cur_expr->next) { in cond_write_node()