From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp2.it.da.ut.ee (smtp2.it.da.ut.ee [IPv6:2001:bb8:2002:500:20f:1fff:fe04:1bbb]) by lists.ozlabs.org (Postfix) with ESMTP id 3yhCH53SF5zDqyR for ; Wed, 22 Nov 2017 04:28:28 +1100 (AEDT) Date: Tue, 21 Nov 2017 19:28:24 +0200 (EET) From: Meelis Roos Sender: mroos@math.ut.ee To: Christophe Leroy cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , Balbir Singh , 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 In-Reply-To: <20171121142820.C744F6BB8F@po15668-vm-win7.idsi0.si.c-s.fr> Message-ID: References: <20171121142820.C744F6BB8F@po15668-vm-win7.idsi0.si.c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > 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 > Cc: Balbir Singh > Signed-off-by: Christophe Leroy > --- > 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)