Home
last modified time | relevance | path

Searched refs:fg (Results 1 – 25 of 36) sorted by relevance

12

/xnu-11215/security/
H A Dmac_file.c64 MAC_CHECK(file_check_dup, cred, fg, NULL, newfd); in mac_file_check_dup()
92 MAC_CHECK(file_check_inherit, cred, fg, NULL); in mac_file_check_inherit()
101 MAC_CHECK(file_check_receive, cred, fg, NULL); in mac_file_check_receive()
155 struct fileglob *fg, off_t slice_offset, in mac_file_check_library_validation() argument
203 MAC_PERFORM(file_notify_close, cred, fg, NULL, ((fg->fg_flag & FWASWRITTEN) ? 1 : 0)); in mac_file_notify_close()
216 if (!fg || FILEGLOB_DTYPE(fg) != DTYPE_VNODE) { in mac_file_setxattr()
220 vp = (struct vnode *)fg_get_data(fg); in mac_file_setxattr()
236 if (!fg || FILEGLOB_DTYPE(fg) != DTYPE_VNODE) { in mac_file_getxattr()
240 vp = (struct vnode *)fg_get_data(fg); in mac_file_getxattr()
255 if (!fg || FILEGLOB_DTYPE(fg) != DTYPE_VNODE) { in mac_file_removexattr()
[all …]
H A Dmac_necp.c56 mac_necp_check_client_action(proc_t proc, struct fileglob *fg, uint32_t action) in mac_necp_check_client_action() argument
71 MAC_CHECK(necp_check_client_action, current_cached_proc_cred(proc), fg, action); in mac_necp_check_client_action()
H A Dmac_framework.h193 int mac_file_check_fcntl(kauth_cred_t cred, struct fileglob *fg, int cmd,
195 int mac_file_check_get(kauth_cred_t cred, struct fileglob *fg,
198 int mac_file_check_inherit(kauth_cred_t cred, struct fileglob *fg) __result_use_check;
199 int mac_file_check_ioctl(kauth_cred_t cred, struct fileglob *fg,
201 int mac_file_check_lock(kauth_cred_t cred, struct fileglob *fg, int op,
204 struct fileglob *fg, off_t slice_offset,
206 int mac_file_check_mmap(kauth_cred_t cred, struct fileglob *fg,
208 void mac_file_check_mmap_downgrade(kauth_cred_t cred, struct fileglob *fg,
210 int mac_file_check_receive(kauth_cred_t cred, struct fileglob *fg) __result_use_check;
211 int mac_file_check_set(kauth_cred_t cred, struct fileglob *fg,
[all …]
H A Dmac_policy.h775 struct fileglob *fg,
807 struct fileglob *fg,
827 struct fileglob *fg,
847 struct fileglob *fg,
865 struct fileglob *fg,
882 struct fileglob *fg,
905 struct fileglob *fg,
926 struct fileglob *fg,
951 struct fileglob *fg,
978 struct fileglob *fg,
[all …]
H A Dmac_base.c1769 mac_file_setxattr(struct fileglob *fg __unused, const char *name __unused, char *buf __unused, size… in mac_file_setxattr()
1775 mac_file_getxattr(struct fileglob *fg __unused, const char *name __unused, in mac_file_getxattr()
1782 mac_file_removexattr(struct fileglob *fg __unused, const char *name __unused) in mac_file_removexattr()
/xnu-11215/osfmk/kern/
H A Dipc_misc.c53 fileport_alloc(struct fileglob *fg) in fileport_alloc() argument
96 struct fileglob *fg; in fileport_no_senders() local
98 fg = ipc_kobject_dealloc_port(port, mscount, IKOT_FILEPORT); in fileport_no_senders()
100 fileport_releasefg(fg); in fileport_no_senders()
125 struct fileglob *fg; in fileport_invoke() local
134 if ((fg = fileport_port_to_fileglob(fileport)) != NULL) { in fileport_invoke()
135 *rval = (*action)(name, fg, arg); in fileport_invoke()
180 struct fileglob *fg; variable
184 fg = fileport_port_to_fileglob(ip_object_to_port(io));
186 if (fg) {
[all …]
/xnu-11215/bsd/kern/
H A Dkern_cs.c1031 vp = (struct vnode *)fg_get_data(fg); in csfg_get_platform_binary()
1071 vp = (struct vnode *)fg_get_data(fg); in csfg_get_supplement_platform_binary()
1111 vp = (struct vnode *)fg_get_data(fg); in csfg_get_cdhash()
1137 vp = (struct vnode *)fg_get_data(fg); in csfg_get_supplement_cdhash()
1168 vp = (struct vnode *)fg_get_data(fg); in csfg_get_supplement_linkage_cdhash()
1207 vp = (struct vnode *)fg_get_data(fg); in csfg_get_signer_type()
1247 vp = (struct vnode *)fg_get_data(fg); in csfg_get_supplement_signer_type()
1294 vp = (struct vnode *)fg_get_data(fg); in csfg_get_validation_category()
1324 vp = (struct vnode *)fg_get_data(fg); in csfg_get_supplement_validation_category()
1355 csfg_get_teamid(struct fileglob *fg) in csfg_get_teamid() argument
[all …]
H A Duipc_usrreq.c2269 msleep(&fg->fg_lflags, &fg->fg_lock, 0, "fg_insertuipc", NULL); in fg_insertuipc_mark()
2273 fg->fg_msgcount++; in fg_insertuipc_mark()
2307 wakeup(&fg->fg_lflags); in fg_insertuipc()
2335 msleep(&fg->fg_lflags, &fg->fg_lock, 0, "fg_removeuipc", NULL); in fg_removeuipc_mark()
2337 fg->fg_msgcount--; in fg_removeuipc_mark()
2371 wakeup(&fg->fg_lflags); in fg_removeuipc()
2556 struct fileglob *fg; in unp_gc() local
2722 if (os_ref_get_count_raw(&fg->fg_count) == fg->fg_msgcount) { in unp_gc()
2724 *fpp++ = fg; in unp_gc()
2832 fg_removeuipc(fg); in unp_discard()
[all …]
H A Dkern_descrip.c181 struct fileglob *fg; in fg_alloc_init() local
194 return fg; in fg_alloc_init()
223 zfree(fg_zone, fg); in fg_free()
254 if (fg == NULL) { in fg_drop()
295 fg_free(fg); in fg_drop()
351 assert(fg != NULL); in fg_transfer_filelocks()
1382 fp->fp_glob = fg; in falloc_withinit()
2018 fg = fp->fp_glob; in fp_get_pipe_id()
5859 fg_ref(p, fg); in sys_fileport_makeport()
5953 fg_ref(p, fg); in fileport_makefd()
[all …]
H A Dkern_guarded.c932 struct fileglob *fg = fp->fp_glob; in vnguard_sysc_getguardattr() local
933 if (FILEGLOB_DTYPE(fg) != DTYPE_VNODE) { in vnguard_sysc_getguardattr()
937 struct vnode *vp = fg_get_data(fg); in vnguard_sysc_getguardattr()
994 struct fileglob *fg = fp->fp_glob; in vnguard_sysc_setguard() local
1008 struct vnode *vp = fg_get_data(fg); in vnguard_sysc_setguard()
1033 struct vng_owner *vgo = fg->fg_vgo; in vnguard_sysc_setguard()
1047 fg->fg_vgo = nvgo; in vnguard_sysc_setguard()
1075 fg->fg_vgo = nvgo; in vnguard_sysc_setguard()
1134 struct vng_owner *lvgo = fg->fg_vgo; in vng_file_label_destroy()
1139 fg->fg_vgo = NULL; in vng_file_label_destroy()
[all …]
H A Dsys_socket.c409 soo_close(struct fileglob *fg, __unused vfs_context_t ctx) in soo_close() argument
414 sp = (struct socket *)fg_get_data(fg); in soo_close()
415 fg_set_data(fg, NULL); in soo_close()
H A Dposix_shm.c186 static int pshm_closefile(struct fileglob *fg, vfs_context_t ctx);
1067 pshm_closefile(struct fileglob *fg, __unused vfs_context_t ctx) in pshm_closefile() argument
1074 pnode = (pshmnode_t *)fg_get_data(fg); in pshm_closefile()
1077 fg_set_data(fg, NULL); /* set fg_data to NULL to avoid racing close()es */ in pshm_closefile()
H A Dproc_info.c633 file_type_t fdtype = FILEGLOB_DTYPE(fg); in proc_pidfileportlist()
3007 struct fileglob *fg, void *arg) in proc_fileport_info() argument
3014 fp->fp_glob = fg; in proc_fileport_info()
3020 if (FILEGLOB_DTYPE(fg) != DTYPE_VNODE) { in proc_fileport_info()
3024 vp = (struct vnode *)fg_get_data(fg); in proc_fileport_info()
3032 if (FILEGLOB_DTYPE(fg) != DTYPE_SOCKET) { in proc_fileport_info()
3036 so = (socket_t)fg_get_data(fg); in proc_fileport_info()
3044 if (FILEGLOB_DTYPE(fg) != DTYPE_PSXSHM) { in proc_fileport_info()
3048 pshm = (struct pshmnode *)fg_get_data(fg); in proc_fileport_info()
3056 if (FILEGLOB_DTYPE(fg) != DTYPE_PIPE) { in proc_fileport_info()
[all …]
H A Dsys_pipe.c175 static int pipe_close(struct fileglob *fg, vfs_context_t ctx);
1306 pipe_close(struct fileglob *fg, __unused vfs_context_t ctx) in pipe_close() argument
1311 cpipe = (struct pipe *)fg_get_data(fg); in pipe_close()
1312 fg_set_data(fg, NULL); in pipe_close()
H A Dposix_sem.c1028 psem_closefile(struct fileglob *fg, __unused vfs_context_t ctx) in psem_closefile() argument
1034 return psem_close((struct psemnode *)fg_get_data(fg)); in psem_closefile()
H A Dkern_proc.c6314 struct fileglob *fg = fp->fp_glob; in networking_defunct_callout() local
6316 switch (FILEGLOB_DTYPE(fg)) { in networking_defunct_callout()
6318 struct socket *so = (struct socket *)fg_get_data(fg); in networking_defunct_callout()
6331 (struct necp_fd_data *)fg_get_data(fg)); in networking_defunct_callout()
6341 (struct kern_channel *)fg_get_data(fg); in networking_defunct_callout()
6367 struct fileglob *fg = fp->fp_glob; in networking_defunct_callout() local
6369 if (FILEGLOB_DTYPE(fg) == DTYPE_CHANNEL) { in networking_defunct_callout()
6371 (struct kern_channel *)fg_get_data(fg)); in networking_defunct_callout()
/xnu-11215/bsd/sys/
H A Dfile_internal.h198 ofd_to_id(const struct fileglob *fg) in ofd_to_id() argument
208 #define FILEGLOB_DTYPE(fg) ((const file_type_t)((fg)->fg_ops->fo_type)) argument
246 fg_ref(proc_t proc, struct fileglob *fg);
258 fg_drop_live(struct fileglob *fg);
281 fg_drop(proc_t p, struct fileglob *fg);
290 fg_sendable(struct fileglob *fg);
306 fg_get_data_volatile(struct fileglob *fg);
324 fg_get_data(struct fileglob *fg) in fg_get_data() argument
326 return fg_get_data_volatile(fg); in fg_get_data()
342 fg_set_data(struct fileglob *fg, void *fg_data);
[all …]
H A Dcodesign.h176 int csfg_get_supplement_prod_signed(struct fileglob *fg);
179 unsigned int csfg_get_validation_category(struct fileglob *fg, uint64_t offset);
180 unsigned int csfg_get_supplement_validation_category(struct fileglob *fg, uint64_t offset);
181 const char *csfg_get_identity(struct fileglob *fg, off_t offset);
H A Dfile.h103 struct vnode *fg_get_vnode(struct fileglob *fg);
H A Dguarded.h175 extern void vng_file_label_destroy(struct fileglob *fg);
/xnu-11215/bsd/vfs/
H A Dvfs_vnops.c1030 vn_offset_lock(struct fileglob *fg) in vn_offset_lock() argument
1032 lck_mtx_lock_spin(&fg->fg_lock); in vn_offset_lock()
1034 fg->fg_lflags |= FG_OFF_LOCKWANT; in vn_offset_lock()
1035 msleep(&fg->fg_lflags, &fg->fg_lock, PVFS | PSPIN, in vn_offset_lock()
1038 fg->fg_lflags |= FG_OFF_LOCKED; in vn_offset_lock()
1039 lck_mtx_unlock(&fg->fg_lock); in vn_offset_lock()
1043 vn_offset_unlock(struct fileglob *fg) in vn_offset_unlock() argument
1047 lck_mtx_lock_spin(&fg->fg_lock); in vn_offset_unlock()
1052 lck_mtx_unlock(&fg->fg_lock); in vn_offset_unlock()
1054 wakeup(&fg->fg_lflags); in vn_offset_unlock()
[all …]
H A Dvfs_xattr.c3031 struct fileglob *fg = NULL; in open_xattrfile() local
3233 fg = fg_alloc_init(context); in open_xattrfile()
3235 fg->fg_ops = &vnops; in open_xattrfile()
3236 fg_set_data(fg, xvp); in open_xattrfile()
3256 fg->fg_flag |= FWASLOCKED; in open_xattrfile()
3274 if (fg != NULL) { in open_xattrfile()
3281 fg = NULL; in open_xattrfile()
3317 *xfgp = fg; in open_xattrfile()
4098 fg_ref(FG_NOPROC, fg); in make_xattrfile_port()
4100 fileport = fileport_alloc(fg); in make_xattrfile_port()
[all …]
/xnu-11215/bsd/skywalk/nexus/
H A Dnexus_syscalls.c67 nxop_close(struct fileglob *fg, vfs_context_t ctx) in nxop_close() argument
73 nxctl = (struct nxctl *)fg_get_data(fg); in nxop_close()
74 fg_set_data(fg, NULL); in nxop_close()
/xnu-11215/bsd/skywalk/channel/
H A Dchannel_syscalls.c107 chop_close(struct fileglob *fg, vfs_context_t ctx) in chop_close() argument
112 ch = (struct kern_channel *)fg_get_data(fg); in chop_close()
113 fg_set_data(fg, NULL); in chop_close()
/xnu-11215/bsd/netinet/
H A Din_pcblist.c879 struct fileglob *fg = fp->fp_glob; in shutdown_sockets_on_interface_proc_callout() local
885 if (FILEGLOB_DTYPE(fg) != DTYPE_SOCKET) { in shutdown_sockets_on_interface_proc_callout()

12