lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210206083552.24394-3-lecopzer.chen@mediatek.com>
Date:   Sat, 6 Feb 2021 16:35:49 +0800
From:   Lecopzer Chen <lecopzer.chen@...iatek.com>
To:     <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
        <kasan-dev@...glegroups.com>,
        <linux-arm-kernel@...ts.infradead.org>, <will@...nel.org>
CC:     <dan.j.williams@...el.com>, <aryabinin@...tuozzo.com>,
        <glider@...gle.com>, <dvyukov@...gle.com>,
        <akpm@...ux-foundation.org>, <linux-mediatek@...ts.infradead.org>,
        <yj.chiang@...iatek.com>, <catalin.marinas@....com>,
        <ardb@...nel.org>, <andreyknvl@...gle.com>, <broonie@...nel.org>,
        <linux@...ck-us.net>, <rppt@...nel.org>,
        <tyhicks@...ux.microsoft.com>, <robin.murphy@....com>,
        <vincenzo.frascino@....com>, <gustavoars@...nel.org>,
        <lecopzer@...il.com>, Lecopzer Chen <lecopzer.chen@...iatek.com>
Subject: [PATCH v3 2/5] arm64: kasan: abstract _text and _end to KERNEL_START/END

Arm64 provides defined macro for KERNEL_START and KERNEL_END,
thus replace them by the abstration instead of using _text and _end.

Signed-off-by: Lecopzer Chen <lecopzer.chen@...iatek.com>
---
 arch/arm64/mm/kasan_init.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/mm/kasan_init.c b/arch/arm64/mm/kasan_init.c
index 20d06008785f..cd2653b7b174 100644
--- a/arch/arm64/mm/kasan_init.c
+++ b/arch/arm64/mm/kasan_init.c
@@ -218,8 +218,8 @@ static void __init kasan_init_shadow(void)
 	phys_addr_t pa_start, pa_end;
 	u64 i;
 
-	kimg_shadow_start = (u64)kasan_mem_to_shadow(_text) & PAGE_MASK;
-	kimg_shadow_end = PAGE_ALIGN((u64)kasan_mem_to_shadow(_end));
+	kimg_shadow_start = (u64)kasan_mem_to_shadow(KERNEL_START) & PAGE_MASK;
+	kimg_shadow_end = PAGE_ALIGN((u64)kasan_mem_to_shadow(KERNEL_END));
 
 	mod_shadow_start = (u64)kasan_mem_to_shadow((void *)MODULES_VADDR);
 	mod_shadow_end = (u64)kasan_mem_to_shadow((void *)MODULES_END);
@@ -240,7 +240,7 @@ static void __init kasan_init_shadow(void)
 	clear_pgds(KASAN_SHADOW_START, KASAN_SHADOW_END);
 
 	kasan_map_populate(kimg_shadow_start, kimg_shadow_end,
-			   early_pfn_to_nid(virt_to_pfn(lm_alias(_text))));
+			   early_pfn_to_nid(virt_to_pfn(lm_alias(KERNEL_START))));
 
 	kasan_populate_early_shadow(kasan_mem_to_shadow((void *)PAGE_END),
 				   (void *)mod_shadow_start);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ