From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"oss@buserror.net" <oss@buserror.net>,
"mpe@ellerman.id.au" <mpe@ellerman.id.au>
Cc: Madalin-Cristian Bucur <madalin.bucur@nxp.com>
Subject: Re: [PATCH] powerpc: booke: fix boot crash due to null hugepd
Date: Tue, 28 Feb 2017 14:55:08 +0000 [thread overview]
Message-ID: <58B58F4B.1040807@nxp.com> (raw)
In-Reply-To: <87tw7tc8o9.fsf@skywalker.in.ibm.com>
Hi,
Some more information on the crash, inline.
On 02/17/2017 02:18 PM, Aneesh Kumar K.V wrote:
> laurentiu.tudor@nxp.com writes:
>
>> From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
>>
>> On 32-bit book-e machines, hugepd_ok() does not take
>> into account null hugepd values, causing this crash at boot:
>>
>> Unable to handle kernel paging request for data at address 0x80000000
>> Faulting instruction address: 0xc00182a8
>> Oops: Kernel access of bad area, sig: 11 [#1]
>> SMP NR_CPUS=3D24
>> CoreNet Generic
>> Modules linked in:
>> CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 4.10.0-rc8-00016=
-g69b1f87 #11
>> task: e5050000 task.stack: e5058000
>> NIP: c00182a8 LR: c001829c CTR: 00007ffe
>> REGS: e5059c50 TRAP: 0300 Tainted: G W (4.10.0-rc8-00016=
-g69b1f87)
>> MSR: 00021002 <CE,ME>
>> CR: 88428e82 XER: 00000000
>> DEAR: 80000000 ESR: 00000000
>> GPR00: c0107510 e5059d00 e5050000 80000000 bffffff1 e5059d0c e5059d08 00=
002017
>> GPR08: 00000000 00000000 00000000 00000000 28428e82 00000000 c00027d0 00=
000000
>> GPR16: 00000000 00000000 88a28e82 20000000 48422e82 00000000 88a28e84 dd=
004000
>> GPR24: e5059e38 00000000 00000000 bffffff1 dd004000 00000001 00029002 bf=
fffff1
>> NIP [c00182a8] follow_huge_addr+0x38/0xf0
>> LR [c001829c] follow_huge_addr+0x2c/0xf0
>> Call Trace:
>> [e5059d00] [e5059d00] 0xe5059d00 (unreliable)
>> [e5059d20] [c0107510] follow_page_mask+0x40/0x3c0
>> [e5059d80] [c0107958] __get_user_pages+0xc8/0x420
>> [e5059de0] [c010817c] get_user_pages_remote+0x8c/0x230
>> [e5059e30] [c013f170] copy_strings+0x110/0x3a0
>> [e5059ea0] [c013f42c] copy_strings_kernel+0x2c/0x50
>> [e5059ec0] [c0141324] do_execveat_common+0x474/0x620
>> [e5059f10] [c01414fc] do_execve+0x2c/0x40
>> [e5059f20] [c0001f68] try_to_run_init_process+0x18/0x60
>> [e5059f30] [c000289c] kernel_init+0xcc/0x120
>> [e5059f40] [c000f1e8] ret_from_kernel_thread+0x5c/0x64
>> Instruction dump:
>> bfc10018 7c9f2378 90010024 7fc000a6 7c000146 80630020 38a1000c 38c10008
>> 4bfff869 2c030000 41c20090 81210008 <81430000> 81630004 3860ffea 2f89000=
0
>> ---[ end trace 4bf94e15fd9fa824 ]---
>
>
> Which code path is that. That null should be filtered by the if
> (pmd_none(pmd)) check in find_linux_pte_or_hugepte right ?
The crash happens when __find_linux_pte_or_hugepte() calls hugepd_ok(),
on this line [1]. It's triggered when __find_linux_pte_or_hugepte() is
first called, when the kernel tries to spawn the init process. The input
effective address (ea arg) is bffffff1. This is the call stack:
[e5059cd0] [c0017b60] __find_linux_pte_or_hugepte+0x60/0x120 (unreliable)
[e5059d00] [c001832c] follow_huge_addr+0x2c/0xf0
[e5059d20] [c0107590] follow_page_mask+0x40/0x3c0
[e5059d80] [c01079d8] __get_user_pages+0xc8/0x420
[e5059de0] [c01081fc] get_user_pages_remote+0x8c/0x230
[e5059e30] [c013f210] copy_strings+0x110/0x3a0
[e5059ea0] [c013f4cc] copy_strings_kernel+0x2c/0x50
[e5059ec0] [c01413c4] do_execveat_common+0x474/0x620
[e5059f10] [c014159c] do_execve+0x2c/0x40
[e5059f20] [c0001f68] try_to_run_init_process+0x18/0x60
[e5059f30] [c000289c] kernel_init+0xcc/0x120
[e5059f40] [c000f1e8] ret_from_kernel_thread+0x5c/0x64
Thanks in advance for any pointers.
[1]=20
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/po=
werpc/mm/hugetlbpage.c#n918
---
Best Regards, Laurentiu=
next prev parent reply other threads:[~2017-02-28 14:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 15:11 [PATCH] powerpc: booke: fix boot crash due to null hugepd laurentiu.tudor
2017-02-17 10:08 ` Scott Wood
2017-02-17 10:18 ` Laurentiu Tudor
2017-02-17 12:18 ` Aneesh Kumar K.V
2017-02-17 12:37 ` Laurentiu Tudor
2017-02-28 14:55 ` Laurentiu Tudor [this message]
2017-02-28 22:46 ` Scott Wood
2017-03-01 11:09 ` Michael Ellerman
2017-03-08 7:25 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58B58F4B.1040807@nxp.com \
--to=laurentiu.tudor@nxp.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=madalin.bucur@nxp.com \
--cc=mpe@ellerman.id.au \
--cc=oss@buserror.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).