Lines Matching refs:access

411 	for (size_t i = 0; i < ARRAY_SIZE(new_parent->access); i++) {  in may_refer()
412 access_mask_t child_access = src_parent->access[i] & in may_refer()
413 src_child->access[i]; in may_refer()
414 access_mask_t parent_access = new_parent->access[i]; in may_refer()
460 .access[0] = LANDLOCK_ACCESS_FS_EXECUTE | in test_no_more_access()
464 .access[0] = LANDLOCK_ACCESS_FS_EXECUTE | in test_no_more_access()
468 .access[0] = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
471 .access[1] = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
474 .access[0] = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
475 .access[1] = LANDLOCK_ACCESS_FS_EXECUTE, in test_no_more_access()
567 return !memchr_inv(&masks->access, 0, sizeof(masks->access)); in is_layer_masks_allowed()
583 for (size_t i = 0; i < ARRAY_SIZE(masks->access); i++) { in scope_to_request()
584 masks->access[i] &= access_request; in scope_to_request()
585 if (masks->access[i]) in scope_to_request()
601 KUNIT_EXPECT_EQ(test, 0, masks.access[0]); in test_scope_to_request_with_exec_none()
608 .access[0] = LANDLOCK_ACCESS_FS_EXECUTE, in test_scope_to_request_with_exec_some()
609 .access[1] = LANDLOCK_ACCESS_FS_WRITE_FILE, in test_scope_to_request_with_exec_some()
615 KUNIT_EXPECT_EQ(test, LANDLOCK_ACCESS_FS_EXECUTE, masks.access[0]); in test_scope_to_request_with_exec_some()
616 KUNIT_EXPECT_EQ(test, 0, masks.access[1]); in test_scope_to_request_with_exec_some()
623 .access[0] = LANDLOCK_ACCESS_FS_EXECUTE, in test_scope_to_request_without_access()
624 .access[1] = LANDLOCK_ACCESS_FS_WRITE_FILE, in test_scope_to_request_without_access()
629 KUNIT_EXPECT_EQ(test, 0, masks.access[0]); in test_scope_to_request_without_access()
630 KUNIT_EXPECT_EQ(test, 0, masks.access[1]); in test_scope_to_request_without_access()
645 for (size_t i = 0; i < ARRAY_SIZE(masks->access); i++) { in is_eacces()
647 if (masks->access[i] & access_request & in is_eacces()
672 .access[0] = LANDLOCK_ACCESS_FS_REFER, in test_is_eacces_with_refer()
684 .access[0] = LANDLOCK_ACCESS_FS_WRITE_FILE, in test_is_eacces_with_write()
930 log_request_parent1->access = access_masked_parent1; in is_access_to_paths_allowed()
938 log_request_parent2->access = access_masked_parent2; in is_access_to_paths_allowed()
1223 if (request1.access) { in current_check_refer_path()
1227 if (request2.access) { in current_check_refer_path()
1577 access_mask_t access = 0; in get_required_file_open_access() local
1583 access = LANDLOCK_ACCESS_FS_READ_FILE; in get_required_file_open_access()
1586 access |= LANDLOCK_ACCESS_FS_WRITE_FILE; in get_required_file_open_access()
1589 access |= LANDLOCK_ACCESS_FS_EXECUTE; in get_required_file_open_access()
1590 return access; in get_required_file_open_access()
1657 for (size_t i = 0; i < ARRAY_SIZE(layer_masks.access); i++) in hook_file_open()
1658 allowed_access &= ~layer_masks.access[i]; in hook_file_open()
1677 request.access = open_access_request; in hook_file_open()
1704 .access = LANDLOCK_ACCESS_FS_TRUNCATE, in hook_file_truncate()
1743 .access = LANDLOCK_ACCESS_FS_IOCTL_DEV, in hook_file_ioctl_common()