Lines Matching refs:layers
71 const struct landlock_layer (*const layers)[], in create_rule() argument
87 new_rule = kzalloc(struct_size(new_rule, layers, new_num_layers), in create_rule()
96 memcpy(new_rule->layers, layers, in create_rule()
97 flex_array_size(new_rule, layers, num_layers)); in create_rule()
100 new_rule->layers[new_rule->num_layers - 1] = *new_layer; in create_rule()
146 const struct landlock_layer (*const layers)[], in insert_rule() argument
155 if (WARN_ON_ONCE(!object || !layers)) in insert_rule()
176 if ((*layers)[0].level == 0) { in insert_rule()
183 if (WARN_ON_ONCE(this->layers[0].level != 0)) in insert_rule()
185 this->layers[0].access |= (*layers)[0].access; in insert_rule()
189 if (WARN_ON_ONCE(this->layers[0].level == 0)) in insert_rule()
196 new_rule = create_rule(object, &this->layers, this->num_layers, in insert_rule()
197 &(*layers)[0]); in insert_rule()
209 new_rule = create_rule(object, layers, num_layers, NULL); in insert_rule()
233 struct landlock_layer layers[] = {{ in landlock_insert_rule() local
240 return insert_rule(ruleset, object, &layers, ARRAY_SIZE(layers)); in landlock_insert_rule()
287 struct landlock_layer layers[] = {{ in merge_ruleset() local
295 if (WARN_ON_ONCE(walker_rule->layers[0].level != 0)) { in merge_ruleset()
299 layers[0].access = walker_rule->layers[0].access; in merge_ruleset()
300 err = insert_rule(dst, walker_rule->object, &layers, in merge_ruleset()
301 ARRAY_SIZE(layers)); in merge_ruleset()
330 &walker_rule->layers, walker_rule->num_layers); in inherit_ruleset()