From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Date: Thu, 07 May 2020 16:11:55 +0000 Subject: Re: [PATCH v4 02/14] arm: add support for folded p4d page tables Message-Id: <20200507161155.GE683243@linux.ibm.com> List-Id: References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-3-rppt@kernel.org> <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> In-Reply-To: <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Marek Szyprowski Cc: Rich Felker , linux-ia64@vger.kernel.org, Geert Uytterhoeven , Fenghua Yu , Benjamin Herrenschmidt , linux-mm@kvack.org, Paul Mackerras , Michael Ellerman , Will Deacon , kvmarm@lists.cs.columbia.edu, Jonas Bonn , Brian Cain , linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Ley Foon Tan , Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-arch@vger.kernel.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , =?utf-8?Q?=C5=81ukasz?= Stelmach , kvm-ppc@vger.kernel.org, Stefan Kristiansson , openrisc@lists.librecores.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Tony Luck , Yoshinori Sato , linux-kernel@vger.kernel.org, Marc Zyngier , nios2-dev@lists.rocketboards.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, Mike Rapoport Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi >=20 > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of = p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > > > Signed-off-by: Mike Rapoport >=20 > Today I've noticed that kexec is broken on ARM 32bit. Bisecting between=20 > current linux-next and v5.7-rc1 pointed to this commit. I've tested this = > on Odroid XU4 and Raspberry Pi4 boards. Here is the relevant log: >=20 > # kexec --kexec-syscall -l zImage --append "$(cat /proc/cmdline)" > memory_range[0]:0x40000000..0xbe9fffff > memory_range[0]:0x40000000..0xbe9fffff > # kexec -e > kexec_core: Starting new kernel > 8<--- cut here --- > Unable to handle kernel paging request at virtual address c010f1f4 > pgd =3D c6817793 > [c010f1f4] *pgd@00041e(bad) > Internal error: Oops: 80d [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1329 Comm: kexec Tainted: G=A0=A0=A0=A0=A0=A0=A0 W=20 > 5.7.0-rc3-00127-g6cba81ed0f62 #611 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at machine_kexec+0x40/0xfc Any chance you have the debug info in this kernel? scripts/faddr2line would come handy here. > LR is at 0xffffffff > pc : []=A0=A0=A0 lr : []=A0=A0=A0 psr: 60000013 > sp : ebc13e60=A0 ip : 40008000=A0 fp : 00000001 > r10: 00000058=A0 r9 : fee1dead=A0 r8 : 00000001 > r7 : c121387c=A0 r6 : 6c224000=A0 r5 : ece40c00=A0 r4 : ec222000 > r3 : c010f1f4=A0 r2 : c1100000=A0 r1 : c1100000=A0 r0 : 418d0000 > Flags: nZCv=A0 IRQs on=A0 FIQs on=A0 Mode SVC_32=A0 ISA ARM=A0 Segment no= ne > Control: 10c5387d=A0 Table: 6bc14059=A0 DAC: 00000051 > Process kexec (pid: 1329, stack limit =3D 0x366bb4dc) > Stack: (0xebc13e60 to 0xebc14000) > ... > [] (machine_kexec) from [] (kernel_kexec+0x74/0x7c) > [] (kernel_kexec) from [] (__do_sys_reboot+0x1f8/0x21= 0) > [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x= 28) > Exception stack(0xebc13fa8 to 0xebc13ff0) > ... > ---[ end trace 3e8d6c81723c778d ]--- > 1329 Segmentation fault=A0=A0=A0=A0=A0 ./kexec -e >=20 > > --- > > arch/arm/include/asm/pgtable.h | 1 - > > arch/arm/lib/uaccess_with_memcpy.c | 7 +++++- > > arch/arm/mach-sa1100/assabet.c | 2 +- > > arch/arm/mm/dump.c | 29 +++++++++++++++++----- > > arch/arm/mm/fault-armv.c | 7 +++++- > > arch/arm/mm/fault.c | 22 ++++++++++------ > > arch/arm/mm/idmap.c | 3 ++- > > arch/arm/mm/init.c | 2 +- > > arch/arm/mm/ioremap.c | 12 ++++++--- > > arch/arm/mm/mm.h | 2 +- > > arch/arm/mm/mmu.c | 35 +++++++++++++++++++++----- > > arch/arm/mm/pgd.c | 40 ++++++++++++++++++++++++------ > > 12 files changed, 125 insertions(+), 37 deletions(-) > > > > ... >=20 > Best regards > --=20 > Marek Szyprowski, PhD > Samsung R&D Institute Poland >=20 --=20 Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBDBCC38A2A for ; Thu, 7 May 2020 16:13:10 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 722CD2083B for ; Thu, 7 May 2020 16:13:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 722CD2083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A66D64B382; Thu, 7 May 2020 12:13:09 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pgJsW5qXn5JY; Thu, 7 May 2020 12:13:08 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9A0B54B1E7; Thu, 7 May 2020 12:13:08 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A623A4B1E3 for ; Thu, 7 May 2020 12:13:07 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CypLLnfTAbXF for ; Thu, 7 May 2020 12:13:06 -0400 (EDT) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 8AB864B1C2 for ; Thu, 7 May 2020 12:13:06 -0400 (EDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047G4OvV160549; Thu, 7 May 2020 12:12:41 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:41 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 047G5fk6165277; Thu, 7 May 2020 12:12:40 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:40 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047G9kSs025490; Thu, 7 May 2020 16:12:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 30s0g5unrs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:12:37 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047GCZYR1048834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 16:12:35 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA52442041; Thu, 7 May 2020 16:12:35 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DFA142047; Thu, 7 May 2020 16:12:21 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.201.211]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 May 2020 16:12:20 +0000 (GMT) Date: Thu, 7 May 2020 19:11:55 +0300 From: Mike Rapoport To: Marek Szyprowski Subject: Re: [PATCH v4 02/14] arm: add support for folded p4d page tables Message-ID: <20200507161155.GE683243@linux.ibm.com> References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-3-rppt@kernel.org> <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-07_10:2020-05-07, 2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=1 malwarescore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070125 Cc: Rich Felker , linux-ia64@vger.kernel.org, Geert Uytterhoeven , Fenghua Yu , Benjamin Herrenschmidt , linux-mm@kvack.org, Paul Mackerras , Michael Ellerman , Will Deacon , kvmarm@lists.cs.columbia.edu, Jonas Bonn , Brian Cain , linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Ley Foon Tan , Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-arch@vger.kernel.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , =?utf-8?Q?=C5=81ukasz?= Stelmach , kvm-ppc@vger.kernel.org, Stefan Kristiansson , openrisc@lists.librecores.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Tony Luck , Yoshinori Sato , linux-kernel@vger.kernel.org, Marc Zyngier , nios2-dev@lists.rocketboards.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, Mike Rapoport X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi > = > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of = p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > > > Signed-off-by: Mike Rapoport > = > Today I've noticed that kexec is broken on ARM 32bit. Bisecting between = > current linux-next and v5.7-rc1 pointed to this commit. I've tested this = > on Odroid XU4 and Raspberry Pi4 boards. Here is the relevant log: > = > # kexec --kexec-syscall -l zImage --append "$(cat /proc/cmdline)" > memory_range[0]:0x40000000..0xbe9fffff > memory_range[0]:0x40000000..0xbe9fffff > # kexec -e > kexec_core: Starting new kernel > 8<--- cut here --- > Unable to handle kernel paging request at virtual address c010f1f4 > pgd =3D c6817793 > [c010f1f4] *pgd=3D4000041e(bad) > Internal error: Oops: 80d [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1329 Comm: kexec Tainted: G=A0=A0=A0=A0=A0=A0=A0 W = > 5.7.0-rc3-00127-g6cba81ed0f62 #611 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at machine_kexec+0x40/0xfc Any chance you have the debug info in this kernel? scripts/faddr2line would come handy here. > LR is at 0xffffffff > pc : []=A0=A0=A0 lr : []=A0=A0=A0 psr: 60000013 > sp : ebc13e60=A0 ip : 40008000=A0 fp : 00000001 > r10: 00000058=A0 r9 : fee1dead=A0 r8 : 00000001 > r7 : c121387c=A0 r6 : 6c224000=A0 r5 : ece40c00=A0 r4 : ec222000 > r3 : c010f1f4=A0 r2 : c1100000=A0 r1 : c1100000=A0 r0 : 418d0000 > Flags: nZCv=A0 IRQs on=A0 FIQs on=A0 Mode SVC_32=A0 ISA ARM=A0 Segment no= ne > Control: 10c5387d=A0 Table: 6bc14059=A0 DAC: 00000051 > Process kexec (pid: 1329, stack limit =3D 0x366bb4dc) > Stack: (0xebc13e60 to 0xebc14000) > ... > [] (machine_kexec) from [] (kernel_kexec+0x74/0x7c) > [] (kernel_kexec) from [] (__do_sys_reboot+0x1f8/0x21= 0) > [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x= 28) > Exception stack(0xebc13fa8 to 0xebc13ff0) > ... > ---[ end trace 3e8d6c81723c778d ]--- > 1329 Segmentation fault=A0=A0=A0=A0=A0 ./kexec -e > = > > --- > > arch/arm/include/asm/pgtable.h | 1 - > > arch/arm/lib/uaccess_with_memcpy.c | 7 +++++- > > arch/arm/mach-sa1100/assabet.c | 2 +- > > arch/arm/mm/dump.c | 29 +++++++++++++++++----- > > arch/arm/mm/fault-armv.c | 7 +++++- > > arch/arm/mm/fault.c | 22 ++++++++++------ > > arch/arm/mm/idmap.c | 3 ++- > > arch/arm/mm/init.c | 2 +- > > arch/arm/mm/ioremap.c | 12 ++++++--- > > arch/arm/mm/mm.h | 2 +- > > arch/arm/mm/mmu.c | 35 +++++++++++++++++++++----- > > arch/arm/mm/pgd.c | 40 ++++++++++++++++++++++++------ > > 12 files changed, 125 insertions(+), 37 deletions(-) > > > > ... > = > Best regards > -- = > Marek Szyprowski, PhD > Samsung R&D Institute Poland > = -- = Sincerely yours, Mike. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Subject: Re: [PATCH v4 02/14] arm: add support for folded p4d page tables Date: Thu, 7 May 2020 19:11:55 +0300 Message-ID: <20200507161155.GE683243@linux.ibm.com> References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-3-rppt@kernel.org> <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: Marek Szyprowski Cc: Rich Felker , linux-ia64@vger.kernel.org, Geert Uytterhoeven , Fenghua Yu , Benjamin Herrenschmidt , linux-mm@kvack.org, Paul Mackerras , Michael Ellerman , Will Deacon , kvmarm@lists.cs.columbia.edu, Jonas Bonn , Brian Cain , linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Ley Foon Tan , Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-arch@vger.kernel.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , =?utf-8?Q?=C5=81ukasz?= Stelmach , kvm-ppc@vger.kernel.org, Stefan Kristiansson List-Id: linux-arch.vger.kernel.org Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi > = > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of = p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > > > Signed-off-by: Mike Rapoport > = > Today I've noticed that kexec is broken on ARM 32bit. Bisecting between = > current linux-next and v5.7-rc1 pointed to this commit. I've tested this = > on Odroid XU4 and Raspberry Pi4 boards. Here is the relevant log: > = > # kexec --kexec-syscall -l zImage --append "$(cat /proc/cmdline)" > memory_range[0]:0x40000000..0xbe9fffff > memory_range[0]:0x40000000..0xbe9fffff > # kexec -e > kexec_core: Starting new kernel > 8<--- cut here --- > Unable to handle kernel paging request at virtual address c010f1f4 > pgd =3D c6817793 > [c010f1f4] *pgd=3D4000041e(bad) > Internal error: Oops: 80d [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1329 Comm: kexec Tainted: G=A0=A0=A0=A0=A0=A0=A0 W = > 5.7.0-rc3-00127-g6cba81ed0f62 #611 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at machine_kexec+0x40/0xfc Any chance you have the debug info in this kernel? scripts/faddr2line would come handy here. > LR is at 0xffffffff > pc : []=A0=A0=A0 lr : []=A0=A0=A0 psr: 60000013 > sp : ebc13e60=A0 ip : 40008000=A0 fp : 00000001 > r10: 00000058=A0 r9 : fee1dead=A0 r8 : 00000001 > r7 : c121387c=A0 r6 : 6c224000=A0 r5 : ece40c00=A0 r4 : ec222000 > r3 : c010f1f4=A0 r2 : c1100000=A0 r1 : c1100000=A0 r0 : 418d0000 > Flags: nZCv=A0 IRQs on=A0 FIQs on=A0 Mode SVC_32=A0 ISA ARM=A0 Segment no= ne > Control: 10c5387d=A0 Table: 6bc14059=A0 DAC: 00000051 > Process kexec (pid: 1329, stack limit =3D 0x366bb4dc) > Stack: (0xebc13e60 to 0xebc14000) > ... > [] (machine_kexec) from [] (kernel_kexec+0x74/0x7c) > [] (kernel_kexec) from [] (__do_sys_reboot+0x1f8/0x21= 0) > [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x= 28) > Exception stack(0xebc13fa8 to 0xebc13ff0) > ... > ---[ end trace 3e8d6c81723c778d ]--- > 1329 Segmentation fault=A0=A0=A0=A0=A0 ./kexec -e > = > > --- > > arch/arm/include/asm/pgtable.h | 1 - > > arch/arm/lib/uaccess_with_memcpy.c | 7 +++++- > > arch/arm/mach-sa1100/assabet.c | 2 +- > > arch/arm/mm/dump.c | 29 +++++++++++++++++----- > > arch/arm/mm/fault-armv.c | 7 +++++- > > arch/arm/mm/fault.c | 22 ++++++++++------ > > arch/arm/mm/idmap.c | 3 ++- > > arch/arm/mm/init.c | 2 +- > > arch/arm/mm/ioremap.c | 12 ++++++--- > > arch/arm/mm/mm.h | 2 +- > > arch/arm/mm/mmu.c | 35 +++++++++++++++++++++----- > > arch/arm/mm/pgd.c | 40 ++++++++++++++++++++++++------ > > 12 files changed, 125 insertions(+), 37 deletions(-) > > > > ... > = > Best regards > -- = > Marek Szyprowski, PhD > Samsung R&D Institute Poland > = -- = Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Rapoport Date: Thu, 7 May 2020 19:11:55 +0300 Subject: [OpenRISC] [PATCH v4 02/14] arm: add support for folded p4d page tables In-Reply-To: <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-3-rppt@kernel.org> <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> Message-ID: <20200507161155.GE683243@linux.ibm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openrisc@lists.librecores.org Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi > > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > > > Signed-off-by: Mike Rapoport > > Today I've noticed that kexec is broken on ARM 32bit. Bisecting between > current linux-next and v5.7-rc1 pointed to this commit. I've tested this > on Odroid XU4 and Raspberry Pi4 boards. Here is the relevant log: > > # kexec --kexec-syscall -l zImage --append "$(cat /proc/cmdline)" > memory_range[0]:0x40000000..0xbe9fffff > memory_range[0]:0x40000000..0xbe9fffff > # kexec -e > kexec_core: Starting new kernel > 8<--- cut here --- > Unable to handle kernel paging request at virtual address c010f1f4 > pgd = c6817793 > [c010f1f4] *pgd=4000041e(bad) > Internal error: Oops: 80d [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1329 Comm: kexec Tainted: G        W > 5.7.0-rc3-00127-g6cba81ed0f62 #611 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at machine_kexec+0x40/0xfc Any chance you have the debug info in this kernel? scripts/faddr2line would come handy here. > LR is at 0xffffffff > pc : []    lr : []    psr: 60000013 > sp : ebc13e60  ip : 40008000  fp : 00000001 > r10: 00000058  r9 : fee1dead  r8 : 00000001 > r7 : c121387c  r6 : 6c224000  r5 : ece40c00  r4 : ec222000 > r3 : c010f1f4  r2 : c1100000  r1 : c1100000  r0 : 418d0000 > Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none > Control: 10c5387d  Table: 6bc14059  DAC: 00000051 > Process kexec (pid: 1329, stack limit = 0x366bb4dc) > Stack: (0xebc13e60 to 0xebc14000) > ... > [] (machine_kexec) from [] (kernel_kexec+0x74/0x7c) > [] (kernel_kexec) from [] (__do_sys_reboot+0x1f8/0x210) > [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x28) > Exception stack(0xebc13fa8 to 0xebc13ff0) > ... > ---[ end trace 3e8d6c81723c778d ]--- > 1329 Segmentation fault      ./kexec -e > > > --- > > arch/arm/include/asm/pgtable.h | 1 - > > arch/arm/lib/uaccess_with_memcpy.c | 7 +++++- > > arch/arm/mach-sa1100/assabet.c | 2 +- > > arch/arm/mm/dump.c | 29 +++++++++++++++++----- > > arch/arm/mm/fault-armv.c | 7 +++++- > > arch/arm/mm/fault.c | 22 ++++++++++------ > > arch/arm/mm/idmap.c | 3 ++- > > arch/arm/mm/init.c | 2 +- > > arch/arm/mm/ioremap.c | 12 ++++++--- > > arch/arm/mm/mm.h | 2 +- > > arch/arm/mm/mmu.c | 35 +++++++++++++++++++++----- > > arch/arm/mm/pgd.c | 40 ++++++++++++++++++++++++------ > > 12 files changed, 125 insertions(+), 37 deletions(-) > > > > ... > > Best regards > -- > Marek Szyprowski, PhD > Samsung R&D Institute Poland > -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1A9DC38A24 for ; Thu, 7 May 2020 17:03:04 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 66114207DD for ; Thu, 7 May 2020 17:03:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66114207DD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49J0CB0lfqzDqsG for ; Fri, 8 May 2020 03:03:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=rppt@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49Hz5w1Z0nzDqgs for ; Fri, 8 May 2020 02:13:23 +1000 (AEST) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047G4OvV160549; Thu, 7 May 2020 12:12:41 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:41 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 047G5fk6165277; Thu, 7 May 2020 12:12:40 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:40 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047G9kSs025490; Thu, 7 May 2020 16:12:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 30s0g5unrs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:12:37 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047GCZYR1048834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 16:12:35 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA52442041; Thu, 7 May 2020 16:12:35 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DFA142047; Thu, 7 May 2020 16:12:21 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.201.211]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 May 2020 16:12:20 +0000 (GMT) Date: Thu, 7 May 2020 19:11:55 +0300 From: Mike Rapoport To: Marek Szyprowski Subject: Re: [PATCH v4 02/14] arm: add support for folded p4d page tables Message-ID: <20200507161155.GE683243@linux.ibm.com> References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-3-rppt@kernel.org> <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-07_10:2020-05-07, 2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=1 malwarescore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070125 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , linux-ia64@vger.kernel.org, Geert Uytterhoeven , Fenghua Yu , linux-mm@kvack.org, Paul Mackerras , Will Deacon , kvmarm@lists.cs.columbia.edu, Jonas Bonn , Brian Cain , linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Ley Foon Tan , Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-arch@vger.kernel.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , =?utf-8?Q?=C5=81ukasz?= Stelmach , kvm-ppc@vger.kernel.org, Stefan Kristiansson , openrisc@lists.librecores.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Tony Luck , Yoshinori Sato , linux-kernel@vger.kernel.org, Marc Zyngier , nios2-dev@lists.rocketboards.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, Mike Rapoport Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi > > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > > > Signed-off-by: Mike Rapoport > > Today I've noticed that kexec is broken on ARM 32bit. Bisecting between > current linux-next and v5.7-rc1 pointed to this commit. I've tested this > on Odroid XU4 and Raspberry Pi4 boards. Here is the relevant log: > > # kexec --kexec-syscall -l zImage --append "$(cat /proc/cmdline)" > memory_range[0]:0x40000000..0xbe9fffff > memory_range[0]:0x40000000..0xbe9fffff > # kexec -e > kexec_core: Starting new kernel > 8<--- cut here --- > Unable to handle kernel paging request at virtual address c010f1f4 > pgd = c6817793 > [c010f1f4] *pgd=4000041e(bad) > Internal error: Oops: 80d [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1329 Comm: kexec Tainted: G        W > 5.7.0-rc3-00127-g6cba81ed0f62 #611 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at machine_kexec+0x40/0xfc Any chance you have the debug info in this kernel? scripts/faddr2line would come handy here. > LR is at 0xffffffff > pc : []    lr : []    psr: 60000013 > sp : ebc13e60  ip : 40008000  fp : 00000001 > r10: 00000058  r9 : fee1dead  r8 : 00000001 > r7 : c121387c  r6 : 6c224000  r5 : ece40c00  r4 : ec222000 > r3 : c010f1f4  r2 : c1100000  r1 : c1100000  r0 : 418d0000 > Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none > Control: 10c5387d  Table: 6bc14059  DAC: 00000051 > Process kexec (pid: 1329, stack limit = 0x366bb4dc) > Stack: (0xebc13e60 to 0xebc14000) > ... > [] (machine_kexec) from [] (kernel_kexec+0x74/0x7c) > [] (kernel_kexec) from [] (__do_sys_reboot+0x1f8/0x210) > [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x28) > Exception stack(0xebc13fa8 to 0xebc13ff0) > ... > ---[ end trace 3e8d6c81723c778d ]--- > 1329 Segmentation fault      ./kexec -e > > > --- > > arch/arm/include/asm/pgtable.h | 1 - > > arch/arm/lib/uaccess_with_memcpy.c | 7 +++++- > > arch/arm/mach-sa1100/assabet.c | 2 +- > > arch/arm/mm/dump.c | 29 +++++++++++++++++----- > > arch/arm/mm/fault-armv.c | 7 +++++- > > arch/arm/mm/fault.c | 22 ++++++++++------ > > arch/arm/mm/idmap.c | 3 ++- > > arch/arm/mm/init.c | 2 +- > > arch/arm/mm/ioremap.c | 12 ++++++--- > > arch/arm/mm/mm.h | 2 +- > > arch/arm/mm/mmu.c | 35 +++++++++++++++++++++----- > > arch/arm/mm/pgd.c | 40 ++++++++++++++++++++++++------ > > 12 files changed, 125 insertions(+), 37 deletions(-) > > > > ... > > Best regards > -- > Marek Szyprowski, PhD > Samsung R&D Institute Poland > -- Sincerely yours, Mike. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BAD3C38A24 for ; Thu, 7 May 2020 16:13:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B173A2083B for ; Thu, 7 May 2020 16:13:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mQgQcCQ5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B173A2083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sKdrDnqYGQa7Ol09bCxFu2g1VQ7PqsiLnvgc5g1ynS0=; b=mQgQcCQ5yfgf0Y N6qjqwP8MjxUSjGeb6IZAgOOuc8oucHiC463fWH+F+ctlHZfOALKGFMRM6lY3P1CsHFj0McunUkkw N0BCIXYUJ5f5hUUj5xnCmDybXSuNugh4l66AVIOHYYJyGsHMyUPiDiL3PlXQYsNYufV90PPOYS+1e qlUQCTMehlJDt+ZENSN0dG8Uu8Sh4+0rLa7fMNd/mh/udRR/h+OB8i7eCAqwOw8nus+IUIJ/JrzXb /ylGBfdCi/NN4tfQ6MS63Hkwx19XCaCU1X+BrfPxEFAg8JPbiQKkHgO2pSBB6dWCntr0lGvyZGleO d2CPTmmaBqWgskZnVEHA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWj95-0006bn-Oa; Thu, 07 May 2020 16:13:11 +0000 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWj91-0006an-Qf for linux-arm-kernel@lists.infradead.org; Thu, 07 May 2020 16:13:09 +0000 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047G4OvV160549; Thu, 7 May 2020 12:12:41 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:41 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 047G5fk6165277; Thu, 7 May 2020 12:12:40 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:40 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047G9kSs025490; Thu, 7 May 2020 16:12:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 30s0g5unrs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:12:37 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047GCZYR1048834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 16:12:35 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA52442041; Thu, 7 May 2020 16:12:35 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DFA142047; Thu, 7 May 2020 16:12:21 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.201.211]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 May 2020 16:12:20 +0000 (GMT) Date: Thu, 7 May 2020 19:11:55 +0300 From: Mike Rapoport To: Marek Szyprowski Subject: Re: [PATCH v4 02/14] arm: add support for folded p4d page tables Message-ID: <20200507161155.GE683243@linux.ibm.com> References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-3-rppt@kernel.org> <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216, 18.0.676 definitions=2020-05-07_10:2020-05-07, 2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=1 malwarescore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070125 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200507_091307_982574_9B687371 X-CRM114-Status: GOOD ( 21.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , linux-ia64@vger.kernel.org, Geert Uytterhoeven , Fenghua Yu , Benjamin Herrenschmidt , linux-mm@kvack.org, Paul Mackerras , Michael Ellerman , Will Deacon , kvmarm@lists.cs.columbia.edu, Jonas Bonn , Brian Cain , linux-hexagon@vger.kernel.org, linux-sh@vger.kernel.org, Russell King , Ley Foon Tan , Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, linux-arch@vger.kernel.org, Arnd Bergmann , Bartlomiej Zolnierkiewicz , =?utf-8?Q?=C5=81ukasz?= Stelmach , kvm-ppc@vger.kernel.org, Stefan Kristiansson , openrisc@lists.librecores.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Tony Luck , Yoshinori Sato , linux-kernel@vger.kernel.org, Marc Zyngier , nios2-dev@lists.rocketboards.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org, Mike Rapoport Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi > = > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks of = p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > > > Signed-off-by: Mike Rapoport > = > Today I've noticed that kexec is broken on ARM 32bit. Bisecting between = > current linux-next and v5.7-rc1 pointed to this commit. I've tested this = > on Odroid XU4 and Raspberry Pi4 boards. Here is the relevant log: > = > # kexec --kexec-syscall -l zImage --append "$(cat /proc/cmdline)" > memory_range[0]:0x40000000..0xbe9fffff > memory_range[0]:0x40000000..0xbe9fffff > # kexec -e > kexec_core: Starting new kernel > 8<--- cut here --- > Unable to handle kernel paging request at virtual address c010f1f4 > pgd =3D c6817793 > [c010f1f4] *pgd=3D4000041e(bad) > Internal error: Oops: 80d [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1329 Comm: kexec Tainted: G=A0=A0=A0=A0=A0=A0=A0 W = > 5.7.0-rc3-00127-g6cba81ed0f62 #611 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at machine_kexec+0x40/0xfc Any chance you have the debug info in this kernel? scripts/faddr2line would come handy here. > LR is at 0xffffffff > pc : []=A0=A0=A0 lr : []=A0=A0=A0 psr: 60000013 > sp : ebc13e60=A0 ip : 40008000=A0 fp : 00000001 > r10: 00000058=A0 r9 : fee1dead=A0 r8 : 00000001 > r7 : c121387c=A0 r6 : 6c224000=A0 r5 : ece40c00=A0 r4 : ec222000 > r3 : c010f1f4=A0 r2 : c1100000=A0 r1 : c1100000=A0 r0 : 418d0000 > Flags: nZCv=A0 IRQs on=A0 FIQs on=A0 Mode SVC_32=A0 ISA ARM=A0 Segment no= ne > Control: 10c5387d=A0 Table: 6bc14059=A0 DAC: 00000051 > Process kexec (pid: 1329, stack limit =3D 0x366bb4dc) > Stack: (0xebc13e60 to 0xebc14000) > ... > [] (machine_kexec) from [] (kernel_kexec+0x74/0x7c) > [] (kernel_kexec) from [] (__do_sys_reboot+0x1f8/0x21= 0) > [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x= 28) > Exception stack(0xebc13fa8 to 0xebc13ff0) > ... > ---[ end trace 3e8d6c81723c778d ]--- > 1329 Segmentation fault=A0=A0=A0=A0=A0 ./kexec -e > = > > --- > > arch/arm/include/asm/pgtable.h | 1 - > > arch/arm/lib/uaccess_with_memcpy.c | 7 +++++- > > arch/arm/mach-sa1100/assabet.c | 2 +- > > arch/arm/mm/dump.c | 29 +++++++++++++++++----- > > arch/arm/mm/fault-armv.c | 7 +++++- > > arch/arm/mm/fault.c | 22 ++++++++++------ > > arch/arm/mm/idmap.c | 3 ++- > > arch/arm/mm/init.c | 2 +- > > arch/arm/mm/ioremap.c | 12 ++++++--- > > arch/arm/mm/mm.h | 2 +- > > arch/arm/mm/mmu.c | 35 +++++++++++++++++++++----- > > arch/arm/mm/pgd.c | 40 ++++++++++++++++++++++++------ > > 12 files changed, 125 insertions(+), 37 deletions(-) > > > > ... > = > Best regards > -- = > Marek Szyprowski, PhD > Samsung R&D Institute Poland > = -- = Sincerely yours, Mike. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DD2BC38A24 for ; Thu, 7 May 2020 16:13:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4CC552083B for ; Thu, 7 May 2020 16:13:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CC552083B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DEA29900004; Thu, 7 May 2020 12:13:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D9C16900002; Thu, 7 May 2020 12:13:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8AC2900004; Thu, 7 May 2020 12:13:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0094.hostedemail.com [216.40.44.94]) by kanga.kvack.org (Postfix) with ESMTP id B3230900002 for ; Thu, 7 May 2020 12:13:04 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 72081180ACF7F for ; Thu, 7 May 2020 16:13:04 +0000 (UTC) X-FDA: 76790417088.01.crown59_8f2abad4e5f33 X-HE-Tag: crown59_8f2abad4e5f33 X-Filterd-Recvd-Size: 8075 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 May 2020 16:13:03 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 047G4OvV160549; Thu, 7 May 2020 12:12:41 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc3d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:41 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 047G5fk6165277; Thu, 7 May 2020 12:12:40 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 30vmp6jc2g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 12:12:40 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 047G9kSs025490; Thu, 7 May 2020 16:12:38 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04ams.nl.ibm.com with ESMTP id 30s0g5unrs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 May 2020 16:12:37 +0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 047GCZYR1048834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 May 2020 16:12:35 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BA52442041; Thu, 7 May 2020 16:12:35 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2DFA142047; Thu, 7 May 2020 16:12:21 +0000 (GMT) Received: from linux.ibm.com (unknown [9.148.201.211]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 7 May 2020 16:12:20 +0000 (GMT) Date: Thu, 7 May 2020 19:11:55 +0300 From: Mike Rapoport To: Marek Szyprowski Cc: Mike Rapoport , Andrew Morton , Rich Felker , linux-ia64@vger.kernel.org, Geert Uytterhoeven , linux-sh@vger.kernel.org, Benjamin Herrenschmidt , linux-mm@kvack.org, Paul Mackerras , linux-hexagon@vger.kernel.org, Will Deacon , kvmarm@lists.cs.columbia.edu, Jonas Bonn , linux-arch@vger.kernel.org, Brian Cain , Marc Zyngier , Russell King , Ley Foon Tan , Catalin Marinas , uclinux-h8-devel@lists.sourceforge.jp, Fenghua Yu , Arnd Bergmann , kvm-ppc@vger.kernel.org, Stefan Kristiansson , openrisc@lists.librecores.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Christophe Leroy , Tony Luck , Yoshinori Sato , linux-kernel@vger.kernel.org, Michael Ellerman , nios2-dev@lists.rocketboards.org, linuxppc-dev@lists.ozlabs.org, =?utf-8?Q?=C5=81ukasz?= Stelmach , Bartlomiej Zolnierkiewicz Subject: Re: [PATCH v4 02/14] arm: add support for folded p4d page tables Message-ID: <20200507161155.GE683243@linux.ibm.com> References: <20200414153455.21744-1-rppt@kernel.org> <20200414153455.21744-3-rppt@kernel.org> <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <39ba8a04-d6b5-649d-c289-0c8b27cb66c5@samsung.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-07_10:2020-05-07,2020-05-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 priorityscore=1501 suspectscore=1 malwarescore=0 impostorscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005070125 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > Hi >=20 > On 14.04.2020 17:34, Mike Rapoport wrote: > > From: Mike Rapoport > > > > Implement primitives necessary for the 4th level folding, add walks o= f p4d > > level where appropriate, and remove __ARCH_USE_5LEVEL_HACK. > > > > Signed-off-by: Mike Rapoport >=20 > Today I've noticed that kexec is broken on ARM 32bit. Bisecting between= =20 > current linux-next and v5.7-rc1 pointed to this commit. I've tested thi= s=20 > on Odroid XU4 and Raspberry Pi4 boards. Here is the relevant log: >=20 > # kexec --kexec-syscall -l zImage --append "$(cat /proc/cmdline)" > memory_range[0]:0x40000000..0xbe9fffff > memory_range[0]:0x40000000..0xbe9fffff > # kexec -e > kexec_core: Starting new kernel > 8<--- cut here --- > Unable to handle kernel paging request at virtual address c010f1f4 > pgd =3D c6817793 > [c010f1f4] *pgd=3D4000041e(bad) > Internal error: Oops: 80d [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1329 Comm: kexec Tainted: G=A0=A0=A0=A0=A0=A0=A0 W=20 > 5.7.0-rc3-00127-g6cba81ed0f62 #611 > Hardware name: Samsung Exynos (Flattened Device Tree) > PC is at machine_kexec+0x40/0xfc Any chance you have the debug info in this kernel? scripts/faddr2line would come handy here. > LR is at 0xffffffff > pc : []=A0=A0=A0 lr : []=A0=A0=A0 psr: 60000013 > sp : ebc13e60=A0 ip : 40008000=A0 fp : 00000001 > r10: 00000058=A0 r9 : fee1dead=A0 r8 : 00000001 > r7 : c121387c=A0 r6 : 6c224000=A0 r5 : ece40c00=A0 r4 : ec222000 > r3 : c010f1f4=A0 r2 : c1100000=A0 r1 : c1100000=A0 r0 : 418d0000 > Flags: nZCv=A0 IRQs on=A0 FIQs on=A0 Mode SVC_32=A0 ISA ARM=A0 Segment = none > Control: 10c5387d=A0 Table: 6bc14059=A0 DAC: 00000051 > Process kexec (pid: 1329, stack limit =3D 0x366bb4dc) > Stack: (0xebc13e60 to 0xebc14000) > ... > [] (machine_kexec) from [] (kernel_kexec+0x74/0x7c) > [] (kernel_kexec) from [] (__do_sys_reboot+0x1f8/0x= 210) > [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/= 0x28) > Exception stack(0xebc13fa8 to 0xebc13ff0) > ... > ---[ end trace 3e8d6c81723c778d ]--- > 1329 Segmentation fault=A0=A0=A0=A0=A0 ./kexec -e >=20 > > --- > > arch/arm/include/asm/pgtable.h | 1 - > > arch/arm/lib/uaccess_with_memcpy.c | 7 +++++- > > arch/arm/mach-sa1100/assabet.c | 2 +- > > arch/arm/mm/dump.c | 29 +++++++++++++++++----- > > arch/arm/mm/fault-armv.c | 7 +++++- > > arch/arm/mm/fault.c | 22 ++++++++++------ > > arch/arm/mm/idmap.c | 3 ++- > > arch/arm/mm/init.c | 2 +- > > arch/arm/mm/ioremap.c | 12 ++++++--- > > arch/arm/mm/mm.h | 2 +- > > arch/arm/mm/mmu.c | 35 +++++++++++++++++++++----- > > arch/arm/mm/pgd.c | 40 ++++++++++++++++++++++++---= --- > > 12 files changed, 125 insertions(+), 37 deletions(-) > > > > ... >=20 > Best regards > --=20 > Marek Szyprowski, PhD > Samsung R&D Institute Poland >=20 --=20 Sincerely yours, Mike.