Lines Matching full:layers
73 const struct landlock_layer (*const layers)[], const u32 num_layers, in create_rule() argument
88 new_rule = kzalloc(struct_size(new_rule, layers, new_num_layers), in create_rule()
97 memcpy(new_rule->layers, layers, in create_rule()
98 flex_array_size(new_rule, layers, num_layers)); in create_rule()
101 new_rule->layers[new_rule->num_layers - 1] = *new_layer; in create_rule()
133 * @layers: One or multiple layers to be copied into the new rule.
134 * @num_layers: The number of @layers entries.
136 * When user space requests to add a new rule to a ruleset, @layers only
141 * When merging a ruleset in a domain, or copying a domain, @layers will be
147 const struct landlock_layer (*const layers)[], in insert_rule() argument
156 if (WARN_ON_ONCE(!object || !layers)) in insert_rule()
177 if ((*layers)[0].level == 0) { in insert_rule()
184 if (WARN_ON_ONCE(this->layers[0].level != 0)) in insert_rule()
186 this->layers[0].access |= (*layers)[0].access; in insert_rule()
190 if (WARN_ON_ONCE(this->layers[0].level == 0)) in insert_rule()
197 new_rule = create_rule(object, &this->layers, this->num_layers, in insert_rule()
198 &(*layers)[0]); in insert_rule()
210 new_rule = create_rule(object, layers, num_layers, NULL); in insert_rule()
235 struct landlock_layer layers[] = { { in landlock_insert_rule() local
242 return insert_rule(ruleset, object, &layers, ARRAY_SIZE(layers)); in landlock_insert_rule()
289 struct landlock_layer layers[] = { { in merge_ruleset() local
297 if (WARN_ON_ONCE(walker_rule->layers[0].level != 0)) { in merge_ruleset()
301 layers[0].access = walker_rule->layers[0].access; in merge_ruleset()
302 err = insert_rule(dst, walker_rule->object, &layers, in merge_ruleset()
303 ARRAY_SIZE(layers)); in merge_ruleset()
332 &walker_rule->layers, in inherit_ruleset()