函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:key_reject_and_link - Negatively instantiate a key and link it into the keyring.*@key: The key to instantiate.*@timeout: The timeout on the negative key.*@error: The error to return when the key is hit.

函数原型:int key_reject_and_link(struct key *key, unsigned timeout, unsigned error, struct key *keyring, struct key *authkey)

返回类型:int

参数:

类型参数名称
struct key *key
unsignedtimeout
unsignederror
struct key *keyring
struct key *authkey
575  struct assoc_array_edit * edit = NULL
576  link_ret等于0
578  key_check(key)
579  key_check(keyring)
581  awaken等于0
582  ret等于负EBUSY
584  如果keyring
585  如果 This is set on a keyring to restrict the addition of a link to a key * to it. If this structure isn't provided then it is assumed that the * keyring is open to any addition. It is ignored for non-keyring * keys. Only set this value using keyring_restrict(则返回:负EPERM
588  link_ret等于__key_link_lock(keyring, & index_key)
589  如果link_ret恒等于0则
596  mutex_lock( & We serialise key instantiation and link )
599  如果 Key state (+) or rejection error (-) 恒等于KEY_IS_UNINSTANTIATED
601  atomic_inc( & nikeys)
602  Change the key state to being instantiated.
603  time at which key expires (or 0) 等于ktime_get_real_seconds - Get the seconds portion of CLOCK_REALTIME* Returns the wall clock seconds since 1970. This replaces the* get_seconds() interface which is not y2038 safe on 32bit systems.timeout
604  Schedule a garbage collection run.* - time precision isn't particularly important
606  如果st_and_clear_bit - Clear a bit and return its old value*@nr: Bit to clear*@addr: Address to count from* This is an atomic fully-ordered operation (implied full memory barrier).awaken等于1
609  ret等于0
612  如果keyringlink_ret恒等于0则__key_link(key, & edit)
616  如果authkeykey_invalidate - Invalidate a key.*@key: The key to be invalidated.* Mark a key as being invalidated and have it cleaned up immediately. The key* is ignored by all searches and other operations from this point.
620  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
622  如果keyringlink_ret恒等于0则Finish linking a key into to a keyring.* Must be called with __key_link_begin() having being called.
626  如果awakenwake_up_bit - wake up a waiter on a bit*@word: the word being waited on, a kernel virtual address*@bit: the bit of the word being waited on* There is a standard hashed waitqueue table for generic use
629  返回:如果ret恒等于0则link_ret否则ret
调用者
名称描述
keyctl_reject_keyNegatively instantiate the key with the given timeout (in seconds) and error* code and link the key into the destination keyring if one is given.* The caller must have the appropriate instantiation permit set for this to
key_negate_and_link