Lines Matching refs:layers
457 for (size_t i = 0; i < ARRAY_SIZE(new_parent->layers); i++) { in may_refer()
458 access_mask_t child_access = src_parent->layers[i].access & in may_refer()
459 src_child->layers[i].access; in may_refer()
460 access_mask_t parent_access = new_parent->layers[i].access; in may_refer()
506 .layers[0].access = LANDLOCK_ACCESS_FS_EXECUTE | in test_no_more_access()
510 .layers[0].access = LANDLOCK_ACCESS_FS_EXECUTE | in test_no_more_access()
514 .layers[0].access = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
517 .layers[1].access = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
520 .layers[0].access = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
521 .layers[1].access = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
613 for (size_t i = 0; i < ARRAY_SIZE(masks->layers); i++) { in is_layer_masks_allowed()
614 if (masks->layers[i].access) in is_layer_masks_allowed()
633 for (size_t i = 0; i < ARRAY_SIZE(masks->layers); i++) { in scope_to_request()
634 masks->layers[i].access &= access_request; in scope_to_request()
635 if (masks->layers[i].access) in scope_to_request()
651 KUNIT_EXPECT_EQ(test, 0, (access_mask_t)masks.layers[0].access); in test_scope_to_request_with_exec_none()
658 .layers[0].access = LANDLOCK_ACCESS_FS_EXECUTE, in test_scope_to_request_with_exec_some()
659 .layers[1].access = LANDLOCK_ACCESS_FS_WRITE_FILE, in test_scope_to_request_with_exec_some()
670 (access_mask_t)masks.layers[0].access); in test_scope_to_request_with_exec_some()
671 KUNIT_EXPECT_EQ(test, 0, (access_mask_t)masks.layers[1].access); in test_scope_to_request_with_exec_some()
678 .layers[0].access = LANDLOCK_ACCESS_FS_EXECUTE, in test_scope_to_request_without_access()
679 .layers[1].access = LANDLOCK_ACCESS_FS_WRITE_FILE, in test_scope_to_request_without_access()
684 KUNIT_EXPECT_EQ(test, 0, (access_mask_t)masks.layers[0].access); in test_scope_to_request_without_access()
685 KUNIT_EXPECT_EQ(test, 0, (access_mask_t)masks.layers[1].access); in test_scope_to_request_without_access()
700 for (size_t i = 0; i < ARRAY_SIZE(masks->layers); i++) { in is_eacces()
702 if (masks->layers[i].access & access_request & in is_eacces()
727 .layers[0].access = LANDLOCK_ACCESS_FS_REFER, in test_is_eacces_with_refer()
739 .layers[0].access = LANDLOCK_ACCESS_FS_WRITE_FILE, in test_is_eacces_with_write()
1740 if (masks->layers[client_layer].access & access && in unmask_scoped_access()
1742 masks->layers[client_layer].access &= ~access; in unmask_scoped_access()
1899 for (size_t i = 0; i < ARRAY_SIZE(layer_masks.layers); i++) in hook_file_open()
1900 allowed_access &= ~layer_masks.layers[i].access; in hook_file_open()