函数逻辑报告 |
Source Code:security\keys\key.c |
Create Date:2022-07-27 19:50:17 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Allocate a serial number for a key. These are assigned randomly to avoid* security issues through covert channel problems.
函数原型:static inline void key_alloc_serial(struct key *key)
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct key * | key |
140 | 循环 |
141 | get_random_bytes( & key serial number , key serial number 的长度) |
143 | key serial number 右移等于1位 |
144 | 当 key serial number 小于3循环 |
146 | 加自旋锁 |
148 | attempt_insertion : |
149 | parent = NULL |
154 | xkey等于rb_entry(parent, structkey, serial_node) |
156 | 如果 key serial number 小于 key serial number 则p等于rb_left |
158 | 否则如果 key serial number 大于 key serial number 则p等于rb_right |
160 | 否则转到:serial_exists |
165 | rb_link_node( & serial_node, parent, p) |
166 | rb_insert_color( & serial_node, & ree of keys indexed by serial ) |
168 | 自旋锁解锁 |
169 | 返回 |
173 | serial_exists : |
174 | 循环 |
175 | key serial number 自加 |
176 | 如果 key serial number 小于3则 |
177 | key serial number 等于3 |
178 | 转到:attempt_insertion |
182 | 如果非parent则转到:attempt_insertion |
185 | xkey等于rb_entry(parent, structkey, serial_node) |
186 | 如果 key serial number 小于 key serial number 则转到:attempt_insertion |
名称 | 描述 |
---|---|
key_alloc | key_alloc - Allocate a key of the specified type.*@type: The type of key to allocate.*@desc: The key description to allow the key to be searched out.*@uid: The owner of the new key.*@gid: The group ID for the new key's group permissions. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |