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
197 unsigned long random_offset; in determine_relocation_address() local
205 random_offset = get_random_boot() << 16; in determine_relocation_address()
206 random_offset &= (CONFIG_RANDOMIZE_BASE_MAX_OFFSET - 1); in determine_relocation_address()
207 if (random_offset < kernel_length) in determine_relocation_address()
208 random_offset += ALIGN(kernel_length, 0xffff); in determine_relocation_address()
225 static inline void __init update_reloc_offset(unsigned long *addr, long random_offset) in update_reloc_offset() argument
235 unsigned long random_offset = 0; in relocate_kernel() local
246 random_offset = (unsigned long)location_new - (unsigned long)(_text); in relocate_kernel()
251 if (random_offset) { in relocate_kernel()
263 reloc_offset += random_offset; in relocate_kernel()
268 update_reloc_offset(&reloc_offset, random_offset); in relocate_kernel()
274 relocate_absolute(random_offset); in relocate_kernel()
276 return random_offset; in relocate_kernel()