From: linux@armlinux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: kexec failures with DEBUG_RODATA
Date: Wed, 15 Jun 2016 20:13:52 +0100 [thread overview]
Message-ID: <20160615191352.GG1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20160615075508.GB21202@dhcppc6>
On Wed, Jun 15, 2016 at 01:25:08PM +0530, Pratyush Anand wrote:
> Sure, having a header information would be handy to do it. Other alternative
> could be that we define "HAVE_LIBZ" and then we can have something like
> kexec-Image-arm.c which handles plane Image. We can also have something like
> get_zlib_decompressed_length() which can give us exact length we need for kernel
> and then we can place initrd accordingly in zImage_arm_load().
I really don't want to do that. There are things that the decompressor
does which make it easier to deal with the zImage than the Image.
> I see at least another issue clearly in ARM kernel code with CONFIG_DEBUG_RODATA
> enabled. When CONFIG_DEBUG_RODATA is enabled, we can not write text area.
> kexec_start_address has been defined in relocate_kernel.S as a text area.
> machine_kexec() writes at kexec_start_address with image->start. Similarly there
> would be issues for overwriting of kexec_indirection_page, kexec_mach_type and
> kexec_boot_atags. If arm mmu mapping configures text pages as RO, then we should
> see an abort as soon as we do these writes.
That's not a problem, because set_kernel_text_rw() is called immediately
prior to writing, which has the effect of allowing these writes.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
prev parent reply other threads:[~2016-06-15 19:13 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 17:59 kexec failures with DEBUG_RODATA Russell King - ARM Linux
2016-06-14 18:05 ` Kees Cook
2016-06-15 2:43 ` Baoquan He
2016-06-15 21:13 ` Russell King - ARM Linux
2016-06-15 22:20 ` Kees Cook
2016-06-15 22:42 ` Russell King - ARM Linux
2016-06-15 22:54 ` Kees Cook
2016-06-15 23:13 ` Russell King - ARM Linux
2016-06-21 11:48 ` Pratyush Anand
2016-06-21 15:37 ` Russell King - ARM Linux
2016-07-07 10:20 ` Russell King - ARM Linux
2016-07-07 14:01 ` [PATCH 1/2] arm: plug a zImage corner case Russell King
2016-07-15 4:13 ` Simon Horman
2016-07-07 14:01 ` [PATCH 2/2] arm: use zImage size from header Russell King
2016-07-21 7:00 ` kexec failures with DEBUG_RODATA Tony Lindgren
2016-07-07 10:00 ` Russell King - ARM Linux
2016-06-15 7:55 ` Pratyush Anand
2016-06-15 19:13 ` Russell King - ARM Linux [this message]
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=20160615191352.GG1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@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 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).