函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-29 10:34:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:de_permission - Check for access rights to a given inode*@inode: Inode to check permission on*@mask: Right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)* Check for read/write/execute permissions on an inode

函数原型:int inode_permission(struct inode *inode, int mask)

返回类型:int

参数:

类型参数名称
struct inode *inode
intmask
429  retval等于sb_permission - Check superblock-level permissions*@sb: Superblock of inode to check permission on*@inode: Inode to check permission on*@mask: Right to check for (%MAY_READ, %MAY_WRITE, %MAY_EXEC)
430  如果retval则返回:retval
433  如果此条件成立可能性小(为编译器优化)(mask & MAY_WRITE)则
437  如果IS_IMMUTABLE(inode)则返回:负EPERM
445  如果HAS_UNMAPPED_ID(inode)则返回:负EACCES
449  retval等于We _really_ want to just do "generic_permission()" without* even looking at the inode->i_op values. So we keep a cache* flag in inode->i_opflags, that says "this has not special* permission function, use the fast case".
450  如果retval则返回:retval
453  retval等于devcgroup_inode_permission(inode, mask)
454  如果retval则返回:retval
457  返回:security_inode_permission(inode, mask)
调用者
名称描述
cgroup_procs_write_permission
bpf_obj_do_get
__get_prog_inode
can_do_pageout
memcg_write_event_controlDO NOT USE IN NEW FILES.* Parse input and register new cgroup event handler.* Input must be in format ' '.* Interpretation of args is defined by control file implementation.
do_faccessataccess() needs to use the real uid/gid, not the effective uid/gid.* We do this by temporarily clearing all FS-related capabilities and* switching the fsuid/fsgid around to the real ones.
ksys_chdir
SYSCALL_DEFINE1
ksys_chroot
allow_file_dedupeCheck whether we are allowed to dedupe the destination file
would_dump
safe_hardlink_sourcesafe_hardlink_source - Check for safe hardlink conditions*@inode: the source inode to hardlink from* Return false if at least one of the following conditions:* - inode is not a regular file* - inode is setuid* - inode is setgid and group-exec* - access
may_lookup
lookup_one_len_common
may_deleteCheck whether we can remove a link victim from directory dir, check* whether the type of victim is right.* 1. We can't do it if dir is read-only (done in permission())* 2. We should have write and exec permissions on dir* 3
may_createCheck whether we can create an object with dentry child in directory* dir.* 1. We can't do it if child already exists (open has special treatment for* this case, but since we are inlined it's OK)* 2
may_open
may_o_create
vfs_tmpfile
vfs_renamevfs_rename - rename a filesystem object*@old_dir: parent of source*@old_dentry: source*@new_dir: parent of destination*@new_dentry: destination*@delegated_inode: returns an inode needing a delegation break*@flags: rename flags
notify_changey_change - modify attributes of a filesytem object*@dentry: object affected*@attr: new attributes*@delegated_inode: returns inode, if the inode is delegated* The caller must hold the i_mutex on the affected object
xattr_permissionCheck permissions for extended attribute access. This is a bit complicated* because different namespaces have very different rules.
inotify_find_inoded_inode - resolve a user-given path to a specific inode
fanotify_find_path
fsverity_ioctl_enablesverity_ioctl_enable() - enable verity on a file* Enable fs-verity on a file. See the "FS_IOC_ENABLE_VERITY" section of* Documentation/filesystems/fsverity.rst for the documentation.* Return: 0 on success, -errno on failure
prctl_set_mm_exe_file
can_do_mincore