Lines Matching full:layers
106 const struct landlock_layer (*const layers)[], const u32 num_layers, in create_rule() argument
121 new_rule = kzalloc(struct_size(new_rule, layers, new_num_layers), in create_rule()
135 memcpy(new_rule->layers, layers, in create_rule()
136 flex_array_size(new_rule, layers, num_layers)); in create_rule()
139 new_rule->layers[new_rule->num_layers - 1] = *new_layer; in create_rule()
189 * @layers: One or multiple layers to be copied into the new rule.
190 * @num_layers: The number of @layers entries.
192 * When user space requests to add a new rule to a ruleset, @layers only
197 * When merging a ruleset in a domain, or copying a domain, @layers will be
203 const struct landlock_layer (*const layers)[], in insert_rule() argument
213 if (WARN_ON_ONCE(!layers)) in insert_rule()
242 if ((*layers)[0].level == 0) { in insert_rule()
249 if (WARN_ON_ONCE(this->layers[0].level != 0)) in insert_rule()
251 this->layers[0].access |= (*layers)[0].access; in insert_rule()
255 if (WARN_ON_ONCE(this->layers[0].level == 0)) in insert_rule()
262 new_rule = create_rule(id, &this->layers, this->num_layers, in insert_rule()
263 &(*layers)[0]); in insert_rule()
275 new_rule = create_rule(id, layers, num_layers, NULL); in insert_rule()
300 struct landlock_layer layers[] = { { in landlock_insert_rule() local
307 return insert_rule(ruleset, id, &layers, ARRAY_SIZE(layers)); in landlock_insert_rule()
345 struct landlock_layer layers[] = { { in merge_tree() local
356 if (WARN_ON_ONCE(walker_rule->layers[0].level != 0)) in merge_tree()
359 layers[0].access = walker_rule->layers[0].access; in merge_tree()
361 err = insert_rule(dst, id, &layers, ARRAY_SIZE(layers)); in merge_tree()
435 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.