Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 233947ef authored by Mark Rutland's avatar Mark Rutland Committed by Will Deacon
Browse files

arm64: memory: fix flipped VA space fallout



VA_START used to be the start of the TTBR1 address space, but now it's a
point midway though. In a couple of places we still use VA_START to get
the start of the TTBR1 address space, so let's fix these up to use
PAGE_OFFSET instead.

Fixes: 14c127c9 ("arm64: mm: Flip kernel VA space")
Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: default avatarSteve Capper <steve.capper@arm.com>
Reviewed-by: default avatarSteve Capper <steve.capper@arm.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent d0b3c32e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -400,7 +400,7 @@ void ptdump_check_wx(void)
		.check_wx = true,
	};

	walk_pgd(&st, &init_mm, VA_START);
	walk_pgd(&st, &init_mm, PAGE_OFFSET);
	note_page(&st, 0, 0, 0);
	if (st.wx_pages || st.uxn_pages)
		pr_warn("Checked W+X mappings: FAILED, %lu W+X pages found, %lu non-UXN pages found\n",
+1 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ static inline bool is_ttbr0_addr(unsigned long addr)
static inline bool is_ttbr1_addr(unsigned long addr)
{
	/* TTBR1 addresses may have a tag if KASAN_SW_TAGS is in use */
	return arch_kasan_reset_tag(addr) >= VA_START;
	return arch_kasan_reset_tag(addr) >= PAGE_OFFSET;
}

/*