函数逻辑报告 |
Source Code:security\keys\keyring.c |
Create Date:2022-07-27 19:52:37 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Search a tree of keyrings that point to other keyrings up to the maximum* depth.
函数原型:static bool search_nested_keyrings(struct key *keyring, struct keyring_search_context *ctx)
返回类型:bool
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct key * | keyring | |
| struct keyring_search_context * | ctx |
| 680 | sp等于0 |
| 682 | kenter("{%d},{%s,%s}", key serial number , name, description) |
| 691 | 如果description则Finalise an index key to include a part of the description actually in the* index key, to set the domain tag and to calculate the hash. |
| 699 | Internal stuff 等于2 |
| 701 | 当:iterator(keyring_key_to_ptr(keyring), ctx)恒等于1 |
| 702 | 转到:found |
| 703 | 当:iterator(keyring_key_to_ptr(keyring), ctx)恒等于2 |
| 704 | 返回:false |
| 705 | 默认 |
| 706 | 退出 |
| 710 | Internal stuff 等于0 |
| 713 | descend_to_keyring : |
| 714 | kdebug("descend to %d", key serial number ) |
| 715 | 如果 status flags (change with bitops) 按位与1左移set if key has been invalidated 位按位或1左移set if key had been revoked 位的值则转到:not_this_keyring |
| 722 | 如果Search inside a keyring for a key. We can search by walking to it* directly based on its index-key or we can iterate over the entire* tree looking for it, based on the match function.则转到:found |
| 733 | 如果非flags按位与Search child keyrings also 的值则转到:not_this_keyring |
| 737 | 如果非ptr则转到:not_this_keyring |
| 740 | 如果assoc_array_ptr_is_shortcut(ptr)则 |
| 746 | 如果index_key[0]按位与ASSOC_ARRAY_FAN_MASK的值不等于0则转到:not_this_keyring |
| 750 | node等于assoc_array_ptr_to_node(ptr) |
| 751 | 转到:begin_node |
| 754 | node等于assoc_array_ptr_to_node(ptr) |
| 756 | 如果非assoc_array_ptr_is_meta(ptr)则转到:begin_node |
| 759 | descend_to_node : |
| 763 | kdebug("descend") |
| 764 | 如果assoc_array_ptr_is_shortcut(ptr)则 |
| 767 | BUG_ON(!assoc_array_ptr_is_node(ptr)) |
| 769 | node等于assoc_array_ptr_to_node(ptr) |
| 771 | begin_node : |
| 772 | kdebug("begin_node") |
| 773 | slot等于0 |
| 774 | ascend_to_node : |
| 776 | 以slot小于Number of slots per node 循环 |
| 782 | 如果非keyring_ptr_is_keyring(ptr)则继续下一循环 |
| 785 | key等于keyring_ptr_to_key(ptr) |
| 788 | 如果flags按位与Give an error on excessive depth 则 |
| 792 | 转到:not_this_keyring |
| 796 | 如果非flags按位与Don't check permissions 的值且key_task_permission(make_key_ref(key, possessed), cred, Require permission to search (keyring) or find (key) )小于0则继续下一循环 |
| 805 | sp自加 |
| 809 | 转到:descend_to_keyring |
| 815 | ptr等于READ_ONCE(back_pointer) |
| 816 | slot等于parent_slot |
| 818 | 如果ptr且assoc_array_ptr_is_shortcut(ptr)则 |
| 820 | ptr等于READ_ONCE(back_pointer) |
| 821 | slot等于parent_slot |
| 823 | 如果非ptr则转到:not_this_keyring |
| 825 | node等于assoc_array_ptr_to_node(ptr) |
| 826 | slot自加 |
| 832 | 如果back_pointer则 |
| 834 | 转到:ascend_to_node |
| 840 | not_this_keyring : |
| 842 | 如果sp小于等于0则 |
| 843 | kleave(" = false") |
| 844 | 返回:false |
| 848 | sp自减 |
| 852 | kdebug("ascend to %d [%d]", key serial number , slot) |
| 853 | 转到:ascend_to_node |
| 856 | found : |
| 857 | key等于key_ref_to_ptr(result) |
| 859 | 如果非flags按位与Don't update times 的值则 |
| 865 | kleave(" = true") |
| 866 | 返回:true |
| 名称 | 描述 |
|---|---|
| keyring_search_rcu | keyring_search_rcu - Search a keyring tree for a matching key under RCU*@keyring_ref: A pointer to the keyring with possession indicator |
| keyring_detect_cycle | See if a cycle will will be created by inserting acyclic tree B in acyclic* tree A at the topmost level (ie: as a direct child of A).* Since we are adding B to A at the top level, checking for cycles should just |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |