| /f-stack/freebsd/security/mac/ |
| H A D | mac_vfs.c | 235 vp->v_label); in mac_devfs_update() 244 de, de->de_label, vp, vp->v_label); in mac_devfs_vnode_associate() 265 mp->mnt_label, vp, vp->v_label); in mac_vnode_associate_singlelabel() 297 dvp->v_label, vp, vp->v_label, cnp); in mac_vnode_create_extattr() 329 MAC_POLICY_CHECK(vnode_setlabel_extattr, cred, vp, vp->v_label, in mac_vnode_setlabel_extattr() 660 vp); in mac_vnode_check_poll() 679 vp); in mac_vnode_check_read_impl() 765 vp != NULL ? vp->v_label : NULL, samedir, cnp); in mac_vnode_check_rename_to() 780 MAC_POLICY_CHECK(vnode_check_revoke, cred, vp, vp->v_label); in mac_vnode_check_revoke() 904 vp); in mac_vnode_check_stat_impl() [all …]
|
| H A D | mac_system.c | 133 ASSERT_VOP_LOCKED(vp, "mac_kld_check_load"); in mac_kld_check_load() 135 MAC_POLICY_CHECK(kld_check_load, cred, vp, vp->v_label); in mac_kld_check_load() 136 MAC_CHECK_PROBE2(kld_check_load, error, cred, vp); in mac_kld_check_load() 162 if (vp != NULL) { in mac_system_check_acct() 163 ASSERT_VOP_LOCKED(vp, "mac_system_check_acct"); in mac_system_check_acct() 166 MAC_POLICY_CHECK(system_check_acct, cred, vp, in mac_system_check_acct() 167 vp != NULL ? vp->v_label : NULL); in mac_system_check_acct() 194 ASSERT_VOP_LOCKED(vp, "mac_system_check_swapon"); in mac_system_check_swapon() 196 MAC_POLICY_CHECK(system_check_swapon, cred, vp, vp->v_label); in mac_system_check_swapon() 210 ASSERT_VOP_LOCKED(vp, "mac_system_check_swapoff"); in mac_system_check_swapoff() [all …]
|
| H A D | mac_framework.h | 142 struct vnode *vp); 144 struct vnode *vp); 529 struct ucred *file_cred, struct vnode *vp); 534 struct vnode *vp) in mac_vnode_check_poll() argument 580 struct ucred *file_cred, struct vnode *vp); 589 struct vnode *vp) in mac_vnode_check_stat() argument 599 struct ucred *file_cred, struct vnode *vp); 608 struct vnode *vp) in mac_vnode_check_read() argument 618 struct ucred *file_cred, struct vnode *vp); 627 struct vnode *vp) in mac_vnode_check_write() argument [all …]
|
| /f-stack/freebsd/kern/ |
| H A D | vfs_subr.c | 543 vp->v_vnlock = &vp->v_lock; in vnode_init() 553 bufobj_init(&vp->v_bufobj, vp); in vnode_init() 1583 VNASSERT(vp->v_holdcnt, vp, in vtryrecycle() 1884 vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; in freevnode() 2077 if (vp->v_object != NULL && vp->v_object->handle != vp) in vinvalbuf() 2971 VNPASS(vp->v_holdcnt > 0, vp); in vget_finish() 3483 VNASSERT(vp->v_type == VBAD || vp->v_type == VNON, vp, in vdbatch_dequeue() 3558 VNPASS(VN_IS_DOOMED(vp), vp); in vdropl_final() 3937 VNASSERT(vp->v_holdcnt, vp, in vgonel() 4061 vp->v_vnlock = &vp->v_lock; in vgonel() [all …]
|
| H A D | vfs_hash.c | 64 return (vp->v_hash + vp->v_mount->mnt_hashseed); in vfs_hash_index() 78 struct vnode *vp; in vfs_hash_get() local 98 *vpp = vp; in vfs_hash_get() 113 struct vnode *vp; in vfs_hash_ref() local 124 vhold(vp); in vfs_hash_ref() 126 vref(vp); in vfs_hash_ref() 127 vdrop(vp); in vfs_hash_ref() 128 *vpp = vp; in vfs_hash_ref() 175 vgone(vp); in vfs_hash_insert() 176 vput(vp); in vfs_hash_insert() [all …]
|
| H A D | vfs_default.c | 298 KASSERT(VOP_ISLOCKED(vp), ("vp %p is not locked", vp)); in get_next_dirent() 359 KASSERT(VOP_ISLOCKED(vp), ("vp %p is not locked", vp)); in dirent_exists() 475 lf_purgelocks(vp, &vp->v_lockf); in vop_stdadvlockpurge() 579 MPASS(vp->v_vnlock == &vp->v_lock); 604 MPASS(vp->v_vnlock == &vp->v_lock); 617 MPASS(vp->v_vnlock == &vp->v_lock); 851 VREF(vp); in vop_stdvptocnp() 1202 VNPASS((vp->v_iflag & VI_TEXT_REF) == 0, vp); in vop_stdset_text() 1253 VNASSERT(vp->v_writecount + ap->a_inc >= 0, vp, in vop_stdadd_writecount() 1375 vput(vp); [all …]
|
| H A D | vnode_if.src | 126 %% open vp L L L 138 %% close vp L L L 169 %% access vp L L L 189 %% stat vp L L L 227 %% read vp L L L 249 %% write vp L L L 261 %% ioctl vp U U U 273 %% poll vp U U U 299 %% fsync vp L L L 321 %% link vp E E E [all …]
|
| H A D | vfs_vnops.c | 324 vput(vp); in vn_open_cred() 417 __func__, vp, vp->v_writecount); in vn_open_vnode() 433 vref(vp); in vn_open_vnode() 484 __func__, vp, vp->v_writecount); in vn_close1() 490 vput(vp); in vn_close1() 617 vp); in vn_rdwr() 620 vp); in vn_rdwr() 632 args.args.vop_args.vp = vp; in vn_rdwr() 1645 vp); in vn_ioctl() 1741 VNPASS(vp->v_holdcnt > 0, vp); in _vn_lock() [all …]
|
| H A D | vfs_cluster.c | 116 bo = &vp->v_bufobj; in cluster_read() 410 pbgetvp(vp, bp); in cluster_rbuild() 677 vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; in cluster_write() 679 if (vp->v_clen == 0 || lbn != vp->v_lastw + 1 || in cluster_write() 699 cursize = vp->v_lastw - vp->v_cstart + 1; in cluster_write() 701 lbn != vp->v_lastw + 1 || vp->v_clen <= cursize) { in cluster_write() 764 vp->v_clen = 0; in cluster_write() 778 } else if (lbn == vp->v_cstart + vp->v_clen) { in cluster_write() 786 cluster_wbuild_wb(vp, lblocksize, vp->v_cstart, in cluster_write() 789 vp->v_clen = 0; in cluster_write() [all …]
|
| H A D | vfs_cache.c | 715 vp->v_nchash = fnv_32_buf(&vp, sizeof(vp), FNV1_32_INIT); in cache_prehash() 2173 if (vp == NULL || vp->v_type != VDIR) in cache_enter_lock() 2299 VNPASS(!VN_IS_DOOMED(vp), vp); in cache_enter_time() 2300 VNPASS(vp->v_type != VNON, vp); in cache_enter_time() 2693 VNPASS(VN_IS_DOOMED(vp), vp); in cache_purge_vgone() 3116 VNPASS(vp->v_type == VDIR || VN_IS_DOOMED(vp), vp); in vn_fullpath_dir() 3117 VNPASS(vp->v_usecount > 0, vp); in vn_fullpath_dir() 3260 if (vp == rdir || vp == rootvnode) { in vn_fullpath_any_smr() 3345 if (vp == rdir || vp == rootvnode) in vn_fullpath_any_smr() 5076 VNPASS(vp->v_type == VDIR || vp->v_type == VBAD, vp); in cache_fplookup_climb_mount() [all …]
|
| H A D | vfs_syscalls.c | 911 vput(vp); in sys_fchdir() 912 vp = tdp; in sys_fchdir() 915 vput(vp); in sys_fchdir() 2109 vput(vp); in kern_accessat() 2606 vput(vp); in kern_readlinkat() 2665 if (vp->v_type == VCHR || vp->v_type == VBLK) { in setfflags() 3886 vput(vp); in kern_frmdirat() 4148 vp = vp->v_mount->mnt_vnodecovered; in kern_getdirentries() 4210 if (vp->v_type != VCHR || vp->v_rdev == NULL) { in sys_revoke() 4230 vput(vp); in sys_revoke() [all …]
|
| /f-stack/freebsd/sys/ |
| H A D | vnode.h | 224 #define VN_KNLIST_EMPTY(vp) ((vp)->v_pollinfo == NULL || \ argument 234 #define VN_KNOTE_UNLOCKED(vp, b) VN_KNOTE(vp, b, 0) argument 436 #define VREF(vp) vref(vp) argument 457 #define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock) argument 459 #define VI_TRYLOCK(vp) mtx_trylock(&(vp)->v_interlock) argument 460 #define VI_UNLOCK(vp) mtx_unlock(&(vp)->v_interlock) argument 461 #define VI_MTX(vp) (&(vp)->v_interlock) argument 463 #define VN_LOCK_AREC(vp) lockallowrecurse((vp)->v_vnlock) argument 597 if (vp && (vp->v_type == VREG || (vmiodirenable && vp->v_type == VDIR))) in vn_canvmio() 797 rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp)) [all …]
|
| /f-stack/freebsd/ddb/ |
| H A D | db_variables.c | 63 struct db_variable *vp; in db_find_variable() local 68 for (vp = db_vars; vp < db_evars; vp++) { in db_find_variable() 70 *varp = vp; in db_find_variable() 74 for (vp = db_regs; vp < db_eregs; vp++) { in db_find_variable() 76 *varp = vp; in db_find_variable() 88 struct db_variable *vp; in db_get_variable() local 99 struct db_variable *vp; in db_set_variable() local 113 *valuep = *(vp->valuep); in db_read_variable() 125 *(vp->valuep) = value; in db_write_variable() 134 struct db_variable *vp; in db_set_cmd() local [all …]
|
| /f-stack/freebsd/security/mac_bsdextended/ |
| H A D | ugidfw_vnode.c | 100 return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); in ugidfw_vnode_check_deleteacl() 108 return (ugidfw_check_vp(cred, vp, MBI_WRITE)); in ugidfw_vnode_check_deleteextattr() 125 return (ugidfw_check_vp(cred, vp, MBI_STAT)); in ugidfw_vnode_check_getacl() 133 return (ugidfw_check_vp(cred, vp, MBI_READ)); in ugidfw_vnode_check_getextattr() 146 error = ugidfw_check_vp(cred, vp, MBI_WRITE); in ugidfw_vnode_check_link() 157 return (ugidfw_check_vp(cred, vp, MBI_READ)); in ugidfw_vnode_check_listextattr() 189 return (ugidfw_check_vp(cred, vp, MBI_READ)); in ugidfw_vnode_check_readdlink() 202 return (ugidfw_check_vp(cred, vp, MBI_WRITE)); in ugidfw_vnode_check_rename_from() 215 if (vp != NULL) in ugidfw_vnode_check_rename_to() 216 error = ugidfw_check_vp(cred, vp, MBI_WRITE); in ugidfw_vnode_check_rename_to() [all …]
|
| H A D | ugidfw_internal.h | 45 int ugidfw_system_check_acct(struct ucred *cred, struct vnode *vp, 47 int ugidfw_system_check_auditctl(struct ucred *cred, struct vnode *vp, 49 int ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp, 55 int ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, 67 struct vnode *vp, struct label *vplabel, int attrnamespace, 69 int ugidfw_vnode_check_exec(struct ucred *cred, struct vnode *vp, 72 int ugidfw_vnode_check_getacl(struct ucred *cred, struct vnode *vp, 77 struct label *dvplabel, struct vnode *vp, struct label *label, 83 int ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp, 95 int ugidfw_vnode_check_revoke(struct ucred *cred, struct vnode *vp, [all …]
|
| H A D | ugidfw_system.c | 64 ugidfw_system_check_acct(struct ucred *cred, struct vnode *vp, in ugidfw_system_check_acct() argument 68 if (vp != NULL) in ugidfw_system_check_acct() 69 return (ugidfw_check_vp(cred, vp, MBI_WRITE)); in ugidfw_system_check_acct() 75 ugidfw_system_check_auditctl(struct ucred *cred, struct vnode *vp, in ugidfw_system_check_auditctl() argument 79 if (vp != NULL) in ugidfw_system_check_auditctl() 80 return (ugidfw_check_vp(cred, vp, MBI_WRITE)); in ugidfw_system_check_auditctl() 86 ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp, in ugidfw_system_check_swapon() argument 90 return (ugidfw_check_vp(cred, vp, MBI_WRITE)); in ugidfw_system_check_swapon()
|
| /f-stack/freebsd/contrib/openzfs/module/os/freebsd/spl/ |
| H A D | spl_vfs.c | 133 vp = *vpp; in mount_snapshot() 153 VI_LOCK(vp); in mount_snapshot() 158 VI_UNLOCK(vp); in mount_snapshot() 161 vput(vp); in mount_snapshot() 172 mp = vfs_mount_alloc(vp, vfsp, fspath, vp->v_mount->mnt_cred); in mount_snapshot() 214 VI_LOCK(vp); in mount_snapshot() 216 VI_UNLOCK(vp); in mount_snapshot() 218 vput(vp); in mount_snapshot() 241 VI_LOCK(vp); in mount_snapshot() 245 VI_UNLOCK(vp); in mount_snapshot() [all …]
|
| H A D | spl_policy.c | 103 secpolicy_basic_link(vnode_t *vp, cred_t *cr) in secpolicy_basic_link() argument 108 if (secpolicy_fs_owner(vp->v_mount, cr) == 0) in secpolicy_basic_link() 121 secpolicy_vnode_remove(vnode_t *vp, cred_t *cr) in secpolicy_vnode_remove() argument 124 if (secpolicy_fs_owner(vp->v_mount, cr) == 0) in secpolicy_vnode_remove() 133 if (secpolicy_fs_owner(vp->v_mount, cr) == 0) in secpolicy_vnode_access() 143 if (vp->v_type == VDIR) { in secpolicy_vnode_access() 184 if (secpolicy_fs_owner(vp->v_mount, cr) == 0) in secpolicy_vnode_any_access() 196 if (vp->v_type == VDIR) in secpolicy_vnode_any_access() 200 if (vp->v_type != VDIR) in secpolicy_vnode_any_access() 230 if (vp->v_type == VDIR) in secpolicy_vnode_setattr() [all …]
|
| /f-stack/freebsd/contrib/openzfs/include/os/freebsd/spl/sys/ |
| H A D | vnode.h | 78 vn_is_readonly(vnode_t *vp) in vn_is_readonly() argument 83 #define vn_vfswlock(vp) (0) argument 85 #define vn_ismntpt(vp) \ argument 86 ((vp)->v_type == VDIR && (vp)->v_mountedhere != NULL) 87 #define vn_mountedvfs(vp) ((vp)->v_mountedhere) argument 88 #define vn_has_cached_data(vp) \ argument 89 ((vp)->v_object != NULL && \ 94 #define vn_free(vp) do { } while (0) argument 95 #define vn_matchops(vp, vops) ((vp)->v_op == &(vops)) argument 109 #define specvp(vp, rdev, type, cr) (VN_HOLD(vp), (vp)) argument [all …]
|
| H A D | policy.h | 45 int secpolicy_basic_link(vnode_t *vp, cred_t *cr); 46 int secpolicy_vnode_owner(vnode_t *vp, cred_t *cr, uid_t owner); 47 int secpolicy_vnode_chown(vnode_t *vp, cred_t *cr, uid_t owner); 49 int secpolicy_vnode_remove(vnode_t *vp, cred_t *cr); 50 int secpolicy_vnode_access(cred_t *cr, vnode_t *vp, uid_t owner, 52 int secpolicy_vnode_access2(cred_t *cr, vnode_t *vp, uid_t owner, 54 int secpolicy_vnode_any_access(cred_t *cr, vnode_t *vp, uid_t owner); 55 int secpolicy_vnode_setdac(vnode_t *vp, cred_t *cr, uid_t owner); 56 int secpolicy_vnode_setattr(cred_t *cr, vnode_t *vp, struct vattr *vap, 60 int secpolicy_vnode_setids_setgids(vnode_t *vp, cred_t *cr, gid_t gid); [all …]
|
| /f-stack/freebsd/contrib/openzfs/module/os/freebsd/zfs/ |
| H A D | zfs_ctldir.c | 198 setup(vp, arg); in sfs_vgetx() 207 *vpp = vp; in sfs_vgetx() 1162 vnode_t *vp; in zfsctl_snapshot_vptocnp() local 1168 vp = ap->a_vp; in zfsctl_snapshot_vptocnp() 1196 vhold(vp); in zfsctl_snapshot_vptocnp() 1198 vput(vp); in zfsctl_snapshot_vptocnp() 1243 vnode_t *vp; in zfsctl_lookup_objset() local 1256 vput(vp); in zfsctl_lookup_objset() 1274 vnode_t *vp; in zfsctl_umount_snapshots() local 1310 vput(vp); in zfsctl_umount_snapshots() [all …]
|
| /f-stack/freebsd/vm/ |
| H A D | vnode_pager.c | 155 if (!vn_isdisk(vp) && vn_canvmio(vp) == FALSE) in vnode_create_vobject() 183 vrele(vp); in vnode_create_vobject() 228 KASSERT(vp->v_object == NULL, ("vp %p obj %p", vp, vp->v_object)); in vnode_destroy_vobject() 250 VNPASS(vp->v_usecount > 0, vp); in vnode_pager_alloc() 325 __func__, vp, vp->v_writecount); in vnode_pager_dealloc() 364 if (vp == NULL || VN_IS_DOOMED(vp)) in vnode_pager_haspage() 807 KASSERT(vp->v_type != VCHR && vp->v_type != VBLK, in vnode_pager_generic_getpages() 1546 __func__, vp, vp->v_writecount); in vnode_pager_update_writecount() 1551 __func__, vp, vp->v_writecount); in vnode_pager_update_writecount() 1587 vhold(vp); in vnode_pager_release_writecount() [all …]
|
| /f-stack/lib/include/sys/ |
| H A D | vnode.h | 55 vn_lock(struct vnode *vp, int flags) in vn_lock() argument 61 vrefcnt(struct vnode *vp) in vrefcnt() argument 66 #define VREF(vp) vref(vp) argument 68 vref(struct vnode *vp) in vref() argument 74 vrele(struct vnode *vp) in vrele() argument 84 vn_fullpath(struct thread *td, struct vnode *vp, in vn_fullpath() argument 124 VOP_PATHCONF(struct vnode *vp, int name, register_t *retval) in VOP_PATHCONF() argument 130 VOP_GETATTR(struct vnode *vp, struct vattr *vap, struct ucred *cred) in VOP_GETATTR() argument 137 int vn_close(struct vnode *vp, int flags, struct ucred *file_cred, 140 int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base, [all …]
|
| /f-stack/freebsd/security/audit/ |
| H A D | audit_worker.c | 118 error = vn_start_write(vp, &mp1, 0); in audit_worker_sync_vp() 122 VOP_UNLOCK(vp); in audit_worker_sync_vp() 153 if (vp == NULL) in audit_record_write() 156 mp = vp->v_mount; in audit_record_write() 289 audit_worker_sync_vp(vp, mp, in audit_record_write() 304 audit_worker_sync_vp(vp, mp, in audit_record_write() 318 audit_worker_sync_vp(vp, mp, in audit_record_write() 499 KASSERT((cred != NULL && vp != NULL) || (cred == NULL && vp == NULL), in audit_rotate_vnode() 502 if (vp != NULL) { in audit_rotate_vnode() 506 VOP_UNLOCK(vp); in audit_rotate_vnode() [all …]
|
| /f-stack/freebsd/security/mac_veriexec/ |
| H A D | mac_veriexec.c | 357 error = VOP_GETATTR(vp, &va, cred); in mac_veriexec_kld_check_load() 490 error = VOP_GETATTR(vp, &va, cred); in mac_veriexec_check_vp() 677 img.vp = fp->f_vnode; in mac_veriexec_syscall() 684 vn_lock(img.vp, LK_EXCLUSIVE | LK_RETRY); in mac_veriexec_syscall() 696 VOP_UNLOCK(img.vp); in mac_veriexec_syscall() 752 if (vp->v_mount != NULL && in mac_veriexec_bottom_vnode() 754 ldvp = NULLVPTOLOWERVP(vp); in mac_veriexec_bottom_vnode() 771 fps = SLOT(vp->v_label); in mac_veriexec_get_fingerprint_status() 779 ldvp = mac_veriexec_bottom_vnode(vp); in mac_veriexec_get_fingerprint_status() 830 ldvp = mac_veriexec_bottom_vnode(vp); in mac_veriexec_set_fingerprint_status() [all …]
|