函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Search the current process's keyrings for the authorisation key for* instantiation of a key.

函数原型:struct key *key_get_instantiation_authkey(key_serial_t target_id)

返回类型:struct key

参数:

类型参数名称
key_serial_ttarget_id
250  struct keyring_search_context ctx = {type = & The request-key authorisation key type definition., description = description, cred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.(), cmp = By default, we keys found by getting an exact match on their descriptions., Raw match data = description, Type of lookup for this search. = Direct lookup by description. , flags = (Override NO_STATE_CHECK | Search child keyrings also ), }
263  desc_len等于输出格式化串
265  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
266  authkey_ref等于Search the process keyrings attached to the supplied cred for the first* matching key in the manner of search_my_process_keyrings(), but also search* the keys attached to the assumed authorisation key using its credentials if* one is available.
267  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
269  如果是错误
270  authkey等于错误指示
271  如果authkey恒等于错误号authkey等于错误号
273  转到:error
276  authkey等于key_ref_to_ptr(authkey_ref)
277  如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from
278  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
279  authkey等于错误号
282  error :
283  返回:authkey
调用者
名称描述
keyctl_set_timeoutSet or clear the timeout on a key.* Either the key must grant the caller Setattr permission or else the caller* must hold an instantiation authorisation token for the key.* The timeout is either 0 to clear the timeout, or a number of seconds from
keyctl_assume_authorityAssume (or clear) the authority to instantiate the specified key
keyctl_get_securityGet a key's the LSM security label.* The key must grant the caller View permission for this to work.* If there's a buffer, then up to buflen bytes of data will be placed into it.* If successful, the amount of information available will be returned,
keyctl_describe_keyReturn a description of a key to userspace