函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mmit_creds - Install new credentials upon the current task*@new: The credentials to be assigned* Install a new set of credentials to the current task, using RCU to replace* the old set. Both the objective and the subjective credentials pointers are

函数原型:int commit_creds(struct cred *new)

返回类型:int

参数:

类型参数名称
struct cred *new
436  task等于当前进程
437  old等于 Objective and real subjective task credentials (COW):
439  kdebug("commit_creds(%p{%d,%d})", new, atomic_read( & usage), read_cred_subscribers(new))
443  BUG_ON(安全管理凭证 != old)
449  BUG_ON(atomic_read( & usage) < 1)
451  get_cred - Get a reference on a set of credentials*@cred: The credentials to reference* Get a reference on the specified set of credentials. The caller must* release the reference. If %NULL is passed, it is returned with no action.
454  如果非uid_eq(有效uid, 有效uid)或非gid_eq(有效gid, 有效gid)或非uid_eq( UID for VFS ops , UID for VFS ops )或非gid_eq( GID for VFS ops , GID for VFS ops )或非cred_cap_issubset(old, new)则
459  如果内存信息set_dumpable(内存信息, External variables not in a header file. )
461  父进程终止时发出的信号等于0
471  smp_wmb()
475  如果非uid_eq( UID for VFS ops , UID for VFS ops )则key_fsuid_changed(new)
477  如果非gid_eq( GID for VFS ops , GID for VFS ops )则key_fsgid_changed(new)
484  alter_cred_subscribers(new, 2)
485  如果真实用户身份不等于真实用户身份atomic_inc( & How many processes does this user have? )
487  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( Objective and real subjective task credentials (COW): , new)
488  cu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization(安全管理凭证, new)
489  如果真实用户身份不等于真实用户身份atomic_dec( & How many processes does this user have? )
491  alter_cred_subscribers(old, - 2)
494  如果非uid_eq(进程uid, 进程uid)或非uid_eq(有效uid, 有效uid)或非uid_eq(保留uid, 保留uid)或非uid_eq( UID for VFS ops , UID for VFS ops )则proc_id_connector(task, PROC_EVENT_UID)
500  如果非gid_eq(进程gid, 进程gid)或非gid_eq(有效gid, 有效gid)或非gid_eq(保留gid, 保留gid)或非gid_eq( GID for VFS ops , GID for VFS ops )则proc_id_connector(task, PROC_EVENT_GID)
507  put_cred - Release a reference to a set of credentials*@cred: The credentials to release* Release a reference to a set of credentials, deleting them when the last ref* is released
508  put_cred - Release a reference to a set of credentials*@cred: The credentials to release* Release a reference to a set of credentials, deleting them when the last ref* is released
509  返回:0
调用者
名称描述
call_usermodehelper_exec_asyncThis is the task which runs the usermode application
set_current_groupsset_current_groups - Change current's group subscription*@group_info: The group list to impose* Validate a group subscription and, if valid, impose it upon current's task* security record.
userns_install
keyctl_set_reqkey_keyringRead or set the default keyring in which request_key() will cache keys and* return the old setting.* If a thread or process keyring is specified then it will be created if it* doesn't yet exist. The old setting will be returned if successful.
install_thread_keyringInstall a thread keyring to the current task if it didn't have one already.* Return: 0 if a thread keyring is now present; -errno on failure.
install_process_keyringInstall a process keyring to the current task if it didn't have one already.* Return: 0 if a process keyring is now present; -errno on failure.
install_session_keyringInstall the given keyring as the session keyring of the current task,* replacing the existing one if any. If the given keyring is NULL, then* install a new anonymous session keyring.* Return: 0 on success; -errno on failure.
join_session_keyringJoin the named keyring as the session keyring if possible else attempt to* create a new one of that name and join that
key_change_session_keyringReplace a process's session keyring on behalf of one of its children when* the target process is about to resume userspace execution.
cap_prctl_dropImplement PR_CAPBSET_DROP. Attempt to remove the specified capability from* the current task's bounding set. Returns 0 on success, -ve on error.
cap_task_prctlap_task_prctl - Implement process control functions for this security module*@option: The process control function requested*@arg2, @arg3, @arg4, @arg5: The argument data for this function* Allow process control functions (sys_prctl()) to alter
selinux_setprocattr
smack_setprocattrsmack_setprocattr - Smack process attribute setting*@name: the name of the attribute in /proc/
aa_replace_current_labelaa_replace_current_label - replace the current tasks label*@label: new label (NOT NULL)* Returns: 0 or error on failure
aa_set_current_hataa_set_current_hat - set the current tasks hat*@label: label to set as the current hat (NOT NULL)*@token: token value that must be specified to change from the hat* Do switch of tasks hat
aa_restore_previous_labelaa_restore_previous_label - exit from hat context restoring previous label*@token: the token that must be matched to exit hat context* Attempt to return out of a hat to the previous label
ksys_unshareshare allows a process to 'unshare' part of the process* context which was originally shared using clone. copy_** functions used by do_fork() cannot be used here directly* because they modify an inactive task_struct that is being* constructed
keyctl_change_reqkey_authChange the request_key authorisation key on the current process.
install_exec_credsstall the new credentials for this executable