Lines Matching full:layers
108 const struct landlock_layer (*const layers)[], const u32 num_layers, in create_rule() argument
123 new_rule = kzalloc(struct_size(new_rule, layers, new_num_layers), in create_rule()
137 memcpy(new_rule->layers, layers, in create_rule()
138 flex_array_size(new_rule, layers, num_layers)); in create_rule()
141 new_rule->layers[new_rule->num_layers - 1] = *new_layer; in create_rule()
191 * @layers: One or multiple layers to be copied into the new rule.
192 * @num_layers: The number of @layers entries.
194 * When user space requests to add a new rule to a ruleset, @layers only
199 * When merging a ruleset in a domain, or copying a domain, @layers will be
205 const struct landlock_layer (*const layers)[], in insert_rule() argument
215 if (WARN_ON_ONCE(!layers)) in insert_rule()
244 if ((*layers)[0].level == 0) { in insert_rule()
251 if (WARN_ON_ONCE(this->layers[0].level != 0)) in insert_rule()
253 this->layers[0].access |= (*layers)[0].access; in insert_rule()
257 if (WARN_ON_ONCE(this->layers[0].level == 0)) in insert_rule()
264 new_rule = create_rule(id, &this->layers, this->num_layers, in insert_rule()
265 &(*layers)[0]); in insert_rule()
277 new_rule = create_rule(id, layers, num_layers, NULL); in insert_rule()
302 struct landlock_layer layers[] = { { in landlock_insert_rule() local
309 return insert_rule(ruleset, id, &layers, ARRAY_SIZE(layers)); in landlock_insert_rule()
331 struct landlock_layer layers[] = { { in merge_tree() local
342 if (WARN_ON_ONCE(walker_rule->layers[0].level != 0)) in merge_tree()
345 layers[0].access = walker_rule->layers[0].access; in merge_tree()
347 err = insert_rule(dst, id, &layers, ARRAY_SIZE(layers)); in merge_tree()
421 err = insert_rule(child, id, &walker_rule->layers, in inherit_tree()
632 * the remaining layers for each inode, from the first added layer to in landlock_unmask_layers()
640 &rule->layers[layer_level]; in landlock_unmask_layers()
670 * the bits for all the layers are set where this access right is handled.
679 * in any of the active layers in @domain.