Lines Matching defs:layer_masks

225  * @layer_masks is read and may be updated according to the access request and
234 layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS])
238 if (!access_request || !layer_masks)
262 * Records in @layer_masks which layer grants access to each
267 ARRAY_SIZE(*layer_masks)) {
269 (*layer_masks)[access_bit] &= ~layer_bit;
270 is_empty = is_empty && !(*layer_masks)[access_bit];
304 * Populates @layer_masks such that for each access right in @access_request,
309 * @layer_masks: The layer masks to populate.
317 layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS])
322 memset(layer_masks, 0, sizeof(*layer_masks));
333 ARRAY_SIZE(*layer_masks)) {
341 (*layer_masks)[access_bit] |=
404 * Removes @layer_masks accesses that are not requested.
410 layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS])
415 if (WARN_ON_ONCE(!layer_masks))
418 for_each_clear_bit(access_bit, &access_req, ARRAY_SIZE(*layer_masks))
419 (*layer_masks)[access_bit] = 0;
420 return !memchr_inv(layer_masks, 0, sizeof(*layer_masks));
428 is_eacces(const layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS],
436 if (!layer_masks)
439 for_each_set_bit(access_bit, &access_check, ARRAY_SIZE(*layer_masks)) {
440 if ((*layer_masks)[access_bit])
642 layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {};
644 access_request = init_layer_masks(domain, access_request, &layer_masks);
646 &layer_masks, NULL, 0, NULL, NULL))
1208 layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {};
1232 init_layer_masks(dom, full_access_request, &layer_masks),
1233 &layer_masks, NULL, 0, NULL, NULL)) {
1240 * Calculate the actual allowed access rights from layer_masks.
1246 ARRAY_SIZE(layer_masks)) {
1247 if (!layer_masks[access_bit])