Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\kcmp.c Create Date:2022-07-28 10:36:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kptr_obfuscate

Proto:static long kptr_obfuscate(long v, int type)

Type:long

Parameter:

TypeParameterName
longv
inttype
41  Return (v ^ We don't expose the real in-memory order of objects for security reasons.* But still the comparison results should be suitable for sorting. So we* obfuscate kernel pointers values and compare the production instead.* The obfuscation is done in two steps[type][0]) * We don't expose the real in-memory order of objects for security reasons.* But still the comparison results should be suitable for sorting. So we* obfuscate kernel pointers values and compare the production instead.* The obfuscation is done in two steps[type][1]
Caller
NameDescribe
kcmp_ptr0 - equal, i.e. v1 = v2* 1 - less than, i.e. v1 < v2* 2 - greater than, i.e. v1 > v2* 3 - not equal but ordering unavailable (reserved for future)