From patchwork Tue May 16 14:47:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Tudor X-Patchwork-Id: 9729269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4ED95602B4 for ; Tue, 16 May 2017 14:48:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F26328A1E for ; Tue, 16 May 2017 14:48:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 33D6F28A24; Tue, 16 May 2017 14:48:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B49D928A1E for ; Tue, 16 May 2017 14:48:25 +0000 (UTC) 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:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PT6lK+jpJ/rYTkQLBM4PR3C4SqEn7WfNAh+XYhOW3/I=; b=hQd4YonoOuLXim EoK6y2koWa29Q71M2ILIWIqjk5z64X54uz+newfx6HUOZFL4UPWWH9iiuP74jz+fWCh6Q/Poq+RXf l3MqGAUGNO0LTixbo2ZGxgG/+jpEiicNewGJKhnKUCdAGyHqgxHII6ZyUhcscBdNY9KBo/f7MaYF3 rJehPUvRnL0mI6qpo8Fn+vqB3G5rL6/Qitq/boqctROOGdfgooywKMeMdN1P3JYWbz1rw0WacDmLR ygnWV9poIs18tUcJMCmOhMEKEahQcn0/g+QEbM+qVrtof8ItJHLp+o0MERwE8YpRjEyxqJnQJLw3G cI9YBXwgZ0WkFaMruLgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dAdlw-0004jk-Fd; Tue, 16 May 2017 14:48:24 +0000 Received: from mail-co1nam03on0050.outbound.protection.outlook.com ([104.47.40.50] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dAdlt-0004gI-1L for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2017 14:48:22 +0000 Received: from DM5PR03CA0008.namprd03.prod.outlook.com (10.175.104.18) by BY2PR03MB174.namprd03.prod.outlook.com (10.242.36.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Tue, 16 May 2017 14:47:54 +0000 Received: from BN1BFFO11FD031.protection.gbl (2a01:111:f400:7c10::1:143) by DM5PR03CA0008.outlook.office365.com (2603:10b6:3:118::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14 via Frontend Transport; Tue, 16 May 2017 14:47:54 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD031.mail.protection.outlook.com (10.58.144.94) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1075.5 via Frontend Transport; Tue, 16 May 2017 14:47:53 +0000 Received: from rhuath.am.freescale.net (rhuath.am.freescale.net [10.81.117.102]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v4GElq45014452; Tue, 16 May 2017 07:47:52 -0700 From: To: Subject: [PATCH] powerpc: booke: fix boot crash due to null hugepd Date: Tue, 16 May 2017 09:47:52 -0500 Message-ID: <20170516144752.8444-1-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.11.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131394196738367212; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39850400002)(39860400002)(39380400002)(39450400003)(39840400002)(39400400002)(39410400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(45080400002)(50466002)(33646002)(48376002)(498600001)(1076002)(5660300001)(47776003)(54906002)(36756003)(110136004)(2876002)(7416002)(356003)(6916009)(50986999)(189998001)(106466001)(86362001)(2351001)(575784001)(85426001)(4326008)(86152003)(105606002)(77096006)(38730400002)(8656002)(53936002)(2906002)(305945005)(104016004)(50226002)(8676002)(5003940100001)(81166006)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB174; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD031; 1:VGbM2tBVfFEp4sfjeoZn6jkM/zM960nfUHMkEA1pawyUDPfm2s/MxWtkp7Tde0QSSW2dfB5rLE0bYsbOs5CFuQyTJTIGY6s7XJ72wj10YvvILZ9vT8gNhGXuaH1Yu9Zod62M3HH9YC9/+Dic4ZvbN9+NDSWqr21DjYPbG+msw42IMM6wVY53wg1mWrZnBxsf6GKbaxTVxvHI5Dlq3F7ady+3D6bsIyuybTLQyF3yfaNMGgRulCJkDv+8bv5gowD4EoGzeqqQ+WuAvkb7778HrCWMTzcynKlYIJN/r7mfl1PUuwf1o3R0HC3viyN5AMyd7dKn514IiFffTuqSwmk3f/7RRi6xC2H8RJg7LpBIPdOU+cuvUoDMC6/krfUUfXCnrDcjjR+l5KYVzWTbjpL2A2WpNMlfZZmHAJlWtrDqu5WC+NvH1gAgfZZEAEZkzUEKQXfzLMUAxBFspQcJ3XIWKw1NMtnRWIJakUrTQ6xV60gv88zLxOoxwg7lNzvLegC1cl9FUggM/hvGv42c0k1on1zPVUL2G+QFOX+Gr3CqS9Yv1//VLeAtpv1En3s1TJocquTuNAClyDuFSPYdV7s4ydPIxg2Kk3RGwAfvsdpAhUDLNiiAv02DeKO/pmJNOvVP5znn1mz/5YDABgInrzWHQ4z2MsDQlXRPov6OUdX1y4TSozRvoexO96I60WW+djBznG2CmsxRJIYQNqLmfJwP3q8lYjqqrPhMzgvwVqOL3Qo= MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 30596814-0bc2-4d38-fd8c-08d49c6a8897 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:BY2PR03MB174; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB174; 3:t+ljaP1wbtBf6JnT45TwkcFI0CAbAMxJtmp7Um5ChfiT927xuA5Jj0U1UyCcKMB0Gfy7sqF+m/c+UrCIEXOX/fHR7aJzd5Hm+FqSRYQ0q8Wh7qOmdrW4QLaIVCGdyFpnJzaI4bewc9duIZyOl4W1GwTDgG9EfmlkC7+kVjeg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am-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(8121501046)(13015025)(13017025)(5005006)(13023025)(13018025)(13024025)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123563025)(20161123556025)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123565025)(20161123559100); SRVR:BY2PR03MB174; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR03MB174; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB174; 4:/N3ZBmvC464o9d/liI/+77OH9iyrPn8jhvewS9ncwlF?= =?us-ascii?Q?b8ICG6U3ckDvT99h0LrjqnAFBFpNiMgqwSf4y9Cpr+150spIhnU5ESwSVdpF?= =?us-ascii?Q?xq5tzUwM4sVn70rT1tSZZslBF5IfZ+tIjx01QjbYCjQ957jvC4FJAgXcIRzi?= =?us-ascii?Q?vkzhQoO10VKVc71HvCn2mxlxttCZVfohEyp/nxHRjmxGSvQH4ZWOpYh/DehM?= =?us-ascii?Q?lI3B39BKGSbUFBIdaQe4ChzcziZodBQymzKsPwtQD3kniqt6stcCCUUjoznH?= =?us-ascii?Q?ogh6uImoZcNhj0iEL55nGugUh+EGKEpGkYxUibSRcrW87yjQkEmoFS2xJEyI?= =?us-ascii?Q?jrjPBQsiHUV1lfGEdqUg03ZuDbqK+ztEjtFzgbfY6QE/MjSVKzdY+d4wsPLz?= =?us-ascii?Q?ZYMNMnZNRLWTPWTrV88Iu+0PqYi4vNsaEZ6EGK14VE9kH7pBbJ/dY+Xb+PrB?= =?us-ascii?Q?JotoTtTiJGhHV5t+QFTPGsRatcGjZ8cxmfnMoofPSbRRgCyxXEi2OrUJhPOw?= =?us-ascii?Q?bUjCT5okUapE1HP84w4wDmwvd1BlEvvTix75LvZ/MKf7Taor76OW8F+eT627?= =?us-ascii?Q?gf7r4kCQxgt5lcoi6+cW2L1sHSjpUSbKTodPIB2SdlNSERWYvD374o2Fi1E2?= =?us-ascii?Q?GL2sqW4bMZs+Mo0q53FkSCChxppudJn/7wkxycgMpU25uknkiXyqtqyhJ/o8?= =?us-ascii?Q?Di88bSQj+VrOF91NJ9xDInzVLY3uTpzr8+67oVgORMPF52Vv8hyWHEizpi/p?= =?us-ascii?Q?78U/+oo2CXuSnZzZntOuoM3nvEGOAuUhWAoV42JVwPVKUMKx/q76cZWjZpBt?= =?us-ascii?Q?JzTgQUf4O8JQLIijcI/pl0nLrs89fpFg9Jg2bD1IAbgn6h/Yv9VvMIctE+mJ?= =?us-ascii?Q?yvqsOEyBVzcr+uZdYSm0b1yNoJl2s+b6oEGJCO0Hss4gsZ+rkpWaSfRLxFJF?= =?us-ascii?Q?zvX8oCOl+iKEa9CB4ME2b69/RJRNyeTJlp7XRMg=3D=3D?= X-Forefront-PRVS: 03094A4065 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB174; 23:vZIRSFylSBNqBWzeCNZvGUAb6vKesbX9Wet3tQ6p/e?= =?us-ascii?Q?GuXRU+otNKZd6nQd9QmO/9VMQdb1Z+7yIHpm7tbG7QgVWH9GzLvOBBc5vfsg?= =?us-ascii?Q?EytvQpGOy4tBrxBz6bDnzqyxKpyDFBMsIXwWvkuNyAvKo21tzZtH4jSjcRBl?= =?us-ascii?Q?iP2FL5O98zobf3ukglhGIuG5YUVYIyXOA5GS1Y7F9cX2aU4+ZVoOr7dYAWUn?= =?us-ascii?Q?vzU47YlUMyPJivjAKjEId6tMYju4M6YwadN1n/tFHXKkBTjcUQv0puxBK5h/?= =?us-ascii?Q?jbqirMltg3/Ywli6amblc9wClkvnWsbpe7QZX8I5UkJ1RQ2dir20wcpQBQwU?= =?us-ascii?Q?T3SeWFKo3n245BtC0rwd+3wXJy+vkH8f50PjWkKL/Ynwmoquypd4rE+WXP1r?= =?us-ascii?Q?WDk+hV05TU7f663WZx+XW1F7fgS0DKFPTUtmzSLn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uvM+T0dr2UfNavmtFvGZZAS9s+az+4ecWehj5dSTrTqOnwPyk522o6eKKQNOMCiWkTpqrq+vXdJ9NF5Y8BmoCzMl4wn4Gt+OQqvyJL3JAZoBJquW4gy+cYBKAj53OWgdPWcQ8vt1xc2yfdXJr6ed5SCYudTsUHyqBx3T3E60PZGKCRnApcj6tl0fvQruOYhYbdJaoVmw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2017 14:47:53.4311 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB174 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170516_074821_187188_E56648EC X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, arnd@arndb.de, ruxandra.radulescu@nxp.com, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, agraf@suse.de, catalin.horghidan@nxp.com, linux-arm-kernel@lists.infradead.org, ioana.ciornei@nxp.com, leoyang.li@nxp.com, bharat.bhushan@nxp.com, stuart.yoder@nxp.com, Laurentiu Tudor Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Laurentiu Tudor 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=24 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 CR: 88428e82 XER: 00000000 DEAR: 80000000 ESR: 00000000 GPR00: c0107510 e5059d00 e5050000 80000000 bffffff1 e5059d0c e5059d08 00002017 GPR08: 00000000 00000000 00000000 00000000 28428e82 00000000 c00027d0 00000000 GPR16: 00000000 00000000 88a28e82 20000000 48422e82 00000000 88a28e84 dd004000 GPR24: e5059e38 00000000 00000000 bffffff1 dd004000 00000001 00029002 bffffff1 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 2f890000 ---[ end trace 4bf94e15fd9fa824 ]--- This impacts all nxp (ex-freescale) 32-bit booke platforms. Fixes: 20717e1ff526 ("powerpc/mm: Fix little-endian 4K hugetlb") Reported-by: Madalin-Cristian Bucur Signed-off-by: Laurentiu Tudor --- arch/powerpc/include/asm/nohash/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/nohash/pgtable.h b/arch/powerpc/include/asm/nohash/pgtable.h index 0cd8a38..e5805ad 100644 --- a/arch/powerpc/include/asm/nohash/pgtable.h +++ b/arch/powerpc/include/asm/nohash/pgtable.h @@ -230,7 +230,7 @@ static inline int hugepd_ok(hugepd_t hpd) return ((hpd_val(hpd) & 0x4) != 0); #else /* We clear the top bit to indicate hugepd */ - return ((hpd_val(hpd) & PD_HUGE) == 0); + return (hpd_val(hpd) && (hpd_val(hpd) & PD_HUGE) == 0); #endif }