函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Iteration function to consider each key found.

函数原型:static int keyring_search_iterator(const void *object, void *iterator_data)

返回类型:int

参数:

类型参数名称
const void *object
void *iterator_data
580  ctx等于iterator_data
581  key等于keyring_ptr_to_key(object)
582  kflags等于READ_ONCE( status flags (change with bitops) )
583  state等于READ_ONCE( Key state (+) or rejection error (-) )
585  kenter("{%d}", key serial number )
588  如果 type of key 不等于type
589  kleave(" = 0 [!type]")
590  返回:0
594  如果flags按位与Override NO_STATE_CHECK
595  expiry等于READ_ONCE( time at which key expires (or 0) )
597  如果kflags按位与1左移set if key has been invalidated 位按位或1左移set if key had been revoked 位的值则
599  result等于错误号
600  kleave(" = %d [invrev]", Internal stuff )
601  转到:skipped
604  如果expirynow大于等于expiry
607  kleave(" = %d [expire]", Internal stuff )
608  转到:skipped
613  如果非cmp(key, & match_data)则
614  kleave(" = 0 [!match]")
615  返回:0
619  如果非flags按位与Don't check permissions 的值且key_task_permission(make_key_ref(key, possessed), cred, Require permission to search (keyring) or find (key) )小于0则
622  result等于错误号
623  kleave(" = %d [!perm]", Internal stuff )
624  转到:skipped
627  如果flags按位与Override NO_STATE_CHECK
629  如果state小于0则
630  result等于错误号
631  kleave(" = %d [neg]", Internal stuff )
632  转到:skipped
637  result等于make_key_ref(key, possessed)
638  kleave(" = 1 [found]")
639  返回:1
641  skipped :
642  返回: Internal stuff