Defined in 1 files as a prototype:

Defined in 1 files as a member:

Defined in 1 files as a function:

Referenced in 4 files:

Smatch caller information:

fs/coredump.c umh_coredump_setup() -> replace_fd()

Type Parameter Key Value
PARAM_VALUE 0 fd 3
PARAM_VALUE 1 file 4096-ptr_max
PARAM_VALUE 2 flags 0
CAPPED_DATA 1 file 1
CAPPED_DATA 1 file->f_cred 1
CAPPED_DATA 1 file->f_path.dentry 1
DATA_SOURCE 1 file r pidfs_alloc_file

fs/coredump.c umh_coredump_setup() -> replace_fd()

Type Parameter Key Value
PARAM_VALUE 0 fd 0
PARAM_VALUE 2 flags 0

security/apparmor/file.c aa_inherit_files() -> replace_fd()

Type Parameter Key Value
PARAM_VALUE 1 file 0,4096-ptr_max
PARAM_VALUE 1 file->__f_path.dentry 0
PARAM_VALUE 1 file->__f_path.mnt 1-u64max
PARAM_VALUE 1 file->f_cred 0,4096-ptr_max
PARAM_VALUE 1 file->f_cred->process_keyring->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->process_keyring->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_cred->request_key_auth->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->request_key_auth->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_cred->session_keyring->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->session_keyring->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_cred->thread_keyring->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->thread_keyring->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_ep 0
PARAM_VALUE 1 file->f_flags 2
PARAM_VALUE 1 file->f_inode 4096-ptr_max
PARAM_VALUE 1 file->f_inode->i_writecount.counter 0-s32max
PARAM_VALUE 1 file->f_iocb_flags 0,2,4,6,16,18,20,22,131072,131074,131076,131078,131088,131090,131092,131094
PARAM_VALUE 1 file->f_mapping 4096-ptr_max
PARAM_VALUE 1 file->f_mode 0,131072-u32max
PARAM_VALUE 1 file->f_op 4096-ptr_max
PARAM_VALUE 1 file->f_op->check_flags 0
PARAM_VALUE 1 file->f_op->compat_ioctl 0
PARAM_VALUE 1 file->f_op->copy_file_range 0
PARAM_VALUE 1 file->f_op->fadvise 0
PARAM_VALUE 1 file->f_op->fallocate 0
PARAM_VALUE 1 file->f_op->fasync 0
PARAM_VALUE 1 file->f_op->flock 0
PARAM_VALUE 1 file->f_op->flush 0
PARAM_VALUE 1 file->f_op->fop_flags 0
PARAM_VALUE 1 file->f_op->fsync 0
PARAM_VALUE 1 file->f_op->get_unmapped_area 0
PARAM_VALUE 1 file->f_op->iopoll 0
PARAM_VALUE 1 file->f_op->iterate_shared 0
PARAM_VALUE 1 file->f_op->llseek 0
PARAM_VALUE 1 file->f_op->lock 0
PARAM_VALUE 1 file->f_op->mmap 0
PARAM_VALUE 1 file->f_op->mmap_prepare 0
PARAM_VALUE 1 file->f_op->open 0
PARAM_VALUE 1 file->f_op->owner 0,4096-ptr_max
PARAM_VALUE 1 file->f_op->poll 0
PARAM_VALUE 1 file->f_op->read 0
PARAM_VALUE 1 file->f_op->read_iter 0
PARAM_VALUE 1 file->f_op->release 0
PARAM_VALUE 1 file->f_op->remap_file_range 0
PARAM_VALUE 1 file->f_op->setlease 0
PARAM_VALUE 1 file->f_op->show_fdinfo 0
PARAM_VALUE 1 file->f_op->splice_eof 0
PARAM_VALUE 1 file->f_op->splice_read 0
PARAM_VALUE 1 file->f_op->splice_write 0
PARAM_VALUE 1 file->f_op->unlocked_ioctl 0
PARAM_VALUE 1 file->f_op->uring_cmd 0
PARAM_VALUE 1 file->f_op->uring_cmd_iopoll 0
PARAM_VALUE 1 file->f_op->write 0
PARAM_VALUE 1 file->f_op->write_iter 0
PARAM_VALUE 1 file->f_owner 0
PARAM_VALUE 1 file->f_path->dentry->d_parent->d_alias.next->pprev 1-u64max
PARAM_VALUE 1 file->f_path->dentry->d_parent->d_inode->i_wb->dwork.timer->entry.pprev 4096-ptr_max
PARAM_VALUE 1 file->f_path.dentry->d_inode 4096-ptr_max
PARAM_VALUE 1 file->f_path.dentry->d_inode->i_fop->owner->refcnt.counter 0-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_alias->next->pprev 1-u64max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->active.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_flags 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->__i_nlink 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_atime_nsec 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_blkbits 0-255
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_bytes 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_ctime_nsec 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_dir_seq 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_flags 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_fsnotify_mask 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_generation 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_linklen s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_mode 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_mtime_nsec 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_nlink 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_opflags 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_rdev 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_wb_frn_avg_time 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_wb_frn_history 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_wb_frn_winner s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_write_hint 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_lockref.count s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->data->ref.refs.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->kref.refcount.refs.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->owner->refcnt.counter 0-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->ref.refs.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_hash.next->pprev 4096-ptr_max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_sib->next->pprev 1-u64max
PARAM_VALUE 1 file->f_pos 0
PARAM_VALUE 1 file->f_pos_lock.dep_map->name 0-255
PARAM_VALUE 1 file->f_pos_lock.first_waiter 0
PARAM_VALUE 1 file->f_pos_lock.magic 4096-ptr_max
PARAM_VALUE 1 file->f_pos_lock.osq.tail.counter 0
PARAM_VALUE 1 file->f_pos_lock.owner.counter 0
PARAM_VALUE 1 file->f_ra.async_size 0
PARAM_VALUE 1 file->f_ra.mmap_miss 0
PARAM_VALUE 1 file->f_ra.order 0
PARAM_VALUE 1 file->f_ra.prev_pos (-1)-0
PARAM_VALUE 1 file->f_ra.ra_pages 0
PARAM_VALUE 1 file->f_ra.size 0
PARAM_VALUE 1 file->f_ra.start 0
PARAM_VALUE 1 file->f_sb_err 0
PARAM_VALUE 1 file->f_wb_err 0
PARAM_VALUE 1 file->private_data 0
PARAM_VALUE 2 flags 0
CAPPED_DATA 0 fd 1
NOCHECK_CALL
NO_OVERFLOW_SIMPLE 1 file->f_inode->i_blkbits

fs/file.c receive_fd_replace() -> replace_fd()

Type Parameter Key Value
DATA_SOURCE 0 fd $0
DATA_SOURCE 1 file $1
DATA_SOURCE 2 flags $2
LOCK2 &match->notify_lock
TYPE_LOCK (struct seccomp_filter)->notify_lock

security/selinux/hooks.c flush_unauthorized_files() -> replace_fd()

Type Parameter Key Value
PARAM_VALUE 1 file 0,4096-ptr_max
PARAM_VALUE 1 file->__f_path.dentry 0
PARAM_VALUE 1 file->__f_path.mnt 1-u64max
PARAM_VALUE 1 file->f_cred 0,4096-ptr_max
PARAM_VALUE 1 file->f_cred->process_keyring->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->process_keyring->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_cred->request_key_auth->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->request_key_auth->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_cred->session_keyring->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->session_keyring->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_cred->thread_keyring->user->qnbytes s32min-s32max
PARAM_VALUE 1 file->f_cred->thread_keyring->user->qnkeys s32min-s32max
PARAM_VALUE 1 file->f_ep 0
PARAM_VALUE 1 file->f_flags 2
PARAM_VALUE 1 file->f_inode 4096-ptr_max
PARAM_VALUE 1 file->f_inode->i_writecount.counter 0-s32max
PARAM_VALUE 1 file->f_iocb_flags 0,2,4,6,16,18,20,22,131072,131074,131076,131078,131088,131090,131092,131094
PARAM_VALUE 1 file->f_mapping 4096-ptr_max
PARAM_VALUE 1 file->f_mode 0,131072-u32max
PARAM_VALUE 1 file->f_op 4096-ptr_max
PARAM_VALUE 1 file->f_op->check_flags 0
PARAM_VALUE 1 file->f_op->compat_ioctl 0
PARAM_VALUE 1 file->f_op->copy_file_range 0
PARAM_VALUE 1 file->f_op->fadvise 0
PARAM_VALUE 1 file->f_op->fallocate 0
PARAM_VALUE 1 file->f_op->fasync 0
PARAM_VALUE 1 file->f_op->flock 0
PARAM_VALUE 1 file->f_op->flush 0
PARAM_VALUE 1 file->f_op->fop_flags 0
PARAM_VALUE 1 file->f_op->fsync 0
PARAM_VALUE 1 file->f_op->get_unmapped_area 0
PARAM_VALUE 1 file->f_op->iopoll 0
PARAM_VALUE 1 file->f_op->iterate_shared 0
PARAM_VALUE 1 file->f_op->llseek 0
PARAM_VALUE 1 file->f_op->lock 0
PARAM_VALUE 1 file->f_op->mmap 0
PARAM_VALUE 1 file->f_op->mmap_prepare 0
PARAM_VALUE 1 file->f_op->open 0
PARAM_VALUE 1 file->f_op->owner 0,4096-ptr_max
PARAM_VALUE 1 file->f_op->poll 0
PARAM_VALUE 1 file->f_op->read 0
PARAM_VALUE 1 file->f_op->read_iter 0
PARAM_VALUE 1 file->f_op->release 0
PARAM_VALUE 1 file->f_op->remap_file_range 0
PARAM_VALUE 1 file->f_op->setlease 0
PARAM_VALUE 1 file->f_op->show_fdinfo 0
PARAM_VALUE 1 file->f_op->splice_eof 0
PARAM_VALUE 1 file->f_op->splice_read 0
PARAM_VALUE 1 file->f_op->splice_write 0
PARAM_VALUE 1 file->f_op->unlocked_ioctl 0
PARAM_VALUE 1 file->f_op->uring_cmd 0
PARAM_VALUE 1 file->f_op->uring_cmd_iopoll 0
PARAM_VALUE 1 file->f_op->write 0
PARAM_VALUE 1 file->f_op->write_iter 0
PARAM_VALUE 1 file->f_owner 0
PARAM_VALUE 1 file->f_path->dentry->d_parent->d_alias.next->pprev 1-u64max
PARAM_VALUE 1 file->f_path->dentry->d_parent->d_inode->i_wb->dwork.timer->entry.pprev 4096-ptr_max
PARAM_VALUE 1 file->f_path.dentry->d_inode 4096-ptr_max
PARAM_VALUE 1 file->f_path.dentry->d_inode->i_fop->owner->refcnt.counter 0-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_alias->next->pprev 1-u64max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->active.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_flags 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->__i_nlink 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_atime_nsec 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_blkbits 0-255
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_bytes 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_ctime_nsec 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_dir_seq 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_flags 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_fsnotify_mask 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_generation 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_linklen s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_mode 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_mtime_nsec 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_nlink 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_opflags 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_rdev 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_wb_frn_avg_time 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_wb_frn_history 0-u16max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_wb_frn_winner s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_inode->i_write_hint 0-4294967295
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->d_lockref.count s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->data->ref.refs.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->kref.refcount.refs.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->owner->refcnt.counter 0-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_fsdata->ref.refs.counter s32min-s32max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_hash.next->pprev 4096-ptr_max
PARAM_VALUE 1 file->f_path.dentry->d_parent->d_sib->next->pprev 1-u64max
PARAM_VALUE 1 file->f_pos 0
PARAM_VALUE 1 file->f_pos_lock.dep_map->name 0-255
PARAM_VALUE 1 file->f_pos_lock.first_waiter 0
PARAM_VALUE 1 file->f_pos_lock.magic 4096-ptr_max
PARAM_VALUE 1 file->f_pos_lock.osq.tail.counter 0
PARAM_VALUE 1 file->f_pos_lock.owner.counter 0
PARAM_VALUE 1 file->f_ra.async_size 0
PARAM_VALUE 1 file->f_ra.mmap_miss 0
PARAM_VALUE 1 file->f_ra.order 0
PARAM_VALUE 1 file->f_ra.prev_pos (-1)-0
PARAM_VALUE 1 file->f_ra.ra_pages 0
PARAM_VALUE 1 file->f_ra.size 0
PARAM_VALUE 1 file->f_ra.start 0
PARAM_VALUE 1 file->f_sb_err 0
PARAM_VALUE 1 file->f_wb_err 0
PARAM_VALUE 1 file->private_data 0
PARAM_VALUE 2 flags 0
CAPPED_DATA 0 fd 1
NOCHECK_CALL
NO_OVERFLOW_SIMPLE 1 file->f_inode->i_blkbits