From: Vivek Goyal <vgoyal@redhat.com>
To: WANG Chao <chaowang@redhat.com>
Cc: kexec@lists.infradead.org, Simon Horman <horms@verge.net.au>,
Dave Young <dyoung@redhat.com>
Subject: Re: [kexec-tools PATCH] x86, kaslr: add alternative way to locate kernel text mapping area
Date: Thu, 27 Mar 2014 17:57:17 -0400 [thread overview]
Message-ID: <20140327215717.GO13816@redhat.com> (raw)
In-Reply-To: <20140327102548.GA15941@dhcp-17-89.nay.redhat.com>
On Thu, Mar 27, 2014 at 06:25:48PM +0800, WANG Chao wrote:
[..]
> @@ -169,6 +200,31 @@ static int get_kernel_vaddr_and_size(struct kexec_info *UNUSED(info),
> }
> }
> }
> +
> + /* Go through /proc/kcore again. This time we find the region
> + * where _stext symbol is located in */
Hi Chao,
How about doing it reverse. Using _stext seems to be the right thing to
do both for kaslr enabled as well as kaslr disabled kernel. Right now
assuming that kernel text mapping fall in a certain area is a hack
and will break if kernel addresses are shifted again for whatever reason.
So we can first look for kernel mapping using _stext. If /proc/kallsyms
is not present, then we can fall back using hardcoded address range
between X86_64__START_KERNEL_map and X86_64__START_KERNEL_map +
X86_64_KERNEL_TEXT_SIZE.
Thanks
Vivek
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-03-27 21:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 10:25 [kexec-tools PATCH] x86, kaslr: add alternative way to locate kernel text mapping area WANG Chao
2014-03-27 21:57 ` Vivek Goyal [this message]
2014-03-28 6:20 ` WANG Chao
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=20140327215717.GO13816@redhat.com \
--to=vgoyal@redhat.com \
--cc=chaowang@redhat.com \
--cc=dyoung@redhat.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.