Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp306728yba; Wed, 15 May 2019 01:30:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3BNe3qkkjsLGUt9L0PdH2nSJqgw8tzafwyobErwT5R2iB+Zs1JMLO5gLpsGVtWZJBLW6u X-Received: by 2002:a17:902:e40f:: with SMTP id ci15mr43894249plb.280.1557909055452; Wed, 15 May 2019 01:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557909055; cv=none; d=google.com; s=arc-20160816; b=pPNkZL3CaouynY5teFR1LFTbM5bVnrSC2DjcFH7SyqocEtOUPvn2B1nsto6YggGRJa s65nx0R759MYmC8iUZlqEPC031vBnEAWdA6u3ua7BmcdREhwo1Bh1Z15pA+Esm0DbdUn M20rKMn4SEWmMesUnh4G8RoAu4wVQ2ZiGF5XiA1c8b3y8LNEpp/IXYIuqIvyB5ljg5v/ t35AORcUR3yWUgmZ7WTZ0i2zcZMJwdCbtyNvS4D7bAj8xnk5fwBhPZlirPzkuLIq7RBX 49iTvt/LvBIF4gVEuI15EqCzU8m2DWyDbI6/dN4viPsdMhmPW4fwzKWoSwJzHqpUmbI6 TT0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=O53qOzYwNksqF/cprzbB9+t7DUnt29hzwcQphvVVxeU=; b=BS9iIMEAzy2L0hvIfeRX50T2rX5YATAYI5tanbxS9npYzTlyKj2iNPeocIwcrSgwxT I9Se++cF8Hu8niWchkOcPNzjWD3L2m9uNii772UW7ymrzjQpcpoEDOcYi3Fil2o9oCpn eK5dh5ZjKl5aqgSWrvaqMHpTwS/3Wu3ASYlHRkX/3J/OpfzB7B71r1irQKqKU8aS16Ak kNiRoHO3LJ00blvjdfc9rtvwWaAQNoMY3idTG1WmmxpBY94lypYUgCgRDC1khdHOyL0X aGtjtlzTioxapjtISuPoWyUsUPykBKJXeLz0iHiBUOj28ivd16KGL0cqDrkdGZKEZnWu tZIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SdigXGYp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x68si1506929pfb.3.2019.05.15.01.30.39; Wed, 15 May 2019 01:30:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SdigXGYp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726212AbfEOI3e (ORCPT + 99 others); Wed, 15 May 2019 04:29:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:53088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725902AbfEOI3e (ORCPT ); Wed, 15 May 2019 04:29:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 43E7720843; Wed, 15 May 2019 08:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557908973; bh=cb6Z72ERql0xdgtLEheM3Mr6tP+8TTkYRDEjF92YdbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SdigXGYpCHahSil4CZYyy/NiXojNHYkhugo43zeFTqjlrDGXb1oFyhTfCwi/uoHhq 1O+0Z8NwBTRc07OTs3Ya+ehdtc6bQJiPl6GgiBEbpVUYO61xxkovBN++Wra2EE8d3A N6fYSRwKLhMwU1A0EEfRgvm2nD05P96Ok4Xgcpfk= Date: Wed, 15 May 2019 10:29:31 +0200 From: Greg KH To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , erhard_f@mailbox.org, Michael Neuling , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, "stable@vger.kernel.org" Subject: Re: [PATCH stable 4.9] powerpc/lib: fix book3s/32 boot failure due to code patching Message-ID: <20190515082931.GA28349@kroah.com> References: <629c2acb1fcd09c2d2e3352370c3d9853372cf39.1557902321.git.christophe.leroy@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <629c2acb1fcd09c2d2e3352370c3d9853372cf39.1557902321.git.christophe.leroy@c-s.fr> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 15, 2019 at 06:40:47AM +0000, Christophe Leroy wrote: > [Backport of upstream commit b45ba4a51cde29b2939365ef0c07ad34c8321789] > > 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 init_mem_is_free must be accessed with PTRRELOC() > > Fixes: 1c38a84d4586 ("powerpc: Avoid code patching freed init sections") > Link: https://bugzilla.kernel.org/show_bug.cgi?id=203597 > Signed-off-by: Christophe Leroy > > --- > Can't apply the upstream commit as such due to several other unrelated stuff > like for instance STRICT_KERNEL_RWX which are missing. > So instead, using same approach as for commit 252eb55816a6f69ef9464cad303cdb3326cdc61d Now queued up, thanks. greg k-h