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=-11.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 B1E66C636C8 for ; Tue, 20 Jul 2021 12:36:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 37DEE610F7 for ; Tue, 20 Jul 2021 12:36:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37DEE610F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GTdVg5pHdz3bbZ for ; Tue, 20 Jul 2021 22:36:11 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=YvNKATWO; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=will@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=YvNKATWO; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (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 4GTdV65kWFz2yP4 for ; Tue, 20 Jul 2021 22:35:42 +1000 (AEST) Received: by mail.kernel.org (Postfix) with ESMTPSA id B6E0860E0C; Tue, 20 Jul 2021 12:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626784539; bh=asA6l4h5KrepX/z50UVRSC8Q3OvPiGjAUceJKgcJbl0=; h=From:To:Cc:Subject:Date:From; b=YvNKATWOtShf7swN0mmf2C6ONDPu8XOlH7q70SOroQM5S/MpCDM0YB8g1cad/xpAt DZdsiQnk9tGg0td/isJJ2XQ1/izSNXzsQN45DxDXpz3NNJvEIbKKxsa5dpOtaaE+8a CdUdXNFjOfsTHCg3WDra+78eNlhSkoOiYmB+mUHEqgyNu/swwAMbVxkpPUHjFZxtCn vLm4cfaJXBXxlkBtTY64lP3t/wN/Yd0rcIjowQ8w8CxqZOrgoc7dZgOU7csRBpJ8Qp XwqCbdeJMFNQXPGd6+z/3CyrU8g1IAnFcjFSPbUNOMUwmLmsvloD6mVhIG+b4t3vXa Qo/vh5hYZ98XQ== From: Will Deacon To: linux-kernel@vger.kernel.org Subject: [PATCH 0/2] Fix arm64 boot regression in 5.14 Date: Tue, 20 Jul 2021 13:35:10 +0100 Message-Id: <20210720123512.8740-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Mark Rutland , Marc Zyngier , Catalin Marinas , Andrew Morton , Jonathan Marek , linuxppc-dev@lists.ozlabs.org, Paul Mackerras , linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven , Thomas Gleixner , Will Deacon , Ard Biesheuvel , Mike Rapoport Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Hi folks, Jonathan reports [1] that commit c742199a014d ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge") breaks the boot on arm64 when huge mappings are used to map the kernel linear map but the VA size is configured such that PUDs are folded. This is because the non-functional pud_set_huge() stub is used to create the linear map, which results in 1GB holes and a fatal data abort when the kernel attemps to access them. Digging further into the issue, it also transpired that huge-vmap is silently disabled in these configurations as well [2], despite working correctly in 5.13. The latter issue causes the pgtable selftests to scream due to a failing consistency check [3]. Rather than leave mainline in a terminally broken state for arm64 while we figure this out, revert the offending commit to get things working again. Unfortunately, reverting the change in isolation causes a build breakage for 32-bit PowerPC 8xx machines which recently started relying on the problematic stubs to support pte-level huge-vmap entries [4]. Since Christophe is away at the moment, this series first reverts the PowerPC 8xx change in order to avoid breaking the build. I would really like this to land for -rc3 and I can take these via the arm64 fixes queue if the PowerPC folks are alright with them. Cheers, Will [1] https://lore.kernel.org/r/20210717160118.9855-1-jonathan@marek.ca [2] https://lore.kernel.org/r/20210719104918.GA6440@willie-the-truck [3] https://lore.kernel.org/r/CAMuHMdXShORDox-xxaeUfDW3wx2PeggFSqhVSHVZNKCGK-y_vQ@mail.gmail.com/ [4] https://lore.kernel.org/r/8b972f1c03fb6bd59953035f0a3e4d26659de4f8.1620795204.git.christophe.leroy@csgroup.eu/ Cc: Ard Biesheuvel Cc: Michael Ellerman Cc: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christophe Leroy Cc: Paul Mackerras Cc: Jonathan Marek Cc: Catalin Marinas Cc: Andrew Morton Cc: Nicholas Piggin Cc: Mark Rutland Cc: Geert Uytterhoeven Cc: Marc Zyngier Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org --->8 Jonathan Marek (1): Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" Will Deacon (1): Revert "powerpc/8xx: add support for huge pages on VMAP and VMALLOC" arch/arm64/mm/mmu.c | 20 ++++----- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/nohash/32/mmu-8xx.h | 43 -------------------- arch/x86/mm/pgtable.c | 34 +++++++--------- include/linux/pgtable.h | 26 +----------- 5 files changed, 25 insertions(+), 100 deletions(-) -- 2.32.0.402.g57bb445576-goog 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=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 239C5C07E95 for ; Tue, 20 Jul 2021 12:37:32 +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 E93B861164 for ; Tue, 20 Jul 2021 12:37:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E93B861164 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=MsnHf3YqC3zn3o7I5TiXHAIqjUrdK25JSPHjxwiN5rA=; b=rpcSqin0u6RATD wODLOirgM1GXaZRoUZHTzBN15KhE6D2wNKxNiDvdHiHa/8mD9fAc4f2ypfmNDXgZsvQNRhl2dyHzO qySIAz04qINUxv0votvshErCbkoTmo2+Cbc1OT+swWmn1EP+D3nzYDP5Om4RlUMmBUaZOEUDlPX4B V33R8rDNTQfbH56aynSMTYGHLyIQ/ElNtUpmMDVIsK4xRlB9kx7Wcj21RpPycOW6QBQD34eqmgynG K3K468KllxDhqrQCfb9ZC3NzhXju9qQW7ero9w+8CG1j3XANOh3V4UN/s7bdVAyaYnN8H6zhqyP1E EnoCE5kN/SGzJXm+A6kQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5oyO-00CmCX-Oi; Tue, 20 Jul 2021 12:35:44 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5oyJ-00CmBe-Pf for linux-arm-kernel@lists.infradead.org; Tue, 20 Jul 2021 12:35:42 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id B6E0860E0C; Tue, 20 Jul 2021 12:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626784539; bh=asA6l4h5KrepX/z50UVRSC8Q3OvPiGjAUceJKgcJbl0=; h=From:To:Cc:Subject:Date:From; b=YvNKATWOtShf7swN0mmf2C6ONDPu8XOlH7q70SOroQM5S/MpCDM0YB8g1cad/xpAt DZdsiQnk9tGg0td/isJJ2XQ1/izSNXzsQN45DxDXpz3NNJvEIbKKxsa5dpOtaaE+8a CdUdXNFjOfsTHCg3WDra+78eNlhSkoOiYmB+mUHEqgyNu/swwAMbVxkpPUHjFZxtCn vLm4cfaJXBXxlkBtTY64lP3t/wN/Yd0rcIjowQ8w8CxqZOrgoc7dZgOU7csRBpJ8Qp XwqCbdeJMFNQXPGd6+z/3CyrU8g1IAnFcjFSPbUNOMUwmLmsvloD6mVhIG+b4t3vXa Qo/vh5hYZ98XQ== From: Will Deacon To: linux-kernel@vger.kernel.org Cc: Will Deacon , Ard Biesheuvel , Michael Ellerman , Thomas Gleixner , Benjamin Herrenschmidt , Christophe Leroy , Paul Mackerras , Jonathan Marek , Catalin Marinas , Andrew Morton , Mike Rapoport , Mark Rutland , Geert Uytterhoeven , Marc Zyngier , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/2] Fix arm64 boot regression in 5.14 Date: Tue, 20 Jul 2021 13:35:10 +0100 Message-Id: <20210720123512.8740-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210720_053539_906352_6AF04728 X-CRM114-Status: GOOD ( 16.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi folks, Jonathan reports [1] that commit c742199a014d ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge") breaks the boot on arm64 when huge mappings are used to map the kernel linear map but the VA size is configured such that PUDs are folded. This is because the non-functional pud_set_huge() stub is used to create the linear map, which results in 1GB holes and a fatal data abort when the kernel attemps to access them. Digging further into the issue, it also transpired that huge-vmap is silently disabled in these configurations as well [2], despite working correctly in 5.13. The latter issue causes the pgtable selftests to scream due to a failing consistency check [3]. Rather than leave mainline in a terminally broken state for arm64 while we figure this out, revert the offending commit to get things working again. Unfortunately, reverting the change in isolation causes a build breakage for 32-bit PowerPC 8xx machines which recently started relying on the problematic stubs to support pte-level huge-vmap entries [4]. Since Christophe is away at the moment, this series first reverts the PowerPC 8xx change in order to avoid breaking the build. I would really like this to land for -rc3 and I can take these via the arm64 fixes queue if the PowerPC folks are alright with them. Cheers, Will [1] https://lore.kernel.org/r/20210717160118.9855-1-jonathan@marek.ca [2] https://lore.kernel.org/r/20210719104918.GA6440@willie-the-truck [3] https://lore.kernel.org/r/CAMuHMdXShORDox-xxaeUfDW3wx2PeggFSqhVSHVZNKCGK-y_vQ@mail.gmail.com/ [4] https://lore.kernel.org/r/8b972f1c03fb6bd59953035f0a3e4d26659de4f8.1620795204.git.christophe.leroy@csgroup.eu/ Cc: Ard Biesheuvel Cc: Michael Ellerman Cc: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christophe Leroy Cc: Paul Mackerras Cc: Jonathan Marek Cc: Catalin Marinas Cc: Andrew Morton Cc: Nicholas Piggin Cc: Mark Rutland Cc: Geert Uytterhoeven Cc: Marc Zyngier Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org --->8 Jonathan Marek (1): Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" Will Deacon (1): Revert "powerpc/8xx: add support for huge pages on VMAP and VMALLOC" arch/arm64/mm/mmu.c | 20 ++++----- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/nohash/32/mmu-8xx.h | 43 -------------------- arch/x86/mm/pgtable.c | 34 +++++++--------- include/linux/pgtable.h | 26 +----------- 5 files changed, 25 insertions(+), 100 deletions(-) -- 2.32.0.402.g57bb445576-goog _______________________________________________ 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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 1B9B4C07E95 for ; Tue, 20 Jul 2021 12:35:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE85760E0C for ; Tue, 20 Jul 2021 12:35:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237691AbhGTLzM (ORCPT ); Tue, 20 Jul 2021 07:55:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:38880 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbhGTLzB (ORCPT ); Tue, 20 Jul 2021 07:55:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B6E0860E0C; Tue, 20 Jul 2021 12:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626784539; bh=asA6l4h5KrepX/z50UVRSC8Q3OvPiGjAUceJKgcJbl0=; h=From:To:Cc:Subject:Date:From; b=YvNKATWOtShf7swN0mmf2C6ONDPu8XOlH7q70SOroQM5S/MpCDM0YB8g1cad/xpAt DZdsiQnk9tGg0td/isJJ2XQ1/izSNXzsQN45DxDXpz3NNJvEIbKKxsa5dpOtaaE+8a CdUdXNFjOfsTHCg3WDra+78eNlhSkoOiYmB+mUHEqgyNu/swwAMbVxkpPUHjFZxtCn vLm4cfaJXBXxlkBtTY64lP3t/wN/Yd0rcIjowQ8w8CxqZOrgoc7dZgOU7csRBpJ8Qp XwqCbdeJMFNQXPGd6+z/3CyrU8g1IAnFcjFSPbUNOMUwmLmsvloD6mVhIG+b4t3vXa Qo/vh5hYZ98XQ== From: Will Deacon To: linux-kernel@vger.kernel.org Cc: Will Deacon , Ard Biesheuvel , Michael Ellerman , Thomas Gleixner , Benjamin Herrenschmidt , Christophe Leroy , Paul Mackerras , Jonathan Marek , Catalin Marinas , Andrew Morton , Mike Rapoport , Mark Rutland , Geert Uytterhoeven , Marc Zyngier , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 0/2] Fix arm64 boot regression in 5.14 Date: Tue, 20 Jul 2021 13:35:10 +0100 Message-Id: <20210720123512.8740-1-will@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi folks, Jonathan reports [1] that commit c742199a014d ("mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge") breaks the boot on arm64 when huge mappings are used to map the kernel linear map but the VA size is configured such that PUDs are folded. This is because the non-functional pud_set_huge() stub is used to create the linear map, which results in 1GB holes and a fatal data abort when the kernel attemps to access them. Digging further into the issue, it also transpired that huge-vmap is silently disabled in these configurations as well [2], despite working correctly in 5.13. The latter issue causes the pgtable selftests to scream due to a failing consistency check [3]. Rather than leave mainline in a terminally broken state for arm64 while we figure this out, revert the offending commit to get things working again. Unfortunately, reverting the change in isolation causes a build breakage for 32-bit PowerPC 8xx machines which recently started relying on the problematic stubs to support pte-level huge-vmap entries [4]. Since Christophe is away at the moment, this series first reverts the PowerPC 8xx change in order to avoid breaking the build. I would really like this to land for -rc3 and I can take these via the arm64 fixes queue if the PowerPC folks are alright with them. Cheers, Will [1] https://lore.kernel.org/r/20210717160118.9855-1-jonathan@marek.ca [2] https://lore.kernel.org/r/20210719104918.GA6440@willie-the-truck [3] https://lore.kernel.org/r/CAMuHMdXShORDox-xxaeUfDW3wx2PeggFSqhVSHVZNKCGK-y_vQ@mail.gmail.com/ [4] https://lore.kernel.org/r/8b972f1c03fb6bd59953035f0a3e4d26659de4f8.1620795204.git.christophe.leroy@csgroup.eu/ Cc: Ard Biesheuvel Cc: Michael Ellerman Cc: Thomas Gleixner Cc: Benjamin Herrenschmidt Cc: Christophe Leroy Cc: Paul Mackerras Cc: Jonathan Marek Cc: Catalin Marinas Cc: Andrew Morton Cc: Nicholas Piggin Cc: Mark Rutland Cc: Geert Uytterhoeven Cc: Marc Zyngier Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org --->8 Jonathan Marek (1): Revert "mm/pgtable: add stubs for {pmd/pub}_{set/clear}_huge" Will Deacon (1): Revert "powerpc/8xx: add support for huge pages on VMAP and VMALLOC" arch/arm64/mm/mmu.c | 20 ++++----- arch/powerpc/Kconfig | 2 +- arch/powerpc/include/asm/nohash/32/mmu-8xx.h | 43 -------------------- arch/x86/mm/pgtable.c | 34 +++++++--------- include/linux/pgtable.h | 26 +----------- 5 files changed, 25 insertions(+), 100 deletions(-) -- 2.32.0.402.g57bb445576-goog