From: Meelis Roos <mroos@linux.ee>
To: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Scott Wood <oss@buserror.net>,
Balbir Singh <bsingharora@gmail.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] powerpc: fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX
Date: Tue, 21 Nov 2017 19:28:24 +0200 (EET) [thread overview]
Message-ID: <alpine.LRH.2.21.1711211821320.8798@math.ut.ee> (raw)
In-Reply-To: <20171121142820.C744F6BB8F@po15668-vm-win7.idsi0.si.c-s.fr>
> 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 <mroos@linux.ee>
> Cc: Balbir Singh <bsingharora@gmail.com>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> v2: Added missing asm/setup.h
It works - thank you! Tested on top of 4.14.0.
For wider powerpc audience: this warning-like INFO bit is present
independently of theis patch. Is it dangerous for some configuration?
INFO: Uncompressed kernel (size 0x5d6c54) overlaps the address of the wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x600000)
--
Meelis Roos (mroos@linux.ee)
next prev parent reply other threads:[~2017-11-21 17:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 14:28 [PATCH v2] powerpc: fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX Christophe Leroy
2017-11-21 17:28 ` Meelis Roos [this message]
2017-11-21 22:22 ` Benjamin Herrenschmidt
2017-11-21 23:07 ` Balbir Singh
2017-11-22 7:16 ` Christophe LEROY
2017-11-22 11:48 ` Michael Ellerman
2017-11-23 7:49 ` Christophe LEROY
2017-11-23 12:04 ` Michael Ellerman
2017-11-25 23:57 ` Balbir Singh
2017-11-22 11:55 ` Michael Ellerman
2017-11-24 9:46 ` [v2] " Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2017-11-21 14:26 [PATCH v2] " Christophe Leroy
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=alpine.LRH.2.21.1711211821320.8798@math.ut.ee \
--to=mroos@linux.ee \
--cc=benh@kernel.crashing.org \
--cc=bsingharora@gmail.com \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=oss@buserror.net \
--cc=paulus@samba.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).