Function Report

Linux Kernel (v4.4)

Source File:include\linux\err.h Create Date:2016-01-14 09:04:38
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:PTR_ERR

Function:static inline long PTR_ERR( const void *ptr)

Return Type:static inline long

Parameter:

Type Parameter NameRemarks
const void * ptr

Function description:

30  Returning ptr
Caller
Function NameFunction description
PTR_ERR_OR_ZERO
__rhashtable_insert_fastInternal function, please use rhashtable_insert_fast() instead
test_bucket_stats
sw842_debugfs_create
textsearch_prepare Prepare a search
err_inject_init
err_inject_init
err_inject_init
err_inject_init
digsig_verify digital signature verification with public key
digsig_init
ptrace_write_dr7Handle ptrace writes to debug register 7.
ptrace_set_breakpoint_addr
validate_eventvalidate that we can schedule this event
validate_groupvalidate a single event group
microcode_init
msr_init
cpuid_init
apm_initJust start the APM thread. We do NOT want to do APM BIOS
add_pcspkr
copy_processCreate a new process
_do_forkfork routine
_cpu_upRequires cpu_add_remove_lock to be held
SYSC_ptrace
C_SYSC_ptrace
create_new_namespacesCreate new nsproxy and all of its the associated namespaces. Return the newly created nsproxy. Do not attach this to the task, leave it to the caller to do proper locking and attach it to task.
copy_namespacesThis now handles copy for nsproxy and all namespaces therein
unshare_nsproxy_namespacesCalled from unshare. Unshare all the namespaces part of nsproxy. On success, returns the new nsproxy.
SYSC_setns
__smpboot_create_thread
snapshot_write_next used for writing the system memory snapshot.
swsusp_check Check for swsusp signature in the resume device
pm_wake_lock
pm_wake_unlock
setup_irq_thread
rcutorture_booster_init
alarmtimer_init Initialize alarm timer code
resolve_symbol_wait
simplify_symbolsChange all symbols so that st_value encodes the pointer directly.
load_moduleAllocate and load the module: note that size of section 0 is always zero, and we rely on this for optional sections.
acct_on
SYSC_acct
kimage_file_prepare_segmentsIn file mode list of segments is prepared by kernel. Copy relevant data from user space, do error checking, prepare segment list
kexec_calculate_store_digestsCalculate and store the digest of segments
cgroup_setup_root
cgroup_add_file
create_css create a cgroup_subsys_state
cgroup_mkdir
audit_receive_msg
audit_data_to_entryTranslate struct audit_rule_data to kernel's rule respresentation.
audit_rule_change apply all rules to the specified message type
audit_list_rules_send list the audit rules
update_lsm_rule
audit_to_watchTranslate a watch string to kernel respresentation.
audit_get_ndGet path information necessary for adding watches.
audit_add_watchFind a matching watch entry, or add this one. Caller must hold audit_filter_mutex.
audit_dupe_exe
audit_add_tree_rulecalled with audit_filter_mutex
audit_tag_tree
register_kprobe
tracepoint_add_funcAdd the probe function to a tracepoint.
tracepoint_remove_funcRemove a probe function from a tracepoint. Note: only waiting an RCU period after setting elem->call to the empty function insures that the original callback is not used anymore. This insured by preempt_disable around the call site.
rb_reserve_next_event
ring_buffer_benchmark_init
tracing_open
create_trace_kprobe
create_trace_uprobeArgument syntax:- Add uprobe: p|r[:[GRP/]EVENT] PATH:OFFSET[FETCHARGS]
map_createcalled via syscall
map_lookup_elem
map_update_elem
map_delete_elem
map_get_next_key
replace_map_fd_with_map_ptrlook for pseudo eBPF instructions that access map FDs and replace them with actual map pointers
fd_array_map_update_elemonly called from syscall
perf_event_set_filter
perf_event_set_bpf_prog
perf_event_allocAllocate and initialize a event structure
SYSC_perf_event_open
perf_event_create_kernel_counter
inherit_group
register_wide_hw_breakpoint register a wide breakpoint in the kernel
__copy_insn
register_for_each_vma
xol_add_vmaSlot allocation for XOL
padata_reorder
_torture_create_kthreadCreate a generic torture kthread that is immediately runnable. If you need the kthread to be stopped so that you can do something to it before it starts, you will need to open-code your own.
kswapd_runThis kswapd start function will be called by init and node-hot-add. On node-hot-add, kswapd will moved to proper cpus if cpus are hot-added.
shmem_zero_setup setup a shared anonymous mapping
bdi_class_init
bdi_register
pcpu_embed_first_chunk embed the first percpu chunk into bootmem
pcpu_page_first_chunk map the first chunk using PAGE_SIZE pages
kmem_cache_create Create a cache.
__get_user_pages pin user pages in memory
SYSC_mmap_pgoff
mremap_to
SYSC_mremap
process_vm_rw_core core of reading/writing pages from task specified
SYSC_swapoff
SYSC_swapon
__zswap_cpu_comp_notifier
hugetlb_cowHugetlb_cow() should be called with page lock of the original hugepage held.
hugetlb_no_page
vma_replace_policyApply policy to a single VMA This must be called with the mmap_sem held for writing.
do_set_mempolicySet the process memory policy
do_mbind
vma_dup_policy
ksm_init
do_move_page_to_node_arrayMove a set of pages as indicated in the pm array. The addr field must be set to the virtual address of the page to be moved and the node number must contain a valid target node. The pm array ends with node= MAX_NUMNODES.
do_pages_stat_arrayDetermine the nodes of an array of pages and store it in an array of status.
start_stop_khugepaged
memcg_write_event_controlDO NOT USE IN NEW FILES.
pageowner_init
ipcctl_pre_down_nolock retrieve an ipc and check permissions for some IPC_XXX cmd
msgctl_downThis function handles some msgctl commands which require the rwsem to be held in write mode. NOTE: no locks must be held, the rwsem is taken inside this function.
msgctl_nolock
do_msgsnd
do_msgrcv
semctl_nolock
semctl_setval
semctl_main
semctl_downThis function handles some semctl commands which require the rwsem to be held in write mode. NOTE: no locks must be held, the rwsem is taken inside this function.
SYSC_semtimedop
newseg Create a new shared memory segment
shmctl_downThis function handles some shmctl commands which require the rwsem to be held in write mode. NOTE: no locks must be held, the rwsem is taken inside this function.
shmctl_nolock
SYSC_shmctl
do_shmatFix shmaddr, allocate descriptor, map shm, add attach descriptor to lists.
mqueue_fill_super
mqueue_create
SYSC_mq_open
SYSC_mq_unlink
SYSC_mq_timedsend
SYSC_mq_notify
mq_init_ns
blk_queue_bio
blk_rq_map_user_iov map user data to a request, for REQ_TYPE_BLOCK_PC usage
blk_rq_map_kern map kernel data to a request, for REQ_TYPE_BLOCK_PC usage
sg_io
sg_scsi_ioctl
__blk_send_genericSend basic block requests
rescan_partitions
bsg_map_hdrmap sg_io_v4 to a request.
__bsg_read
__bsg_write
bsg_open
bsg_ioctl
bsg_register_queue
bsg_init
blkg_conf_prep parse and prepare for per-blkg config update
blkcg_init_queue initialize blkcg part of request queue
selinux_genfs_get_sid
selinux_transaction_write
sel_make_class_dir_entries
sel_make_classes
sel_fill_super
init_sel_fs
smack_set_mnt_opts set Smack specific mount options
smack_inode_setxattr Smack check for setting xattrs
smack_inode_setsecurity set smack xattrs
smack_setprocattr Smack process attribute setting
smack_audit_rule_init Initialize a smack audit rule
smk_fill_rule Fill Smack rule from strings
smk_set_cipso do the work for write() for cipso and cipso2
smk_write_net4addr write() for/smack/netlabel
smk_write_ambient write() for/smack/ambient
smk_parse_label_list parse list of Smack labels, separated by spaces
smk_user_access handle access check transaction
smk_write_revoke_subj write() for/smack/revoke-subject
smk_write_syslog write() for smackfs/syslog
init_smk_fs get the smackfs superblock
profile_load.load file hook fn to load policy
profile_replace.replace file hook fn to load and/or replace policy
profile_remove.remove file hook fn to remove loaded policy
__aa_fs_profile_mkdirrequires lock be held
__aa_fs_namespace_mkdir
aafs_create_file create a file entry in the apparmor securityfs
aafs_create_dir recursively create a directory entry in the securityfs
d_namespace_path lookup a name associated with a given path
unpack_profile unpack a serialized profile
aa_unpack unpack packed binary profile(s) data loaded from user space
aa_setprocattr_changehataa_setprocattr_chagnehat- handle procattr interface to change_hat
init_profile_hash
ima_init_crypto
ima_alloc_tfm
ima_alloc_atfm
ima_calc_file_ahash
ima_calc_file_shash
ima_calc_field_array_hash
ima_calc_boot_aggregate
init_desc
evm_calc_hmac_or_hashCalculate the HMAC value across the set of protected security xattrs.
evm_init_hmac
vfs_open open the file at the given path
do_sys_open
mount_bdev
mount_fs
register_chrdev_region register a range of device numbers
alloc_chrdev_region register a range of char device numbers
__register_chrdev create and register a cdev occupying a range of minors
do_execveat_commonsys_execve() executes a new program.
create_pipe_files
init_pipe_fs
check_acl
follow_automountPerform an automount- return-EISDIR to tell follow_managed() to stop and return the path we were called with.
lookup_slowFast lookup failed, do it the slow way
link_path_walkName resolution. This is the basic name resolution function, turning a pathname into the final dentry. We expect'base' to be positive and a directory.
path_lookupatReturns 0 and nd will be valid on success; Retuns error, otherwise.
filename_lookup
path_parentatReturns 0 and nd will be valid on success; Retuns error, otherwise.
mountpoint_last look up last component for umount
path_mountpoint look up a path to be umounted
filename_mountpoint
atomic_openAttempt to atomically look up, create and open a file from a negative dentry.
lookup_openLook up and maybe create and open the last component.
path_openat
SYSC_mknodat
SYSC_mkdirat
do_rmdir
do_unlinkatMake sure that the actual truncation of the file will occur outside its directory's i_mutex. Truncate can take a long time if there is a lot of writeout happening, and we don't want to prevent access to the directory while waiting on the I/O.
SYSC_symlinkat
SYSC_linkat
SYSC_renameat2
readlink_copy
generic_readlinkA helper for->readlink(). This should be used*ONLY* for symlinks that have->follow_link() touching nd only in nd_set_link(). Using(or not using) it for any given inode is up to filesystem.
do_loopbackdo loopback mount.
do_move_mount
do_add_mountadd a mount into a namespace's mount tree
do_new_mountcreate a new mount for userspace and request it to be added into the namespace's tree
SYSC_mount
SYSC_pivot_root
traverse
seq_read>read() method for sequential files.
seq_path_rootSame as seq_path, but relative to supplied root.
simple_pin_fs
propagate_one
blkdev_get open a block device
do_direct_IOWalk the user pages, and the file, mapping blocks to disk and generating a sequence of(page,offset,len,block) mappings. These mappings are injected into submit_page_section(), which takes care of the next stage of submission
inotify_read
SYSC_inotify_init1
create_fd
fanotify_read
fanotify_add_vfsmount_mark
fanotify_add_inode_mark
SYSC_fanotify_init
SYSC_epoll_create1
anon_inode_getfd creates a new file instance by hooking it up to an anonymous inode, and a dentry that describe the"class" of the file
anon_inode_init
SYSC_eventfd2
SYSC_userfaultfd
SYSC_io_setup
io_submit_one
__break_lease revoke all outstanding leases on file
do_fcntl_add_lease
SYSC_flock
C_SYSC_mount
load_em86
load_misc_binarythe loader itself
bm_register_write/register
load_script
load_elf_binary
load_elf_fdpic_binaryload an fdpic binary into various bits of memory
posix_acl_chmod
posix_acl_create
posix_acl_xattr_get
posix_acl_xattr_set
cn_print_exe_file
do_handle_to_path
do_handle_open
__dquot_initializeInitialize quota pointers in inode
dquot_transferWrapper for transferring ownership of an inode for uid/gid only Called from FSXXX_setattr()
dquot_quota_on_mountThis function is used when filesystem needs to initialize quotas during mount time.
dquot_get_dqblk
dquot_set_dqblk
quota_quotaon
SYSC_quotactl
maps_open
proc_maps_open
pagemap_open
pid_ns_prepare_proc
proc_pid_auxv
__mem_open
do_proc_readlink
proc_setup_self
proc_setup_thread_self
proc_sys_call_handler
proc_sys_open
proc_sys_readdir
proc_sys_permission
proc_sys_getattr
get_subdir find or create a subdir with the specified name.
sysctl_follow_link
sysfs_add_file_mode_ns
sysfs_create_dir_ns create a directory for an object with a namespace tag
sysfs_create_mount_point create an always empty directory
sysfs_do_create_link_sd
sysfs_init
internal_create_group
__compat_only_sysfs_link_entry_to_kobj add a symlink to a kobject pointing to a group or an attribute
configfs_make_dirent
configfs_depend_item
configfs_mkdir
configfs_dir_open
configfs_register_subsystem
init_devpts_fs
SYSC_lookup_dcookie