Lines Matching full:layers

103 	    const struct landlock_layer (*const layers)[], const u32 num_layers,  in create_rule()  argument
118 new_rule = kzalloc(struct_size(new_rule, layers, new_num_layers), in create_rule()
132 memcpy(new_rule->layers, layers, in create_rule()
133 flex_array_size(new_rule, layers, num_layers)); in create_rule()
136 new_rule->layers[new_rule->num_layers - 1] = *new_layer; in create_rule()
186 * @layers: One or multiple layers to be copied into the new rule.
187 * @num_layers: The number of @layers entries.
189 * When user space requests to add a new rule to a ruleset, @layers only
194 * When merging a ruleset in a domain, or copying a domain, @layers will be
200 const struct landlock_layer (*const layers)[], in insert_rule() argument
210 if (WARN_ON_ONCE(!layers)) in insert_rule()
239 if ((*layers)[0].level == 0) { in insert_rule()
246 if (WARN_ON_ONCE(this->layers[0].level != 0)) in insert_rule()
248 this->layers[0].access |= (*layers)[0].access; in insert_rule()
252 if (WARN_ON_ONCE(this->layers[0].level == 0)) in insert_rule()
259 new_rule = create_rule(id, &this->layers, this->num_layers, in insert_rule()
260 &(*layers)[0]); in insert_rule()
272 new_rule = create_rule(id, layers, num_layers, NULL); in insert_rule()
297 struct landlock_layer layers[] = { { in landlock_insert_rule() local
304 return insert_rule(ruleset, id, &layers, ARRAY_SIZE(layers)); in landlock_insert_rule()
342 struct landlock_layer layers[] = { { in merge_tree() local
353 if (WARN_ON_ONCE(walker_rule->layers[0].level != 0)) in merge_tree()
356 layers[0].access = walker_rule->layers[0].access; in merge_tree()
358 err = insert_rule(dst, id, &layers, ARRAY_SIZE(layers)); in merge_tree()
431 err = insert_rule(child, id, &walker_rule->layers, in inherit_tree()
638 * the remaining layers for each inode, from the first added layer to in landlock_unmask_layers()
646 &rule->layers[layer_level]; in landlock_unmask_layers()
676 * the bits for all the layers are set where this access right is handled.
685 * in any of the active layers in @domain.