Lines Matching full:misc
8 * a specified wrapper. See Documentation/admin-guide/binfmt-misc.rst for more details.
82 * @misc: handle to binfmt_misc instance
90 static Node *search_binfmt_handler(struct binfmt_misc *misc, in search_binfmt_handler() argument
97 list_for_each_entry(e, &misc->entries, list) { in search_binfmt_handler()
132 * @misc: handle to binfmt_misc instance
140 static Node *get_binfmt_handler(struct binfmt_misc *misc, in get_binfmt_handler() argument
145 read_lock(&misc->entries_lock); in get_binfmt_handler()
146 e = search_binfmt_handler(misc, bprm); in get_binfmt_handler()
149 read_unlock(&misc->entries_lock); in get_binfmt_handler()
184 struct binfmt_misc *misc; in load_binfmt_misc() local
189 misc = smp_load_acquire(&user_ns->binfmt_misc); in load_binfmt_misc()
190 if (misc) in load_binfmt_misc()
191 return misc; in load_binfmt_misc()
207 struct binfmt_misc *misc; in load_misc_binary() local
209 misc = load_binfmt_misc(); in load_misc_binary()
210 if (!misc->enabled) in load_misc_binary()
213 fmt = get_binfmt_handler(misc, bprm); in load_misc_binary()
663 struct binfmt_misc *misc; in bm_evict_inode() local
665 misc = i_binfmt_misc(inode); in bm_evict_inode()
666 write_lock(&misc->entries_lock); in bm_evict_inode()
669 write_unlock(&misc->entries_lock); in bm_evict_inode()
714 * @misc: handle to binfmt_misc instance
724 static void remove_binfmt_handler(struct binfmt_misc *misc, Node *e) in remove_binfmt_handler() argument
726 write_lock(&misc->entries_lock); in remove_binfmt_handler()
728 write_unlock(&misc->entries_lock); in remove_binfmt_handler()
810 struct binfmt_misc *misc; in bm_register_write() local
863 misc = i_binfmt_misc(inode); in bm_register_write()
864 write_lock(&misc->entries_lock); in bm_register_write()
865 list_add(&e->list, &misc->entries); in bm_register_write()
866 write_unlock(&misc->entries_lock); in bm_register_write()
893 struct binfmt_misc *misc; in bm_status_read() local
896 misc = i_binfmt_misc(file_inode(file)); in bm_status_read()
897 s = misc->enabled ? "enabled\n" : "disabled\n"; in bm_status_read()
904 struct binfmt_misc *misc; in bm_status_write() local
909 misc = i_binfmt_misc(file_inode(file)); in bm_status_write()
913 misc->enabled = false; in bm_status_write()
917 misc->enabled = true; in bm_status_write()
933 list_for_each_entry_safe(e, next, &misc->entries, list) in bm_status_write()
934 remove_binfmt_handler(misc, e); in bm_status_write()
971 struct binfmt_misc *misc; in bm_fill_super() local
996 misc = user_ns->binfmt_misc; in bm_fill_super()
997 if (!misc) { in bm_fill_super()
1004 misc = kzalloc(sizeof(struct binfmt_misc), GFP_KERNEL); in bm_fill_super()
1005 if (!misc) in bm_fill_super()
1008 INIT_LIST_HEAD(&misc->entries); in bm_fill_super()
1009 rwlock_init(&misc->entries_lock); in bm_fill_super()
1012 smp_store_release(&user_ns->binfmt_misc, misc); in bm_fill_super()
1026 misc->enabled = true; in bm_fill_super()