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=-10.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 CD852C433E2 for ; Fri, 17 Jul 2020 08:33:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 94AE62071A for ; Fri, 17 Jul 2020 08:33:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94AE62071A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 384B88D001C; Fri, 17 Jul 2020 04:33:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 334E68D0001; Fri, 17 Jul 2020 04:33:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1FD808D001C; Fri, 17 Jul 2020 04:33:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0111.hostedemail.com [216.40.44.111]) by kanga.kvack.org (Postfix) with ESMTP id 0A3398D0001 for ; Fri, 17 Jul 2020 04:33:11 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id BEDB911909 for ; Fri, 17 Jul 2020 08:33:10 +0000 (UTC) X-FDA: 77046902940.30.print14_4017e2026f09 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin30.hostedemail.com (Postfix) with ESMTP id 474821809AFE6 for ; Fri, 17 Jul 2020 08:32:04 +0000 (UTC) X-HE-Tag: print14_4017e2026f09 X-Filterd-Recvd-Size: 5026 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Fri, 17 Jul 2020 08:31:57 +0000 (UTC) IronPort-SDR: WxegDr7w8hfC98Q8v2E1lfZRI6cJv2tz2lotn7feL+7DnrAXLqroqlA5BMBC9PLgcqPQeCTKgI D3HamZgiFdxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9684"; a="147062156" X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="147062156" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2020 01:07:50 -0700 IronPort-SDR: nwd7jPJHwVPkxZaosK2NPWshU/1YIuZs/EX9Bl/nY2WbjNHt1AGhV6tHybdW217GnnQHy9ljc7 Gxhm11TQxhmw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,362,1589266800"; d="scan'208";a="430773818" Received: from shao2-debian.sh.intel.com (HELO [10.239.13.3]) ([10.239.13.3]) by orsmga004.jf.intel.com with ESMTP; 17 Jul 2020 01:07:48 -0700 Subject: Re: [LKP] Re: db57e98d87 ("mm/sparse.c: fix ALIGN() without power of 2 in .."): BUG: kernel reboot-without-warning in early-boot stage, last printk: early console in setup code To: Andrew Morton , kernel test robot Cc: Lecopzer Chen , Mark-PK Tsai , Linux Memory Management List , linux-kernel@vger.kernel.org, LKP References: <20200716083159.GH3874@shao2-debian> <20200716150613.409103a2d1e4c3f5f63652b8@linux-foundation.org> From: Rong Chen Message-ID: <699f0838-14d9-9a3b-4265-c05d4793a1c3@intel.com> Date: Fri, 17 Jul 2020 16:07:20 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20200716150613.409103a2d1e4c3f5f63652b8@linux-foundation.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Rspamd-Queue-Id: 474821809AFE6 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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: On 7/17/20 6:06 AM, Andrew Morton wrote: > On Thu, 16 Jul 2020 16:32:00 +0800 kernel test robot wr= ote: > >> Greetings, >> >> 0day kernel testing robot got the below dmesg and the first bad commit= is >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git mas= ter >> >> commit db57e98d87908b8837352abe08515e42752270c1 >> Author: Lecopzer Chen >> AuthorDate: Mon Sep 23 15:36:24 2019 -0700 >> Commit: Linus Torvalds >> CommitDate: Tue Sep 24 15:54:09 2019 -0700 >> >> mm/sparse.c: fix ALIGN() without power of 2 in sparse_buffer_allo= c() > Are we sure about this? That patch is a year old - has something > in the test setup changed to make it visible at this late stage? Hi Andrew, The issue can be reproduced if CONFIG_SPARSEMEM_VMEMMAP is not set $ grep CONFIG_SPARSEMEM .config CONFIG_SPARSEMEM_MANUAL=3Dy CONFIG_SPARSEMEM=3Dy CONFIG_SPARSEMEM_EXTREME=3Dy CONFIG_SPARSEMEM_VMEMMAP_ENABLE=3Dy # CONFIG_SPARSEMEM_VMEMMAP is not set $=20 ./reproduce-yocto-vm-yocto-23:20200619042212:x86_64-randconfig-r025-20200= 618:5.3.0-11836-gdb57e98d87908:1=20 vmlinuz-5.3.0-11836-gdb57e98d87908 early console in setup code and kernel can boot if enable CONFIG_SPARSEMEM_VMEMMAP $ grep CONFIG_SPARSEMEM .config CONFIG_SPARSEMEM_MANUAL=3Dy CONFIG_SPARSEMEM=3Dy CONFIG_SPARSEMEM_EXTREME=3Dy CONFIG_SPARSEMEM_VMEMMAP_ENABLE=3Dy CONFIG_SPARSEMEM_VMEMMAP=3Dy $=20 ./reproduce-yocto-vm-yocto-23:20200619042212:x86_64-randconfig-r025-20200= 618:5.3.0-11836-gdb57e98d87908:1=20 vmlinuz-5.3.0-11836-gdb57e98d87908.CONFIG_SPARSEMEM_VMEMMAP | head early console in setup code [=C2=A0=C2=A0=C2=A0 0.000000] Linux version 5.3.0-11836-gdb57e98d87908=20 (kbuild@6c2adaf8a115) (clang version 12.0.0=20 (git://gitmirror/llvm_project ed6b578040a85977026c93bf4188f996148f3218))=20 #1 SMP Fri Jul 17 15:41:47 CST 2020 [=C2=A0=C2=A0=C2=A0 0.000000] Command line: root=3D/dev/ram0 hung_task_pa= nic=3D1 debug=20 apic=3Ddebug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=3D100=20 net.ifnames=3D0 printk.devkmsg=3Don panic=3D-1 softlockup_panic=3D1=20 nmi_watchdog=3Dpanic oops=3Dpanic load_ramdisk=3D2 prompt_ramdisk=3D0=20 drbd.minor_count=3D8 systemd.log_level=3Derr ignore_loglevel console=3Dtt= y0=20 earlyprintk=3DttyS0,115200 console=3DttyS0,115200 vga=3Dnormal rw=20 rcuperf.shutdown=3D0 watchdog_thresh=3D60 [=C2=A0=C2=A0=C2=A0 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x= 87 floating=20 point registers' [=C2=A0=C2=A0=C2=A0 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'S= SE registers' [=C2=A0=C2=A0=C2=A0 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'A= VX registers' [=C2=A0=C2=A0=C2=A0 0.000000] x86/fpu: xstate_offset[2]:=C2=A0 576, xstat= e_sizes[2]: 256 [=C2=A0=C2=A0=C2=A0 0.000000] x86/fpu: Enabled xstate features 0x7, conte= xt size is 832=20 bytes, using 'standard' format. [=C2=A0=C2=A0=C2=A0 0.000000] BIOS-provided physical RAM map: [=C2=A0=C2=A0=C2=A0 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000= 000009fbff] usable qemu-system-x86_64: terminating on signal 2 Best Regards, Rong Chen