Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3955809imu; Tue, 18 Dec 2018 06:56:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/Uyuhljdgfpjxzw6OVyQzMQ2fdDqCg5KyCfngpMInPHzMJAjyOi77poZOqTmtuwdCJeVo3A X-Received: by 2002:a62:2702:: with SMTP id n2mr17332333pfn.29.1545144997136; Tue, 18 Dec 2018 06:56:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545144997; cv=none; d=google.com; s=arc-20160816; b=eY93OIM+WpiC4xbZSBpzulwZNVLNf/0g6iSKwDHXSqlq/E7xpJK0snCqXKtF70kN1r fpe67cY0lNdvWfTfSTdXoshRBVQlMBuiPN8m4bkV+iegwXLOrS8A8zVDb+5EEqyK/ybY R3CrvBKXP242eexCdpW9m5U2Q8HxzeZbv9wSXAcYLDN1GXoPmVO0u6yWVMBFG7M6wJ6R 97c9acC2coQKQi3hb1BhfiH0TLX05ZGFnQptsNBJ2rjwQeyT+xLTWpm8OFKSPj7lrSkZ /WEwnGDuLS0mILjlmqMhWxrgof3RlFpRShO9JI45VTpS/8OVrxxIMheYg/9re9H7eF/F eXWQ== 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=citL2K4voF7pWPp0URe6oIwXdA+DL4bt5FLShwnVDWY=; b=zNMBKgErAoRs12uP1Lm2z/cs9zu1GxmLx6Y2wevPkAdNh5xAkQiGKpg3yH+oj0Bm4y eAeq2tRIUSXetukbdR/fmZUld/smKWsPMuLRc26vYAMch9sYl1rc9BdlaADrUMkG65aM 0kujcXs0yfKgAu8KbbU9t2dQvB/6P5b/wypEnwWWpyTMvRSxDE9L7Rhq50G3Q1Bk5S0k aaw/7yF6+k4MZGf9BWzMuZBwsLbaaTHQhnN0ZxDs7JJWA7lRo6fe6VsInbOEwwFGo/Ya JE2rSnT5BTFciohucJTcpJDwq8JT8eoLDIpaLeVUi6Dd06lwu3YPQbMiAMYcVqMOwucJ Mi9w== 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 o1si12888352plk.257.2018.12.18.06.56.21; Tue, 18 Dec 2018 06:56:37 -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 S1726732AbeLROz3 (ORCPT + 99 others); Tue, 18 Dec 2018 09:55:29 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:49676 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbeLROz2 (ORCPT ); Tue, 18 Dec 2018 09:55:28 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43K1KV0wPXz9v0vZ; Tue, 18 Dec 2018 15:55:26 +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 HAKZSdOcLbiJ; Tue, 18 Dec 2018 15:55:26 +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 43K1KV0PFDz9v0vY; Tue, 18 Dec 2018 15:55:26 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 791C28B849; Tue, 18 Dec 2018 15:55:27 +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 iK2ajVVAcyhI; Tue, 18 Dec 2018 15:55:27 +0100 (CET) Received: from PO15451 (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 052108B848; Tue, 18 Dec 2018 15:55:26 +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> <96539c09-ea57-43d6-bae9-7371235b175f@c-s.fr> From: Christophe Leroy Message-ID: Date: Tue, 18 Dec 2018 15:55:26 +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: <96539c09-ea57-43d6-bae9-7371235b175f@c-s.fr> 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:15, Christophe Leroy a ?crit?: > > > 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 ? Ok, the thing I was thinking about was the MMU_init_hw() but it is called before mapin_ram() so it should not be a problem. Not sure that serie improves anything at all here. So there must be something else, pretty early (before the system is able to properly handle and display an Oops for write to RO area.) Does anybody have an idea of what it can be ? Christophe > > Christophe > >> >> >> Jonathan >>