Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3912931imu; Tue, 18 Dec 2018 06:17:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/V7WltiNL8Z11lVoXiM21qg1/909tZnSPvzppmVl0wBYCDAbaWU7b1f81ObfTkBM60DZmej X-Received: by 2002:a62:9657:: with SMTP id c84mr17252018pfe.77.1545142636672; Tue, 18 Dec 2018 06:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545142636; cv=none; d=google.com; s=arc-20160816; b=dXpHQpkJBm1lXqJauvixgd681W3XfeEDu7uHrAi71dE+fpDDaZeZR/P2FdLutX6xiT BviKaggk2el70GW4YaQITYRam6hAKZukYSVTqoy7HInijuMk8SOQzaYgIJ0wTOXXgIt2 KQQEn9ycAx7tZou0hVcLMeQqDs5RA9+8y5ck7zmQuTf3R2zPDbEGl5YuY409LN5dYxUJ nxEDfJkfJbQR+OU66bLRHAIOXaOkG5UT+Sevm0WieEB6cTMqiFsd/H2hLKNG+rbuoWMa j3SFC96H/ImSTWbyUXXOdha7mEVKnxkTLahu7WQGH2uL9k3uExw/p5oOadUbbP8vXyg6 hZJw== 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; bh=h/zXN4cN7rHJIxI6XLpTxwJyNJWSypjl6AbiGgdAfgc=; b=r8GiaPu8fMlulTjmGm2uVrqDyLdxZISWOBsYO4KwGLx0jlCeyITS48HobGit6KjHae LR7I10L2GgmWKhL2Ar3VLSZvJ51mThPAN/nG/n1ON65WwnJVWLI6mwd4YnT3IaPszRIZ kghiha5EMqcaUQqtiy1OkVNU/urEpnAjJ3ZYlO3AbIVb8P/Hy7izG+GbvMsoBpoqO6tb wG+OgNh62wu95gy2b319fc5z31ddavDrH+VaO5iIAkT5XBoRW9SS5rfcB+V2PW2LF9zY ahzeGN0LmeXyMIPAIvT6zjq6JpHCHuLo8iDlNSCqjiin7CB7xCJT+6GmM9ng69bJ6aHk m0rA== ARC-Authentication-Results: i=1; mx.google.com; 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 11si14206667pgd.228.2018.12.18.06.17.01; Tue, 18 Dec 2018 06:17:16 -0800 (PST) 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; 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 S1726972AbeLROPw (ORCPT + 99 others); Tue, 18 Dec 2018 09:15:52 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:38311 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbeLROPw (ORCPT ); Tue, 18 Dec 2018 09:15:52 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43K0Rm3VDSz9v0vr; Tue, 18 Dec 2018 15:15:48 +0100 (CET) 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 t1GGRo66-idq; Tue, 18 Dec 2018 15:15:48 +0100 (CET) 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 43K0Rm2vZzz9v0vn; Tue, 18 Dec 2018 15:15:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C37648B846; Tue, 18 Dec 2018 15:15:49 +0100 (CET) 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 cT9b3zd0-lvt; Tue, 18 Dec 2018 15:15:49 +0100 (CET) Received: from PO15451 (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 63C588B754; Tue, 18 Dec 2018 15:15:49 +0100 (CET) Subject: Re: [PATCH v1 03/13] powerpc/mm/32s: rework mmu_mapin_ram() To: =?UTF-8?Q?Jonathan_Neusch=c3=a4fer?= Cc: linuxppc-dev@lists.ozlabs.org, Paul Mackerras , linux-kernel@vger.kernel.org References: <8835330baa77d88e0267b0b1215b78c991e6d17a.1543517818.git.christophe.leroy@c-s.fr> <20181203215558.GK15324@latitude> <84624899-bbda-9f08-2527-151fddbd1b01@c-s.fr> <20181217012837.GT15324@latitude> <18ba3a7c-ebfa-66aa-e231-b56985d0e89a@c-s.fr> <20181218030538.GA24278@latitude> <9a39d910-2a05-3ce7-c949-296db2d458b9@c-s.fr> <20181218140714.GC24278@latitude> From: Christophe Leroy Message-ID: <96539c09-ea57-43d6-bae9-7371235b175f@c-s.fr> Date: Tue, 18 Dec 2018 15:15:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20181218140714.GC24278@latitude> Content-Type: text/plain; charset=windows-1252; 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 18/12/2018 ? 15:07, Jonathan Neusch?fer a ?crit?: > On Tue, Dec 18, 2018 at 09:18:42AM +0000, Christophe Leroy wrote: >> The only difference I see then are the flags. Everything else is seems >> identical. >> >> I know you tried already, but would you mind trying once more with the >> following change ? >> > [...] >> - setbat(idx, PAGE_OFFSET + base, base, size, PAGE_KERNEL_TEXT); >> + setbat(idx, PAGE_OFFSET + base, base, size, PAGE_KERNEL_X); > > Good call, with this workaround on top of patches 1-3, it boots again: > > # mount -t debugfs d /sys/kernel/debug > # cat /sys/kernel/debug/powerpc/block_address_translation > ---[ Instruction Block Address Translation ]--- > 0: 0xc0000000-0xc0ffffff 0x00000000 Kernel EXEC > 1: - > 2: 0xc1000000-0xc17fffff 0x01000000 Kernel EXEC > 3: - > 4: 0xd0000000-0xd1ffffff 0x10000000 Kernel EXEC > 5: - > 6: - > 7: - > > ---[ Data Block Address Translation ]--- > 0: 0xc0000000-0xc0ffffff 0x00000000 Kernel RW > 1: 0xfffe0000-0xffffffff 0x0d000000 Kernel RW no cache guarded > 2: 0xc1000000-0xc17fffff 0x01000000 Kernel RW > 3: - > 4: 0xd0000000-0xd1ffffff 0x10000000 Kernel RW > 5: - > 6: - > 7: - > >> I think we may have some code trying to modify the kernel text without using >> code patching functions. > > Is there any faster way than to sprinkle some printks in setup_kernel > and try to find the guilty piece of code this way? Can you start with the serie https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=75072 ? Christophe > > > Jonathan >