Lines Matching refs:random_offset
21 #define RELOCATED_KASLR(x) ((void *)((long)x + random_offset))
61 static inline void __init relocate_absolute(long random_offset) in relocate_absolute() argument
176 unsigned long random_offset; in determine_relocation_address() local
184 random_offset = get_random_boot() << 16; in determine_relocation_address()
185 random_offset &= (CONFIG_RANDOMIZE_BASE_MAX_OFFSET - 1); in determine_relocation_address()
186 if (random_offset < kernel_length) in determine_relocation_address()
187 random_offset += ALIGN(kernel_length, 0xffff); in determine_relocation_address()
204 static inline void __init update_reloc_offset(unsigned long *addr, long random_offset) in update_reloc_offset() argument
214 unsigned long random_offset = 0; in relocate_kernel() local
225 random_offset = (unsigned long)location_new - (unsigned long)(_text); in relocate_kernel()
230 if (random_offset) { in relocate_kernel()
242 reloc_offset += random_offset; in relocate_kernel()
247 update_reloc_offset(&reloc_offset, random_offset); in relocate_kernel()
253 relocate_absolute(random_offset); in relocate_kernel()
255 return random_offset; in relocate_kernel()