From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454AbdKXJqn (ORCPT ); Fri, 24 Nov 2017 04:46:43 -0500 Received: from ozlabs.org ([103.22.144.67]:33547 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753428AbdKXJqi (ORCPT ); Fri, 24 Nov 2017 04:46:38 -0500 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 252eb55816a6f69ef9464cad303cdb3326cdc61d In-Reply-To: <20171121142820.C744F6BB8F@po15668-vm-win7.idsi0.si.c-s.fr> To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Scott Wood , Meelis Roos , Balbir Singh From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [v2] powerpc: fix boot on BOOK3S_32 with CONFIG_STRICT_KERNEL_RWX Message-Id: <3yjrtj40HRz9rxl@ozlabs.org> Date: Fri, 24 Nov 2017 20:46:37 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Balbir Singh > Signed-off-by: Christophe Leroy Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/252eb55816a6f69ef9464cad303cdb cheers