Lines Matching refs:layer_masks

568 	layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS])  in is_layer_masks_allowed()
570 return !memchr_inv(layer_masks, 0, sizeof(*layer_masks)); in is_layer_masks_allowed()
580 layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS]) in scope_to_request()
585 if (WARN_ON_ONCE(!layer_masks)) in scope_to_request()
588 for_each_clear_bit(access_bit, &access_req, ARRAY_SIZE(*layer_masks)) in scope_to_request()
589 (*layer_masks)[access_bit] = 0; in scope_to_request()
591 return is_layer_masks_allowed(layer_masks); in scope_to_request()
599 layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {}; in test_scope_to_request_with_exec_none() local
603 &layer_masks)); in test_scope_to_request_with_exec_none()
605 layer_masks[BIT_INDEX(LANDLOCK_ACCESS_FS_EXECUTE)]); in test_scope_to_request_with_exec_none()
607 layer_masks[BIT_INDEX(LANDLOCK_ACCESS_FS_WRITE_FILE)]); in test_scope_to_request_with_exec_none()
613 layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = { in test_scope_to_request_with_exec_some() local
620 &layer_masks)); in test_scope_to_request_with_exec_some()
622 layer_masks[BIT_INDEX(LANDLOCK_ACCESS_FS_EXECUTE)]); in test_scope_to_request_with_exec_some()
624 layer_masks[BIT_INDEX(LANDLOCK_ACCESS_FS_WRITE_FILE)]); in test_scope_to_request_with_exec_some()
630 layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = { in test_scope_to_request_without_access() local
636 KUNIT_EXPECT_TRUE(test, scope_to_request(0, &layer_masks)); in test_scope_to_request_without_access()
638 layer_masks[BIT_INDEX(LANDLOCK_ACCESS_FS_EXECUTE)]); in test_scope_to_request_without_access()
640 layer_masks[BIT_INDEX(LANDLOCK_ACCESS_FS_WRITE_FILE)]); in test_scope_to_request_without_access()
650 is_eacces(const layer_mask_t (*const layer_masks)[LANDLOCK_NUM_ACCESS_FS], in is_eacces()
658 if (!layer_masks) in is_eacces()
661 for_each_set_bit(access_bit, &access_check, ARRAY_SIZE(*layer_masks)) { in is_eacces()
662 if ((*layer_masks)[access_bit]) in is_eacces()
675 const layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {}; in test_is_eacces_with_none() local
677 IE_FALSE(&layer_masks, 0); in test_is_eacces_with_none()
678 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_REFER); in test_is_eacces_with_none()
679 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_EXECUTE); in test_is_eacces_with_none()
680 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_WRITE_FILE); in test_is_eacces_with_none()
685 const layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = { in test_is_eacces_with_refer() local
689 IE_FALSE(&layer_masks, 0); in test_is_eacces_with_refer()
690 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_REFER); in test_is_eacces_with_refer()
691 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_EXECUTE); in test_is_eacces_with_refer()
692 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_WRITE_FILE); in test_is_eacces_with_refer()
697 const layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = { in test_is_eacces_with_write() local
701 IE_FALSE(&layer_masks, 0); in test_is_eacces_with_write()
702 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_REFER); in test_is_eacces_with_write()
703 IE_FALSE(&layer_masks, LANDLOCK_ACCESS_FS_EXECUTE); in test_is_eacces_with_write()
705 IE_TRUE(&layer_masks, LANDLOCK_ACCESS_FS_WRITE_FILE); in test_is_eacces_with_write()
935 log_request_parent1->layer_masks = layer_masks_parent1; in is_access_to_paths_allowed()
945 log_request_parent2->layer_masks = layer_masks_parent2; in is_access_to_paths_allowed()
960 layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {}; in current_check_access_path() local
967 access_request, &layer_masks, in current_check_access_path()
970 &layer_masks, &request, NULL, 0, NULL, in current_check_access_path()
1618 layer_mask_t layer_masks[LANDLOCK_NUM_ACCESS_FS] = {}; in hook_file_open() local
1648 full_access_request, &layer_masks, in hook_file_open()
1650 &layer_masks, &request, NULL, 0, NULL, NULL, NULL)) { in hook_file_open()
1663 ARRAY_SIZE(layer_masks)) { in hook_file_open()
1664 if (!layer_masks[access_bit]) in hook_file_open()
1678 _LANDLOCK_ACCESS_FS_OPTIONAL, optional_access, &layer_masks, in hook_file_open()
1679 ARRAY_SIZE(layer_masks)); in hook_file_open()