[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210110131500.12378-1-liuhailongg6@163.com>
Date: Sun, 10 Jan 2021 21:15:00 +0800
From: Hailong Liu <liuhailongg6@....com>
To: Andrey Ryabinin <aryabinin@...tuozzo.com>, linus.walleij@...aro.org
Cc: Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Russell King <linux@...linux.org.uk>,
kasan-dev@...glegroups.com, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, liuhailongg6@....com,
Hailong Liu <liu.hailong6@....com.cn>
Subject: [PATCH] arm/kasan: kasan_alloc a more precise size for pte
From: Hailong Liu <liu.hailong6@....com.cn>
The *PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE* may be a more accurate and
meaningful size for PTE tables than *PAGE_SIZE* when populating the
PMD entries for arm.
Signed-off-by: Hailong Liu <liu.hailong6@....com.cn>
---
arch/arm/mm/kasan_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/kasan_init.c b/arch/arm/mm/kasan_init.c
index 9c348042a724..c2a697704d6c 100644
--- a/arch/arm/mm/kasan_init.c
+++ b/arch/arm/mm/kasan_init.c
@@ -99,7 +99,7 @@ static void __init kasan_pmd_populate(pud_t *pudp, unsigned long addr,
* allocated.
*/
void *p = early ? kasan_early_shadow_pte :
- kasan_alloc_block(PAGE_SIZE);
+ kasan_alloc_block(PTE_HWTABLE_OFF + PTE_HWTABLE_SIZE);
if (!p) {
panic("%s failed to allocate shadow block for address 0x%lx\n",
--
2.17.1
Powered by blists - more mailing lists