函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:复制信任

函数原型:int copy_creds(struct task_struct *p, unsigned long clone_flags)

返回类型:int

参数:

类型参数名称
struct task_struct *p
unsigned longclone_flags
339  如果非 keyring private to this thread clone_flags按位与属于同一个线程组
345  Objective and real subjective task credentials (COW): 等于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.
346  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.
347  alter_cred_subscribers(安全管理凭证, 2)
348  kdebug("share_creds(%p{%d,%d})", 安全管理凭证, atomic_read( & usage), read_cred_subscribers(安全管理凭证))
351  atomic_inc( & How many processes does this user have? )
352  返回:0
355  new等于prepare_creds - Prepare a new set of credentials for modification* Prepare a new set of task credentials for modification
356  如果非new则返回:负ENOMEM
359  如果clone_flags按位与新用户空间
360  ret等于Create a new user namespace, deriving the creator from the user in the* passed credentials, and replacing that user with the new root user for the* new namespace.* This is called by copy_creds(), which will finish setting the target task's* credentials.
361  如果ret小于0则转到:error_put
368  如果 keyring private to this thread
369  key_put( keyring private to this thread )
370  keyring private to this thread = NULL
371  如果clone_flags按位与属于同一个线程组he userspace interface
378  如果非clone_flags按位与属于同一个线程组的值则
379  key_put( keyring private to this process )
380  keyring private to this process = NULL
384  atomic_inc( & How many processes does this user have? )
385  安全管理凭证等于 Objective and real subjective task credentials (COW): 等于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.
386  alter_cred_subscribers(new, 2)
387  validate_creds(new)
388  返回:0
390  error_put :
391  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
392  返回:ret
调用者
名称描述
copy_process创建进程