From patchwork Tue Jan 5 02:18:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Chen X-Patchwork-Id: 7952371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 378A79F38D for ; Tue, 5 Jan 2016 02:23:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A0B32034A for ; Tue, 5 Jan 2016 02:23:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38C0920225 for ; Tue, 5 Jan 2016 02:23:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aGHFX-0007eO-LQ; Tue, 05 Jan 2016 02:21:27 +0000 Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aGHFT-0007do-RL for linux-arm-kernel@lists.infradead.org; Tue, 05 Jan 2016 02:21:25 +0000 Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1lrp0015.outbound.protection.outlook.com [213.199.154.15]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-5-ik9sC0I8RHikCam2E8JcYQ-1; Tue, 05 Jan 2016 02:18:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=k8769bh4WcQpePfSp1HNYzUdS8ucmpp/xJVomYpr+O0=; b=qnGpmSZlQ/zG+7KwqnGt/g8Mo5rGY3aU8QDqseJ9Z5iIWksfo3g+xLobKGYYHerRgdHkqJl2mKqiXIm4JGAYNges95zhbXahSsptZis45/AqaonC5sYcBNZjasnqb3tly5M1yTtVcs2NhIlMxKsQqztiHXJ/bHVCxqvHh/cPdJs= Received: from AM3PR08CA0013.eurprd08.prod.outlook.com (10.160.207.151) by HE1PR08MB0859.eurprd08.prod.outlook.com (10.164.53.21) with Microsoft SMTP Server (TLS) id 15.1.361.13; Tue, 5 Jan 2016 02:18:32 +0000 Received: from AM1FFO11FD054.protection.gbl (2a01:111:f400:7e00::175) by AM3PR08CA0013.outlook.office365.com (2a01:111:e400:8840::23) with Microsoft SMTP Server (TLS) id 15.1.361.13 via Frontend Transport; Tue, 5 Jan 2016 02:18:32 +0000 Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD054.mail.protection.outlook.com (10.174.65.73) with Microsoft SMTP Server (TLS) id 15.1.355.15 via Frontend Transport; Tue, 5 Jan 2016 02:18:32 +0000 Received: from dennis-ws.asiapac.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.266.1; Tue, 5 Jan 2016 02:18:30 +0000 From: Dennis Chen To: Subject: [linux-next PATCH] arm64: fix kernel crash with 48-bit VA and 64KB granule Date: Tue, 5 Jan 2016 10:18:19 +0800 Message-ID: <1451960299-14123-1-git-send-email-dennis.chen@arm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD054; 1:YticGiXFFirjFniYmngz1UhRIljiRyzFhwnByQikQP8jiB5sddB5TukPmFusJAG5s3wQKJtoka3ZN9c16CMAL5OcAdtB20va7j4yETc2DKG0JWWLBdQWSM2x4tMsDhwUyBGPGJotJKCpKfeor+ulH5pHIhtoArlGCMzaiyKVLehsn23eE9GHSLEQbixi8ckQVOIG5LCtqhdYYAkwfckzBDTCFfa8zITcJCdxh4+3W1TUYsANbDegv5khpBk3gtvCmLfpOSIjdRdAOiFOaOx4ZopTBaCabWKZbdJmRLJvc/1VoPXuViRnZsk1VbWXWcHB23gliiALEKdsaT5Ea3qh0q8RK/gP5i3L7BLI4pXy51oAh0GYkKJqPtRax02bqNiJ9G2lxvc5tOJpNDKg1iFtcg== X-Forefront-Antispam-Report: CIP:217.140.96.140; CTRY:GB; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(40434004)(50466002)(110136002)(2351001)(33646002)(92566002)(50986999)(47776003)(5890100001)(4326007)(36756003)(86362001)(229853001)(26826002)(189998001)(5003940100001)(19580405001)(1220700001)(5003600100002)(1096002)(48376002)(586003)(50226001)(106466001)(87936001)(104016004)(19580395003)(11100500001)(6806005)(5008740100001)(77096005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR08MB0859; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0859; 2:LramzsCqGd2EkgXkOzGwNeQKehyhVhEYpD8WRCfAsJzl+0sQnWoGx41+yA4mG9MXNhrxRL1GqMmYTycenFEXX6e8ygFbizJK603Q8vNpxvl4mJegD09DaeODqQkahD+vGhY5RqfF5++jjuT3gLJ4wQ==; 3:sKPcZQYPGQvvlPkHq0cSCilYA1z4qTE0TAK8A3mJbEV4Gf3wlaqfKw6yyg8slIseS8jnhxZfjhWLDZzGPscIcVV8caGg5Qw7gq8VyFElNdCzQGwNYGONWhqraFXhcmUNjMrOQ26+TIr0StTB0YEmVrlsgaByUq7+S309KKshNoYj37xGQH3GyDeOcR+iYDEKkEsnFIKtf6Gex3Px7LdGfVRy1mNU5iyfSI7iz+5dry2rTx3qXfK06N9V6FUSXo2mSsCNNi1t5Ja5xMk9dzXc6w==; 25:xnDe7aqCJ4jxPWkUPo2m6ufTCSwJB8M7BOcCkqT6jFNyORLD/mAY7rBTwtLejL7MJRoTiO385fSq0LmEOyCDgcxcDndmj3iE7880qqC/MZVZ7Lq0QlLeSejc4z5+ExR0FeyTFA2QO7WL9AL7CjQdwjUG3vqE/52P51Ci+fNQ45LX2Zs94zasdioql3F77U7biRCDD3n/gr5y+64eFhKBWdP9pbyGkP02tX+pl3YtN2PMyHa724Z8qW3idWRqj63FmsYn0UCqbXChdnYmTsmfhA== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:HE1PR08MB0859; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0859; 20:/DZHGT8wutckjjqf2YNEnvEwQUHnjdxF4gbNZGspOBfxfJV+oIjLtEVxhpk21AFQYWpSGf4qX6GCQGJ/+g3ezLIqo4Frz06cMNBZ5BwnSaaYBjeuCgcUd/YFR8zLjTafl+eLUQzscBH0ydfG5scDVh8p9D8anXw2aEn9lO7nN1Q+6Y3X2sEwaQq9hIlxaBu20kOsk/hsK4pLXmsr6oD6uGn0DU9ZZbU2d0DNmeMcX1Pk6vYFTHRj4uZUg6publ38; 4:py4nYNy4lcnmptvOtQd/hI0QbFfLrJKsQdwfqKtJzbK/UWg/yLwPYXsirPOKXfXuV1aKodT9astLmyIYoRfpiXZTHoOEq5Ep54C7PP6Qvh4brKPzDeeApeOXKN7sPFIG5+ECF2fPGZU5vmVlz8R0AHKIMzYXFYvXMm+8RHuNYsaiZejZeut60i2hHHISGzogpFZiSLsXiIXnaqJjsHMCkXlpCw3q9TX+lnqxQRGSa4EAScShUw1WbO6ZRjzFoxp/3fGRFwHy6omW1wh1K4cxRO7W1qz27dR28deaw2KFGezn9xxxxK0J61W8p9RibNtO8OFllDGpLk0SKEF9RRF8t5SDWdgDOwKdahjxsK2xN9ZV2JAB3sC/Z4M+mtc5uzMDHaz+Q2xIBikBOC6oZRdFGzp7WG/uRIFxJ9kjt+dozSaueaRgDNnAHAEJjtC+Qzbi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(10201501046)(3002001); SRVR:HE1PR08MB0859; BCL:0; PCL:0; RULEID:; SRVR:HE1PR08MB0859; X-Forefront-PRVS: 0812095267 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0859; 23:cAbAu9VG3BDucyl+YKhEOgdq1iebd/4GjDwxtsEYi?= =?us-ascii?Q?swRdZtm+KbVuaaH14P1/dmKKJvMMlHSu5LrWvsUlJ+Hx6d5lhRTEkll6AGFQ?= =?us-ascii?Q?sg4gZNqMGnjeP8nUcevzoJ7p1GnhbFvbWka7VhXHzHQR1K657MuOZWAFDv2D?= =?us-ascii?Q?ryDvhEkDuIHCTnb+ulN0jmEEPoG8QxebrHkjTs/1dY10VA/9Hg5X4nnYfm+a?= =?us-ascii?Q?OpiKxDbTKa0VDlaY7ZuQSChRf9Rs51ONo0kVD1KuPokiMSNx/ubKXreg8Jh8?= =?us-ascii?Q?HqhaZOZyr8mjZJUFgv7yD5fLp0tOCU0Ny+kEvoTnWwNOZnNm5OkU2j/ELXq7?= =?us-ascii?Q?zm1yp2blY1+A1oPW5ayqorSQaVz1UzsuwQGbFb+lHrX5l/xsiz8E3GXpBJl6?= =?us-ascii?Q?/SAmUeW503L6y0HFG2tb/vU3Xw1071nvEukfPbYc5ihlHaaF0xdYb/2ymvur?= =?us-ascii?Q?tzgIBAaSlHlnX4JLfWfDHmO5s28t00iwvnIXd0fN92l+0HlleREyzXf38FIq?= =?us-ascii?Q?9ID1ya6VL8QlQFr8gVVI5CNzn82DtH8n+1HKDZtqIzZC+046Uqlie+eG8kYg?= =?us-ascii?Q?OGqcGpl4Yr3gJZc6SSzhlA6MTHb0jLiJjKcfVwIsGU7aKu7JxoI/ZELAX0eB?= =?us-ascii?Q?raCjCKNyEdV6J59OP5xL+GRgbjBaloIgmeDFeyqP4FOQ0WH7ZtHg5J2EEaxq?= =?us-ascii?Q?PlBD7QHawBJK6z1jAoOktgAfJXWvs5PMNwtucSVuTwQGEnkDCBmFfh5rw9UJ?= =?us-ascii?Q?17/kwsmwkhKBI5wAW4RWW0muJMkOBDSLpaZTSxTKp1jsEplBahDUpbTRYg5u?= =?us-ascii?Q?rTqoBHyopnizdT5OUd95233y+Ok92Xd/BV/+LOocz9nuJVmpoVts3dLkfD9z?= =?us-ascii?Q?urXv5nYlDdMhyecysQOopHosXRCgoXsBGAoLDN6vAHfOvrttflHWEGXDhNMy?= =?us-ascii?Q?l87wL8INeYgZ9ndTM12pJymXHKiNYFw/wK/sa/6Mg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0859; 5:HQ/zm+FTpSN/i2g2YibmXCBvgjTbKTfQH99X9obKJi2bHB37H6ddo6Cl0w9mYtR7QBV2zdGMg5ac/ZpapksFfBf91+DCVWDGgOg9fHQyZsVubeRh2eNE21nHTSCyA457y6bUV1gXagErAB5H+Z9aGQ==; 24:ouxNiLSxmkNTIUHIYxYZCEhA8V3ecG8PEpgjOW2lyzCywtLrQuJiM/NEq5AlThEZiq6R4oJKn/c2m8WExLNO5jzVO6jq+TQdSSD0zK0ZWZ8=; 20:ZcsnOflprnmEVcvgp4tFKRnxeX5LIPOFVGBrXFidAMrZsz/GTUBy+ZnGrmV3m7wBbe7crEr9D4U4+IVjeFNI9k71p5i3Vbg3Xjb9Ya0zaxO/girW0KtchsRQCWE3X5KTpR6Zv+sCF141jUTBCS24u7oOmso/r/sH3CbeyIgSxA8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2016 02:18:32.2362 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB0859 X-MC-Unique: ik9sC0I8RHikCam2E8JcYQ-1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160104_182124_343080_A8637B27 X-CRM114-Status: GOOD ( 11.20 ) X-Spam-Score: -4.1 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dennis.chen@arm.com, catalin.marinas@arm.com, sudeep.holla@arm.com, will.deacon@arm.com, ard.biesheuvel@linaro.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The commit 3400749b5a22 ("arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM") uses pgd_alloc() to allocate space for efi_mm.pgd while not the static efi_pgd[], since this function will be called with early_initcall, which results in the pgd_cache used by pgd_alloc() has not been initialized yet, kernel will hang in this case. This patch is trying to make the pgd_cache_init() called before arm_enable_runtime_services() by changing its core_initcall to early_initcall. Signed-off-by: Dennis Chen Tested-by: Sudeep Holla Cc: Will Deacon Cc: Catalin Marinas Cc: Ard Biesheuvel Cc: Sudeep Holla --- arch/arm64/mm/pgd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. diff --git a/arch/arm64/mm/pgd.c b/arch/arm64/mm/pgd.c index cb3ba1b..859a788 100644 --- a/arch/arm64/mm/pgd.c +++ b/arch/arm64/mm/pgd.c @@ -56,4 +56,4 @@ static int __init pgd_cache_init(void) SLAB_PANIC, NULL); return 0; } -core_initcall(pgd_cache_init); +early_initcall(pgd_cache_init);