From: WANG Chao <chaowang@redhat.com>
To: Kees Cook <keescook@chromium.org>,
"H. Peter Anvin" <hpa@linux.intel.com>,
Yinghai Lu <yinghai@kernel.org>,
Zhang Yanfei <zhangyanfei@cn.fujitsu.com>,
Vivek Goyal <vgoyal@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: kaslr relocation incompitable with kernel loaded high
Date: Mon, 21 Apr 2014 18:52:32 +0800 [thread overview]
Message-ID: <20140421105232.GB4564@dhcp-17-89.nay.redhat.com> (raw)
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
next reply other threads:[~2014-04-21 10:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 10:52 WANG Chao [this message]
2014-04-21 17:56 ` kaslr relocation incompitable with kernel loaded high 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140421105232.GB4564@dhcp-17-89.nay.redhat.com \
--to=chaowang@redhat.com \
--cc=hpa@linux.intel.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
--cc=yinghai@kernel.org \
--cc=zhangyanfei@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).