函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\fs.h Create Date:2022-07-27 06:44:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:file_inode

函数原型:static inline struct inode *file_inode(const struct file *f)

返回类型:struct inode

参数:

类型参数名称
const struct file *f
1318  返回: cached value
调用者
名称描述
msr_read
msr_write
msr_ioctl
msr_open
cpuid_read
cpuid_open
dup_mmap
pidfd_show_fdinfopidfd_show_fdinfo - print information about a pidfd*@m: proc fdinfo file*@f: file referencing a pidfd* Pid:* This function will print the pid that a given pidfd refers to in the* pid namespace of the procfs instance
r_start
r_show
prctl_set_mm_exe_file
SYSCALL_DEFINE2
sched_feat_write
lockevent_readThe lockevent_read() function can be overridden.
lockevent_writeFunction to handle write request* When idx = reset_cnts, reset all the counts.
irq_debug_write
acct_on
audit_exe_compare
relay_file_read
tracing_cpumask_read
tracing_cpumask_write
tracing_entries_read
tracing_entries_write
tracing_stats_read
seq_file_to_map
perf_fasync
perf_event_mmap_event
perf_addr_filter_matchCheck whether inode and address range match filter criteria.
valid_ref_ctr_vma
register_for_each_vma
unapply_uprobe
uprobe_mmapCalled from mmap_region/vma_adjust with mm->mmap_sem acquired.* Currently we ignore all errors and always return 0, the callers* can't handle the failure anyway.
vma_has_uprobes
find_active_uprobe
filemap_page_mkwrite
generic_file_rw_checksPerforms common checks before doing a file copy/clone* from @file_in to @file_out.
generic_copy_file_checksPerforms necessary checks before doing a file copy* Can adjust amount of bytes to copy via @req_count argument.* Returns appropriate error code that caller should return or* zero in case the copy should be allowed.
dio_warn_stale_pagecacheWarn about a page cache invalidation failure during a direct I/O write.
generic_fadvisePOSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could* deactivate the pages and clear PG_Referenced.
ksys_readahead
validate_mmap_requestdetermine whether a mapping should be permitted and, if so, what sort of* mapping we're capable of supporting
do_mmaphandle mapping creation for uClinux
can_do_mincore
__remove_shared_vm_structRequires inode->i_mapping->i_mmap_rwsem
__vma_link_file
do_mmapThe caller must hold down_write(¤t->mm->mmap_sem).
madvise_willneedSchedule all required I/O operations. Do not wait for completion.
can_do_pageout
swap_show
subpool_vma
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.
memfd_file_seals_ptr
memfd_add_seals
shm_destroy
newsegwseg - Create a new shared memory segment*@ns: namespace*@params: ptr to the structure that contains key, size and shmflg* Called with shm_ids.rwsem held as a writer.
shm_add_rss_swapCalculate and add used RSS and swap pages of a shm.* Called with shm_ids.rwsem held as a reader
do_shmatFix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.* NOTE! Despite the name, this is NOT a direct system call entrypoint. The* "raddr" thing points to kernel space, and there has to be a wrapper around* this.
ksys_shmdtdetach and kill segment if marked destroyed.* The work is done in shm_close.
mqueue_read_fileThis is routine for system read from queue file
mqueue_flush_file
mqueue_poll_file
do_mq_timedsend
do_mq_timedreceive
do_mq_notifyNotes: the case when user wants us to deregister (with NULL as pointer)* and he isn't currently owner of notification, will be silently discarded.* It isn't explicitly defined in the POSIX.
do_mq_getsetattr
file_path_has_permSame as path_has_perm, but uses the inode from the file struct.
file_has_permCheck whether a task can use an open file descriptor toaccess an inode in a given way. Check access to thedescriptor itself, and then use dentry_has_perm tocheck a particular permission to the file.Access to the descriptor is implicitly granted if it
open_file_to_avConvert a file to an access vector and include the correct open* open permission.
selinux_bprm_set_creds
selinux_revalidate_file_permissionle security operations
selinux_file_permission
ioctl_has_permCheck whether a task has the ioctl permission and cmd* operation to an inode.
file_map_prot_check
selinux_mmap_file
selinux_file_open
selinux_kernel_module_from_file
sel_read_enforce
sel_read_handle_unknown
sel_open_handle_status
sel_read_mls
sel_write_load
sel_write_context
sel_read_checkreqprot
sel_write_checkreqprot
sel_write_validatetrans
selinux_transaction_write
sel_write_accessRemaining nodes use transaction based IO methods like nfsd/nfsctl.c
sel_write_create
sel_write_relabel
sel_write_user
sel_write_member
sel_read_bool
sel_write_bool
sel_commit_bools_write
sel_read_avc_cache_threshold
sel_write_avc_cache_threshold
sel_read_avc_hash_stats
sel_read_initcon
sel_read_class
sel_read_perm
sel_read_policycap
smack_bprm_set_credssmack_bprm_set_creds - set creds for exec*@bprm: the exec information* Returns 0 if it gets a blob, -EPERM if exec forbidden and -ENOMEM otherwise
smack_file_ioctlsmack_file_ioctl - Smack check on ioctls*@file: the object*@cmd: what to do*@arg: unused* Relies heavily on the correct use of the ioctl command conventions.* Returns 0 if allowed, error code otherwise
smack_file_locksmack_file_lock - Smack check on file locking*@file: the object*@cmd: unused* Returns 0 if current has lock access, error code otherwise
smack_file_fcntlsmack_file_fcntl - Smack check on fcntl*@file: the object*@cmd: what action to check*@arg: unused* Generally these operations are harmless
smack_mmap_filesmack_mmap_file :* Check permissions for a mmap operation. The @file may be NULL, e.g.* if mapping anonymous memory.*@file contains the file structure for file to map (may be NULL).*@reqprot contains the protection requested by the application.
smack_file_receivesmack_file_receive - Smack file receive check*@file: the object* Returns 0 if current has access, error code otherwise
smack_file_opensmack_file_open - Smack dentry open processing*@file: the object* Set the security blob in the file structure.* Allow the open only if the task has read access. There are* many read operations (e.g. fstat) that you can do with an
dump_common_audit_datadump_common_audit_data - helper to dump common audit data*@a : common audit data
tomoyo_openmoyo_open - open() for /sys/kernel/security/tomoyo/ interface.*@inode: Pointer to "struct inode".*@file: Pointer to "struct file".* Returns 0 on success, negative value otherwise.
apparmor_bprm_set_credsapparmor_bprm_set_creds - set the new creds on the bprm struct*@bprm: binprm for the exec (NOT NULL)* Returns: %0 or error on failure* TODO: once the other paths are done see if we can't refactor into a fn
apparmor_file_open
__file_path_perm
aa_file_permaa_file_perm - do permission revalidation check & audit for @file*@op: operation being checked*@label: label being enforced (NOT NULL)*@file: file to revalidate access permissions on (NOT NULL)*@request: requested permissions*@in_atomic: whether
mmap_violation_checkPrevent mmap'ing a file execute that is already mmap'ed write
ima_rdwr_violation_checkma_rdwr_violation_check* Only invalidate the PCR for measured files:* - Opening a file for write when already open for read,* results in a time of measure, time of use (ToMToU) error.* - Opening a file for read when already open for write,
ima_file_freema_file_free - called on __fput()*@file: pointer to file structure being freed* Flag files that changed, based on i_version
process_measurement
ima_calc_file_hash_atfm
ima_calc_file_hash_tfm
ima_calc_file_hashma_calc_file_hash - calculate file hash* Asynchronous hash (ahash) allows using HW acceleration for calculating* a hash. ahash performance varies for different data sizes on different* crypto accelerators
ima_add_violationma_add_violation - add violation to measurement list.* Violations are flagged in the measurement list with zero hash values.* By extending the PCR with 0xFF's instead of with zeroes, the PCR* value is invalidated.
ima_collect_measurementma_collect_measurement - collect file measurement* Calculate the file hash, if it doesn't already exist,* storing the measurement and i_version in the iint.* Must be called with iint->mutex held.* Return 0 on success, error code otherwise
ima_store_measurementma_store_measurement - store file measurement* Create an "ima" template and then store the template by calling* ima_store_template
ima_eventdigest_initThis function writes the digest of an event (with size limit).
ima_update_xattrma_update_xattr - update 'security.ima' hash value
do_sys_ftruncate
vfs_fallocate
SYSCALL_DEFINE1
default_llseek
rw_verify_area
do_sendfile
vfs_copy_file_rangepy_file_range() differs from regular file read and write in that it* specifically allows return partial success. When it does so is up to* the copy_file_range method.
remap_verify_area
generic_remap_file_range_prepCheck that the two inodes are eligible for cloning, the ranges make* sense, and then flush all dirty data. Caller must ensure that the* inodes have been locked against any other modifications.
do_clone_file_range
allow_file_dedupeCheck whether we are allowed to dedupe the destination file
vfs_dedupe_file_range_one
vfs_dedupe_file_range
do_open_execat
kernel_read_file
would_dump
pipe_write
do_lastHandle the last step of open()
setfl
fcntl_rw_hint
ioctl_fiemap
ioctl_preallocateThis provides compatibility with legacy XFS pre-allocation ioctls* which predate the fallocate syscall.* Only the l_start, l_len and l_whence fields of the 'struct space_resv'* are used here, rest are ignored.
compat_ioctl_preallocatejust account for different alignment
file_ioctl
ioctl_fsfreeze
ioctl_fsthaw
do_vfs_ioctlWhen you add any new common ioctls to the switches above and below* please update compat_sys_ioctl() too.* do_vfs_ioctl() is not for drivers and not intended to be EXPORT_SYMBOL()'d.* It's just a simple helper for sys_ioctl and compat_sys_ioctl.
iterate_dir
file_remove_privsRemove special file priviledges (suid, capabilities) when file is written* to or truncated.
file_update_timele_update_time - update mtime and ctime time*@file: file accessed* Update the mtime and ctime members of an inode and mark the inode* for writeback
mnt_want_write_filemnt_want_write_file - get write access to a file's mount*@file: the file who's mount on which to take a write* This is like mnt_want_write, but it takes a file and can* do some optimisations if the file is open for write already
mnt_drop_write_file
splice_direct_to_actorsplice_direct_to_actor - splices data directly between two non-pipes*@in: file to splice from*@sd: actor information on where to splice to*@actor: handles the data splicing* Description:* This is a special case helper to splice directly between two
sync_file_range
ns_ioctl
block_page_mkwritelock_page_mkwrite() is not allowed to change the file size as it gets* called from a page fault handler when a page is first dirtied
dnotify_flushCalled every time a file is closed. Looks first for a dnotify mark on the* inode. If one is found run all of the ->dn structures attached to that* mark for one relevant to this process closing the file and remove that* dnotify_struct
fcntl_dirnotifyWhen a process calls fcntl to attach a dnotify watch to a directory it ends* up here. Allocate both a mark for fsnotify to add and a dnotify_struct to be* attached to the fsnotify_mark.
fanotify_find_path
ep_show_fdinfo
put_aio_ring_file
aio_complete_rw
aio_write
io_queue_async_work
kiocb_end_write
io_file_supports_asyncIf we tracked the file through the SCM inflight mechanism, we could support* any file. For now, just ensure that anything potentially problematic is done* inline.
io_prep_rw
io_write
fscrypt_ioctl_add_keyAdd a master encryption key to the filesystem, causing all files which were* encrypted with it to appear "unlocked" (decrypted) when accessed.* When adding a key for use by v1 encryption policies, this ioctl is
do_remove_keyTry to remove an fscrypt master encryption key
fscrypt_ioctl_get_key_statusRetrieve the status of an fscrypt master encryption key
fscrypt_ioctl_set_policy
fscrypt_ioctl_get_policyOriginal ioctl version; can only get the original policy version
fscrypt_ioctl_get_policy_exExtended ioctl version; can get policies of any version
enable_verity
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
fsverity_ioctl_measuresverity_ioctl_measure() - get a verity file's measurement* Retrieve the file measurement that the kernel is enforcing for reads from a* verity file
flock64_to_posix_lock
locks_remove_fileThis function is called on the last close of an open file.
lock_get_status
locks_show
load_aout_binaryThese are the functions used to load a.out style executables and shared* libraries. There is no binary dependent code anywhere else.
load_aout_library
bm_entry_read/
bm_entry_write
bm_register_write/register
bm_status_write
elf_fdpic_map_fileload the appropriate binary image (executable or interpreter) into memory* - we assume no MMU is available* - if no other PIC bits are set in params->hdr->e_flags* - we assume that the LOADable segments in the binary are independently relocatable* - we
do_coredump
iomap_page_mkwrite
iomap_dio_complete
iomap_dio_bio_end_io
iomap_dio_rwmap_dio_rw() always completes O_[D]SYNC writes regardless of whether the IO* is being issued as AIO or not. This allows us to optimise pure data writes* to use REQ_FUA rather than requiring generic_write_sync() to issue a* REQ_FLUSH post write
ramfs_nommu_get_unmapped_area
file_dentry
file_write_hint
file_start_write
file_start_write_trylock
file_end_write
deny_write_access
allow_write_access
vma_is_fsdax
daxdev_mapping_supportedCheck if given mapping is supported by the file / underlying device.
hstate_file
event_file_data
fsnotify_permSimple call site for access decisions
fsnotify_accesssnotify_access - file was read
fsnotify_modifysnotify_modify - file was modified
fsnotify_opensnotify_open - file was opened
fsnotify_closesnotify_close - file was closed