函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\lib\kaslr.c Create Date:2022-07-27 08:24:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kaslr_get_random_long

函数原型:unsigned long kaslr_get_random_long(const char *purpose)

返回类型:unsigned long

参数:

类型参数名称
const char *purpose
52  mix_const等于0x5d6008cbf3848dd3UL
56  random等于get_boot_seed()
57  bool use_i8254 = true
59  debug_putstr(purpose)
60  debug_putstr(" KASLR using")
62  如果has_cpuflag(RDRAND instruction )则
63  debug_putstr(" RDRAND")
65  random异或等于raw
66  use_i8254 = false
70  如果has_cpuflag(Time Stamp Counter )则
71  debug_putstr(" RDTSC")
72  raw等于dtsc() - returns the current TSC without ordering constraints* rdtsc() returns the result of RDTSC as a 64-bit integer
74  random异或等于raw
75  use_i8254 = false
78  如果use_i8254
79  debug_putstr(" i8254")
80  random异或等于i8254()
84  asm(_ASM_MUL "%3":"=a"(random), "=d"(raw):"a"(random), "rm"(mix_const))
87  random加等于raw
89  debug_putstr("...\n")
91  返回:random