2017-11-24 09:47:48

by Michael Ellerman

[permalink] [raw]
Subject: Re: [v2] powerpc: fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX

On Tue, 2017-11-21 at 14:28:20 UTC, Christophe Leroy wrote:
> On powerpc32, patch_instruction() is called by apply_feature_fixups()
> which is called from early_init()
>
> There is the following note in front of early_init():
> * Note that the kernel may be running at an address which is different
> * from the address that it was linked at, so we must use RELOC/PTRRELOC
> * to access static data (including strings). -- paulus
>
> Therefore, slab_is_available() cannot be called yet, and
> text_poke_area must be addressed with PTRRELOC()
>
> Fixes: 37bc3e5fd764f ("powerpc/lib/code-patching: Use alternate map
> for patch_instruction()")
> Reported-by: Meelis Roos <[email protected]>
> Cc: Balbir Singh <[email protected]>
> Signed-off-by: Christophe Leroy <[email protected]>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/252eb55816a6f69ef9464cad303cdb

cheers

From 1584858378192629619@xxx Thu Nov 23 12:05:30 +0000 2017
X-GM-THRID: 1584668609894381968
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread