FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_capsicum.h"
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/capability.h>
#include <sys/fcntl.h>
#include <sys/jail.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/mount.h>
#include <sys/filedesc.h>
#include <sys/proc.h>
#include <sys/sdt.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <security/audit/audit.h>
#include <security/mac/mac_framework.h>
#include <vm/uma.h>
Go to the source code of this file.
Macros | |
#define | NAMEI_DIAGNOSTIC 1 |
Functions | |
__FBSDID ("$BSDSUniX$") | |
SDT_PROVIDER_DECLARE (vfs) | |
SDT_PROBE_DEFINE3 (vfs, namei, lookup, entry,"struct vnode *","char *","unsigned long") | |
SDT_PROBE_DEFINE2 (vfs, namei, lookup, return,"int","struct vnode *") | |
static void | nameiinit (void *dummy __unused) |
SYSINIT (vfs, SI_SUB_VFS, SI_ORDER_SECOND, nameiinit, NULL) | |
SYSCTL_INT (_vfs, OID_AUTO, lookup_shared, CTLFLAG_RW,&lookup_shared, 0,"Enables/Disables shared locks for path name translation") | |
TUNABLE_INT ("vfs.lookup_shared",&lookup_shared) | |
static void | namei_cleanup_cnp (struct componentname *cnp) |
int | namei (struct nameidata *ndp) |
static int | compute_cn_lkflags (struct mount *mp, int lkflags, int cnflags) |
static __inline int | needs_exclusive_leaf (struct mount *mp, int flags) |
int | lookup (struct nameidata *ndp) |
int | relookup (struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) |
void | NDFREE (struct nameidata *ndp, const u_int flags) |
int | kern_alternate_path (struct thread *td, const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd) |
Variables | |
uma_zone_t | namei_zone |
static struct vnode * | vp_crossmp |
static int | lookup_shared = 1 |
#define NAMEI_DIAGNOSTIC 1 |
Definition at line 69 of file vfs_lookup.c.
__FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 386 of file vfs_lookup.c.
Referenced by lookup().
int kern_alternate_path | ( | struct thread * | td, |
const char * | prefix, | ||
const char * | path, | ||
enum uio_seg | pathseg, | ||
char ** | pathbuf, | ||
int | create, | ||
int | dirfd | ||
) |
int lookup | ( | struct nameidata * | ndp | ) |
Definition at line 473 of file vfs_lookup.c.
References compute_cn_lkflags(), lookup_shared, needs_exclusive_leaf(), panic(), pr, printf(), rootvnode, vfs_busy(), vfs_unbusy(), vp_crossmp, vput(), vref(), and vrele().
Referenced by cache_lookup_times(), and namei().
int namei | ( | struct nameidata * | ndp | ) |
Definition at line 135 of file vfs_lookup.c.
References fgetvp_rights(), Giant, lookup(), lookup_shared, namei_cleanup_cnp(), namei_zone, vput(), and vrele().
Referenced by do_execve(), kern_accessat(), kern_alternate_path(), kern_chdir(), kern_fchmodat(), kern_fchownat(), kern_jail_set(), kern_linkat(), kern_lutimes(), kern_mkdirat(), kern_mkfifoat(), kern_mknodat(), kern_pathconf(), kern_readlinkat(), kern_renameat(), kern_rmdirat(), kern_statat_vnhook(), kern_statfs(), kern_symlinkat(), kern_truncate(), kern_unlinkat(), kern_utimesat(), load_file(), parse_mount_dev_present(), sys___acl_aclcheck_file(), sys___acl_aclcheck_link(), sys___acl_delete_file(), sys___acl_delete_link(), sys___acl_get_file(), sys___acl_get_link(), sys___acl_set_file(), sys___acl_set_link(), sys_chflags(), sys_chroot(), sys_extattr_delete_file(), sys_extattr_delete_link(), sys_extattr_get_file(), sys_extattr_get_link(), sys_extattr_list_file(), sys_extattr_list_link(), sys_extattr_set_file(), sys_extattr_set_link(), sys_extattrctl(), sys_getfh(), sys_lchflags(), sys_lgetfh(), sys_quotactl(), sys_revoke(), sys_undelete(), sys_unmount(), uipc_bind(), unp_connect(), vfs_domount(), vfs_mountroot_shuffle(), vn_open_cred(), and vn_path_to_global_path().
|
static |
Definition at line 125 of file vfs_lookup.c.
References namei_zone.
Referenced by namei().
|
static |
Definition at line 87 of file vfs_lookup.c.
References getnewvnode(), namei_zone, and vp_crossmp.
void NDFREE | ( | struct nameidata * | ndp, |
const u_int | flags | ||
) |
Definition at line 1091 of file vfs_lookup.c.
References namei_zone, vput(), and vrele().
Referenced by alq_open_flags(), coredump(), do_execve(), expand_name(), kern_accessat(), kern_alternate_path(), kern_chdir(), kern_fchmodat(), kern_fchownat(), kern_jail_set(), kern_linkat(), kern_lutimes(), kern_mkdirat(), kern_mkfifoat(), kern_mknodat(), kern_openat(), kern_pathconf(), kern_readlinkat(), kern_renameat(), kern_rmdirat(), kern_statat_vnhook(), kern_statfs(), kern_symlinkat(), kern_truncate(), kern_unlinkat(), kern_utimesat(), link_elf_ctf_get(), link_elf_load_file(), linker_hints_lookup(), linker_lookup_file(), load_file(), parse_mount_dev_present(), sys___acl_aclcheck_file(), sys___acl_aclcheck_link(), sys___acl_delete_file(), sys___acl_delete_link(), sys___acl_get_file(), sys___acl_get_link(), sys___acl_set_file(), sys___acl_set_link(), sys_acct(), sys_chflags(), sys_chroot(), sys_extattr_delete_file(), sys_extattr_delete_link(), sys_extattr_get_file(), sys_extattr_get_link(), sys_extattr_list_file(), sys_extattr_list_link(), sys_extattr_set_file(), sys_extattr_set_link(), sys_extattrctl(), sys_getfh(), sys_ktrace(), sys_lchflags(), sys_lgetfh(), sys_quotactl(), sys_revoke(), sys_undelete(), sys_unmount(), uipc_bind(), unp_connect(), vfs_domount(), vfs_mountroot_readconf(), vfs_mountroot_shuffle(), vn_open_cred(), vn_path_to_global_path(), and vop_stdvptocnp().
|
static |
Definition at line 400 of file vfs_lookup.c.
Referenced by lookup().
int relookup | ( | struct vnode * | dvp, |
struct vnode ** | vpp, | ||
struct componentname * | cnp | ||
) |
SDT_PROVIDER_DECLARE | ( | vfs | ) |
SYSCTL_INT | ( | _vfs | , |
OID_AUTO | , | ||
lookup_shared | , | ||
CTLFLAG_RW | , | ||
& | lookup_shared, | ||
0 | , | ||
"Enables/Disables shared locks for path name translation" | |||
) |
SYSINIT | ( | vfs | , |
SI_SUB_VFS | , | ||
SI_ORDER_SECOND | , | ||
nameiinit | , | ||
NULL | |||
) |
TUNABLE_INT | ( | "vfs.lookup_shared" | , |
& | lookup_shared | ||
) |
|
static |
Definition at line 99 of file vfs_lookup.c.
uma_zone_t namei_zone |
Definition at line 80 of file vfs_lookup.c.
Referenced by kern_symlinkat(), namei(), namei_cleanup_cnp(), nameiinit(), and NDFREE().
|
static |
Definition at line 84 of file vfs_lookup.c.
Referenced by lookup(), and nameiinit().