Skip to content

Make kexec work with CONFIG_DEBUG_RODATA enabled

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] Make kexec work with CONFIG_DEBUG_RODATA enabled

Hi Nikolay,

Quoted 14 lines · Nikolay Borisov

This patch makes kexec work on a kernel that has its .text section set to read only. The main reason of doing it is because there is a patch in the making
(http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/244779.html)
which aims to make it possible to flag the kernel's code section as read-only, rendering kexec inoperable.

The first patch does the actual functional changes while the 2nd one is optional and is only to be used in case you have already applied the aforementioned CONFIG_DEBUG_RODATA patch

Patch 3 is also optional and tries to make the assembly code a bit more "sane" by introducing a .struct to describe the parameters for the kernel relocation stub.

Quoted 7 lines

Those patches have been tested on linux 3.14 on THUMB-2/non-THUMB-2 host kernels.

Patch 1 and 3 apply cleanly on 3.15-rc3 and Patch 2 applies cleanly, provided that Kees' patch is applied as well.

Kees also managed to test that on a QEMU 2.0 based machine.

Wouldn't it be far simpler to set_kernel_text_rw() on a kexec? At this point, we've committed to replacing our image, so whether we can write to the .text of the old image before we clobber it entirely seems somewhat moot to me.

Will