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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECC5CC433F5 for ; Sun, 27 Feb 2022 13:48:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231229AbiB0Nsy (ORCPT ); Sun, 27 Feb 2022 08:48:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231219AbiB0Nsw (ORCPT ); Sun, 27 Feb 2022 08:48:52 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 761882DC9 for ; Sun, 27 Feb 2022 05:48:11 -0800 (PST) X-UUID: 1b39c2a6e4e84b62879c77927a8e5592-20220227 X-UUID: 1b39c2a6e4e84b62879c77927a8e5592-20220227 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 344440268; Sun, 27 Feb 2022 21:48:01 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Sun, 27 Feb 2022 21:48:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sun, 27 Feb 2022 21:48:00 +0800 From: Lecopzer Chen To: , CC: , , , , , , , , , , , , , , , , , Subject: [PATCH v3 0/2] arm: kasan: support CONFIG_KASAN_VMALLOC Date: Sun, 27 Feb 2022 21:47:24 +0800 Message-ID: <20220227134726.27584-1-lecopzer.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the framework of KASAN_VMALLOC is well-developed, It's easy to support for ARM that simply not to map shadow of VMALLOC area on kasan_init. Since the virtual address of vmalloc for Arm is also between MODULE_VADDR and 0x100000000 (ZONE_HIGHMEM), which means the shadow address has already included between KASAN_SHADOW_START and KASAN_SHADOW_END. Thus we need to change nothing for memory map of Arm. This can fix ARM_MODULE_PLTS with KASan, support KASan for higmem and provide the first step to support CONFIG_VMAP_STACK with Arm. Test on 1. Qemu with memory 2G and vmalloc=500M for 3G/1G mapping. 2. Qemu with memory 2G and vmalloc=500M for 3G/1G mapping + LPAE. 3. Qemu with memory 2G and vmalloc=500M for 2G/2G mapping. v3: rebase on 5.17-rc5. Add simple doc for "arm: kasan: support CONFIG_KASAN_VMALLOC" Tweak commit message. v2: rebase on 5.17-rc3 Lecopzer Chen (2): arm: kasan: support CONFIG_KASAN_VMALLOC arm: kconfig: fix MODULE_PLTS for KASAN with KASAN_VMALLOC arch/arm/Kconfig | 2 ++ arch/arm/include/asm/kasan_def.h | 11 ++++++++++- arch/arm/mm/kasan_init.c | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) -- 2.25.1