From: quanyang.wang@windriver.com
To: Russell King <linux@armlinux.org.uk>,
Linus Walleij <linus.walleij@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ard Biesheuvel <ardb@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Quanyang Wang <quanyang.wang@windriver.com>
Subject: [PATCH] ARM: add BUILD_BUG_ON to check if fixmap range spans multiple pmds
Date: Wed, 20 Oct 2021 13:49:42 +0800 [thread overview]
Message-ID: <20211020054942.1608637-1-quanyang.wang@windriver.com> (raw)
From: Quanyang Wang <quanyang.wang@windriver.com>
Not only the early fixmap range, but also the fixmap range should be
checked if it spans multiple pmds. When enabling CONFIG_DEBUG_HIGHMEM,
some systems which contain up to 16 CPUs will crash.
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
---
arch/arm/mm/mmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index a4e0060051070..57eed92073a4a 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -369,6 +369,8 @@ void __init early_fixmap_init(void)
*/
BUILD_BUG_ON((__fix_to_virt(__end_of_early_ioremap_region) >> PMD_SHIFT)
!= FIXADDR_TOP >> PMD_SHIFT);
+ BUILD_BUG_ON((__fix_to_virt(__end_of_fixmap_region) >> PMD_SHIFT)
+ != FIXADDR_TOP >> PMD_SHIFT);
pmd = fixmap_pmd(FIXADDR_TOP);
pmd_populate_kernel(&init_mm, pmd, bm_pte);
--
2.25.1
next reply other threads:[~2021-10-20 5:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-20 5:49 quanyang.wang [this message]
2021-10-24 21:44 ` Linus Walleij
2021-10-25 6:38 ` Quanyang Wang
2021-10-26 8:59 ` Russell King (Oracle)
2021-10-26 9:53 ` Quanyang Wang
2021-10-26 10:12 ` Ard Biesheuvel
2021-10-26 10:38 ` Quanyang Wang
2021-10-26 10:54 ` Russell King (Oracle)
2021-10-26 10:56 ` Ard Biesheuvel
2021-10-26 11:15 ` Russell King (Oracle)
2021-10-26 11:26 ` Ard Biesheuvel
2021-10-26 11:29 ` Russell King (Oracle)
2021-10-31 18:12 ` kernel test robot
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=20211020054942.1608637-1-quanyang.wang@windriver.com \
--to=quanyang.wang@windriver.com \
--cc=ardb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®