函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Hash a key type and description.

函数原型:static void hash_key_type_and_desc(struct keyring_index_key *index_key)

返回类型:void

参数:

类型参数名称
struct keyring_index_key *index_key
165  level_shift等于ASSOC_ARRAY_LEVEL_STEP
166  fan_mask等于ASSOC_ARRAY_FAN_MASK
167  description等于description
171  desc_len等于desc_len
173  type等于type
174  acc等于Multiply 64-bits by 32-bits to 96-bits and fold back to 64-bit. Ideally we'd* fold the carry back too, but that requires inline asm.
175  acc等于Multiply 64-bits by 32-bits to 96-bits and fold back to 64-bit. Ideally we'd* fold the carry back too, but that requires inline asm.
176  piece等于 Domain of operation
177  acc等于Multiply 64-bits by 32-bits to 96-bits and fold back to 64-bit. Ideally we'd* fold the carry back too, but that requires inline asm.
178  acc等于Multiply 64-bits by 32-bits to 96-bits and fold back to 64-bit. Ideally we'd* fold the carry back too, but that requires inline asm.
180  循环
181  n等于desc_len
182  如果n小于等于0则退出
184  如果n大于4则n等于4
186  piece等于0
187  memcpy( & piece, description, n)
188  description加等于n
189  desc_len减等于n
190  acc等于Multiply 64-bits by 32-bits to 96-bits and fold back to 64-bit. Ideally we'd* fold the carry back too, but that requires inline asm.
191  acc等于Multiply 64-bits by 32-bits to 96-bits and fold back to 64-bit. Ideally we'd* fold the carry back too, but that requires inline asm.
195  hash等于acc
196  如果Key data retrieved in chunks of this size 恒等于32则hash异或等于acc右移32位
203  如果type不等于key_type_keyringhash按位与fan_mask的值恒等于0则hash或等于hash右移Key data retrieved in chunks of this size level_shift位按位或1
205  否则如果type恒等于key_type_keyringhash按位与fan_mask的值不等于0则hash等于hashhash左移level_shift位的值按位与fan_mask的反
207  Hash value 等于hash
调用者
名称描述
key_set_index_keyFinalise 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.