Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp581033yba; Wed, 15 May 2019 06:32:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyY5+ZY2slu5qJJn9A0FRF3R10gZ4Ha618WVlEwLCsYZkjqRn3YCp5OoJavyREVjIq2S0D X-Received: by 2002:a17:902:6b48:: with SMTP id g8mr42891550plt.318.1557927169372; Wed, 15 May 2019 06:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557927169; cv=none; d=google.com; s=arc-20160816; b=QTcmz7Mn91T5OlVZCOyDu/GWk1tMaxi5VGYfsMpI2rbqZC3fwKhm3UhMTZFjaoq/X0 rGvtUrmZseyXGaOil3Pp7pLVfJqzLRKcnMRpXli4g55Cuh0S11My6WypDs6BXp2I8LlP wcoNbh8Pb6w6q8kf3bKyDXh84D2chjDV3xiupDM0ngCjIxWl7tv4jKYeQCMl1UGq0X1H yzmJ7Ormf/fmWujUbvfFD1V0RTuMDwJo/1tdJ9m7xaTw2j+eOWSw+zEWeifDa2cLJ2Yr Lk0DSKZ/pDlAOZl7Oc2d9fPJCtDTDSOIYtcOhdyKzBri7byANSRozq0Zc1GaU3V+LkB4 pQPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=KQitmtthjuKTf463KvElMEOKYH20lPWCTF0h8ZSiqcY=; b=F3rmhnnRaviVxrUox4dQnqzFs+XNWUB0slIN+VhmECwbCjSIxHTPoMNL9OxoKOcpP1 ca2rlAPbmQx45SAnQP1BdcTeZnMa5mXo4sZuKIanSR+mi/skOB1SFYbkshvTKYnNJT33 laa7Rm0vihX+3hS+mNMRrPcvj/f2+VRJ6uiH6V7dMY0bOEXdfGXePxZZrDseg1VLjjRc RNsQru4DfWrdRKCh29SaP0M7a8Ssnm0kl6mHHxdtUdbEBdanSRd4ADzIKb9HaJTOvftI 3mhBYJWq2k29/Byj3JR1zPbrMnF9VGBvJEiaJHXwX2sr0s+SNrgFpPhvs8ErvridSLMA yO0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=V7GC4L4C; 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 b8si1735028pla.161.2019.05.15.06.32.33; Wed, 15 May 2019 06:32:49 -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=@c-s.fr header.s=mail header.b=V7GC4L4C; 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 S1727566AbfEONbX (ORCPT + 99 others); Wed, 15 May 2019 09:31:23 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:41955 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbfEONbW (ORCPT ); Wed, 15 May 2019 09:31:22 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 453wS71l9Vz9v04S; Wed, 15 May 2019 15:31:19 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=V7GC4L4C; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 11McXCPOjVpO; Wed, 15 May 2019 15:31:19 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 453wS70gZbz9ttBf; Wed, 15 May 2019 15:31:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1557927079; bh=KQitmtthjuKTf463KvElMEOKYH20lPWCTF0h8ZSiqcY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=V7GC4L4CSy3P8iNMnOOfhOihAw0EVxnwShKMdDN7u6Am7h6ReBv2icF0Kct7O6f+d lrD/wS3nbhaQ7pxCAaJ3UdLNQvGWbOOMS9iKikKe9vetT7ovOK5LVWZtAYJf+eqtjv pYd/d4C2Mbm2rBsNEQhu41D+dg2r+w6pjKt80mPY= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7EB0B8B90E; Wed, 15 May 2019 15:31:20 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id d5MnKMJxUo6j; Wed, 15 May 2019 15:31:20 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 444688B90B; Wed, 15 May 2019 15:31:20 +0200 (CEST) Subject: Re: [PATCH stable 4.9] powerpc/lib: fix book3s/32 boot failure due to code patching To: Greg KH 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" References: <629c2acb1fcd09c2d2e3352370c3d9853372cf39.1557902321.git.christophe.leroy@c-s.fr> <20190515082931.GA28349@kroah.com> <9e58348f-da2d-34bc-d016-7817b3566e01@c-s.fr> <20190515130825.GA3794@kroah.com> From: Christophe Leroy Message-ID: <35dceff2-cff9-d237-41aa-1743ec1db5f5@c-s.fr> Date: Wed, 15 May 2019 15:31:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190515130825.GA3794@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 15/05/2019 à 15:08, Greg KH a écrit : > On Wed, May 15, 2019 at 02:35:36PM +0200, Christophe Leroy wrote: >> >> >> Le 15/05/2019 à 10:29, Greg KH a écrit : >>> 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. >>> >> >> Should go to 4.4 as well since the commit it fixes is now queued for 4.4 >> ([PATCH 4.4 056/266] powerpc: Avoid code patching freed init sections) > > Ok, can someone send me a backport that actually applies there? > Done Christophe