Lines Matching +full:protect +full:- +full:exec
1 /* SPDX-License-Identifier: GPL-2.0 */
41 #define FS_OPEN_EXEC 0x00001000 /* File was opened for exec */
49 #define FS_OPEN_EXEC_PERM 0x00040000 /* open/exec event in a permission hook */
67 * Directory entry modification events - reported only to directory
119 * handle_event - main call for a group to handle an fs event
124 * @dir: optional directory associated with event -
131 * handle_inode_event - simple variant of handle_event() for groups that only
136 * @dir: optional directory associated with event -
142 * free_group_priv - called when a group refcnt hits 0 to clean up the private union
143 * freeing_mark - called when a mark is being destroyed for some reason. The group
192 spinlock_t notification_lock; /* protect the notification_list */
203 #define FS_PRIO_2 2 /* fanotify pre-content access */
208 struct mutex mark_mutex; /* protect marks_list */
259 return d_inode(((const struct path *)data)->dentry); in fsnotify_data_inode()
289 #define FSNOTIFY_OBJ_ALL_TYPES_MASK ((1U << FSNOTIFY_OBJ_TYPE_COUNT) - 1)
305 return (iter_info->report_mask & (1U << type)); in fsnotify_iter_should_report_type()
311 iter_info->report_mask |= (1U << type); in fsnotify_iter_set_report_type()
318 iter_info->marks[type] = mark; in fsnotify_iter_set_report_type_mark()
319 iter_info->report_mask |= (1U << type); in fsnotify_iter_set_report_type_mark()
326 return (iter_info->report_mask & FSNOTIFY_OBJ_TYPE_##NAME##_FL) ? \
327 iter_info->marks[FSNOTIFY_OBJ_TYPE_##NAME] : NULL; \
377 * particular entry. obj_lock means either inode->i_lock or
378 * mnt->mnt_root->d_lock depending on the mark type.
381 /* Mask this mark is for [mark->lock, group->mark_mutex] */
389 /* List of marks by group->marks_list. Also reused for queueing
391 * before it can be freed. [group->mark_mutex] */
395 /* List of marks for inode / vfsmount [connector->lock, mark ref] */
399 /* Events types to ignore [mark->lock, group->mark_mutex] */
404 unsigned int flags; /* flags [mark->lock] */
438 if (!(inode->i_fsnotify_mask & FS_EVENT_ON_CHILD)) in fsnotify_inode_watches_children()
442 return inode->i_fsnotify_mask & FS_EVENTS_POSS_ON_CHILD; in fsnotify_inode_watches_children()
447 * filesystem events when those events happens to this dentry->d_inode.
451 assert_spin_locked(&dentry->d_lock); in fsnotify_update_flags()
460 if (fsnotify_inode_watches_children(dentry->d_parent->d_inode)) in fsnotify_update_flags()
461 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; in fsnotify_update_flags()
463 dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; in fsnotify_update_flags()
494 fsnotify_add_event(group, group->overflow_event, NULL, NULL); in fsnotify_queue_overflow()
499 assert_spin_locked(&group->notification_lock); in fsnotify_notify_queue_is_empty()
501 return list_empty(&group->notification_list); in fsnotify_notify_queue_is_empty()
541 return fsnotify_add_mark(mark, &inode->i_fsnotify_marks, in fsnotify_add_inode_mark()
548 return fsnotify_add_mark_locked(mark, &inode->i_fsnotify_marks, in fsnotify_add_inode_mark_locked()
586 INIT_LIST_HEAD(&event->list); in fsnotify_init_event()