linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kaslr relocation incompitable with kernel loaded high
@ 2014-04-21 10:52 WANG Chao
  2014-04-21 17:56 ` Yinghai Lu
  0 siblings, 1 reply; 8+ messages in thread
From: WANG Chao @ 2014-04-21 10:52 UTC (permalink / raw)
  To: Kees Cook, H. Peter Anvin, Yinghai Lu, Zhang Yanfei, Vivek Goyal
  Cc: linux-kernel

Hi, Kees

When I'm testing kaslr with kdump, I find that when 2nd kernel is loaded
high, it doesn't boot.

I reserved 128M memory at high with kernel cmdline
"crashkernel=128M,high crashkernel=0,low", and for which I got:

[    0.000000] Reserving 128MB of memory at 6896MB for crashkernel (System RAM: 6013MB)

Then I load kdump kernel into the reserved memory region, using a local
modified kexec-tools which is passing e820 in boot_params.

The e820 map of system RAM passed to 2nd kernel:

E820 memmap (of RAM):
0000000000001000-000000000009e3ff (1)
00000001af000000-00000001b6f5dfff (1)
00000001b6fff400-00000001b6ffffff (1)

In which, 2nd kernel is loaded at 0x1b5000000.

After triggerred a system crash, 2nd kernel doesn't boot even with
"nokaslr" cmdline:

# echo c > /proc/sysrq-trigger
[..]

I'm in purgatory
early console in decompress_kernel
KASLR disabled...

Decompressing Linux... Parsing ELF... Performing relocations... 

32-bit relocation outside of kernel!


 -- System halted


I know 32bit relocation code has recently moved to misc.c and it's a
ground work for kaslr on x86_64. However it doesn't work out on a kernel
high loaded case.

I'm not quite familiar with this. But I'm wondering if it makes sense to
skip handle_relocation() if kaslr doesn't take effects (nokaslr or
kaslr failed to find suitable area).

Thanks
WANG Chao

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-22 18:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-21 10:52 kaslr relocation incompitable with kernel loaded high WANG Chao
2014-04-21 17:56 ` Yinghai Lu
2014-04-21 17:57   ` H. Peter Anvin
2014-04-21 18:01   ` Kees Cook
2014-04-22  3:16     ` WANG Chao
2014-04-22  4:58       ` Yinghai Lu
2014-04-22  5:28         ` WANG Chao
2014-04-22 18:14           ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).