Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\keyring.c Create Date:2022-07-28 18:17:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Compare the index keys of a pair of objects and determine the bit position* at which they differ - if they differ.

Proto:static int keyring_diff_objects(const void *object, const void *data)

Type:int

Parameter:

TypeParameterName
const void *object
const void *data
327  key_a = keyring_ptr_to_key(object)
328  a = index_key
329  b = data
333  level = 0
334  seg_a = Hash value
335  seg_b = Hash value
336  If (seg_a ^ seg_b) != 0 Then Go to differ
338  level += Key data retrieved in chunks of this size / 8
344  seg_a = x
345  seg_b = x
346  If (seg_a ^ seg_b) != 0 Then Go to differ
348  level += sizeof(unsignedlong)
351  seg_a = type
352  seg_b = type
353  If (seg_a ^ seg_b) != 0 Then Go to differ
355  level += sizeof(unsignedlong)
357  seg_a = Domain of operation
358  seg_b = Domain of operation
359  If (seg_a ^ seg_b) != 0 Then Go to differ
361  level += sizeof(unsignedlong)
363  i = size of First few chars of description
364  If desc_len <= i Then Go to same
367  When i < desc_len cycle
368  seg_a = *(description + i)
369  seg_b = *(description + i)
370  If (seg_a ^ seg_b) != 0 Then Go to differ_plus_i
374  same :
375  Return -1
377  differ_plus_i :
378  level += i
379  differ :
380  i = level * 8 + __ffs - find first set bit in word*@word: The word to search* Undefined if no bit exists, so code should check against 0 first.
381  Return i