Function report |
Source Code:arch\x86\lib\kaslr.c |
Create Date:2022-07-28 07:25:51 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kaslr_get_random_long
Proto:unsigned long kaslr_get_random_long(const char *purpose)
Type:unsigned long
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If has_cpuflag(RDRAND instruction ) Then |
63 | debug_putstr(" RDRAND") |
64 | If Unconditional execution of RDRAND and RDSEED Then |
70 | If has_cpuflag(Time Stamp Counter ) Then |
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 |
75 | use_i8254 = false |
78 | If use_i8254 Then |
79 | debug_putstr(" i8254") |
84 | asm(_ASM_MUL "%3":"=a"(random), "=d"(raw):"a"(random), "rm"(mix_const)) |
89 | debug_putstr("...\n") |
91 | Return random |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |