From patchwork Fri May 6 06:01:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 12840596 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 72337C433EF for ; Fri, 6 May 2022 06:17:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=V+weirgJOU19yHPv489rbT2BTWkDszdy3abVbnVufyw=; b=wNKqIDy3q7gJOL ajAfnrr9GInD+OlSQrOxGNOCYYqWvWvofw7IAnwLZ9wAJEVWcKJ6CSbDD4gVP7yYeSVqgxl91rv0S kSWTgmqnO5DolnBhfb4CPdnb8jrnqD3N6ybcpgW1OyHWhsDG3Pxm771oOXpdwYz5UxnuwodCtiqer czLiOg15SV0IDiRkpDRMgdrZRlkyZCgqI/uy5C5wFV37FifImJMOCRkrOGLvg8smsWSK1X7noLzLr 3rlxf5aGm4WO7aZkdc315+MEGTpXxHysUBt+zH58LI0PrUPuYX2jPQ1/VlaeA4ivN5k77yVcUnhai /LniGRHinTpzhspMehmw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmrFk-001YUA-DO; Fri, 06 May 2022 06:15:48 +0000 Received: from mail-ve1eur02on0721.outbound.protection.outlook.com ([2a01:111:f400:fe06::721] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmrFh-001YSi-CW for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 06:15:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j9TH530hMOko4y+a3OZixMLL4FSUZTCGFVxsekcbEMpMBv24cmxpAs9+46/Ufve5cme+FAGrvm+6TgGmLHimymN1NelysnQYG/QMEGQYIOUJtmh3/HV/K5qbNaDVo5tTJ7JCKsuEPgvrZt5/pAn1rOHDtzx+3+ZRIy7KPCD1G5nxvYHia/QYfYqC3/ts+3adckH/ytdgQckyzUAHcgtSqZyk2dEAm5uHy9Tzo3LCPmPGoBYhY5YwaYU9bvOdxyRPYX55POv3xkTSrHhGKMcaQm5mMteX1/xAHzSaB9fWumUYsE/BlJEID6NwJTFJ2MM9GFiuS+nk1KFltO9pW2KbRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=El7Nc3mtKX+LWr3Br1RKEhRC/VMyrNOKCfkT1H7wHB4=; b=i3/IQ2t8UADmh/R/TUGJ0uWl8JvzTvFFGOcKj2/FGr3gGFiqFa07y66k+OXg89qzOPb/JZeuEp9XrxPzTKNCS+b/PXdwTX/4nSj8Gs2p6bJ5BssmhVOy/pkAockWmAjd17HOtcEmDrI1PyClHLQypkWrpGvHI7kJZXYcvBs9mRPKORfZWwPVoJrFOiL9b+vgqHdbWv13jD4sHWaHvJ6Jpawzx5SSVyM4gX3pRSOs9FFkow4keEH6prZUztS5sRNbXQK/jVxBL20BhyBmNlatIJem8kE4YdlVJ3izr9DvVAm+CqrljM6uIKg80zolrqvqHIs8FVkN3/ukJOzR5/beTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 131.228.2.8) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nokia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nokia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=El7Nc3mtKX+LWr3Br1RKEhRC/VMyrNOKCfkT1H7wHB4=; b=yqvyLYXpuZ31Ftm/2IBSSZJX6Fo3TYvjUBToUm8huS7OmAmhIQfHPn7dcmxePA3kveKkgmDz14zydeoCESeC5o01fGXV/xClQP8uKlXpThORMfsCIyk5tPsqJZzMiJP6ObbVDjVWGfL9MHsWrhknWLTF2/c/1VOKT9hzTooYnoc= Received: from DU2PR04CA0267.eurprd04.prod.outlook.com (2603:10a6:10:28e::32) by HE1PR0701MB2345.eurprd07.prod.outlook.com (2603:10a6:3:6c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.18; Fri, 6 May 2022 06:01:25 +0000 Received: from DBAEUR03FT012.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:28e:cafe::74) by DU2PR04CA0267.outlook.office365.com (2603:10a6:10:28e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.27 via Frontend Transport; Fri, 6 May 2022 06:01:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 131.228.2.8) smtp.mailfrom=nokia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nokia.com; Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.8 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.8; helo=fihe3nok0734.emea.nsn-net.net; Received: from fihe3nok0734.emea.nsn-net.net (131.228.2.8) by DBAEUR03FT012.mail.protection.outlook.com (100.127.142.126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.15 via Frontend Transport; Fri, 6 May 2022 06:01:24 +0000 Received: from ulegcparamis.emea.nsn-net.net (ulegcparamis.emea.nsn-net.net [10.151.74.146]) by fihe3nok0734.emea.nsn-net.net (GMO) with ESMTP id 24661GKm018644; Fri, 6 May 2022 06:01:16 GMT From: Alexander A Sverdlin To: kasan-dev@googlegroups.com Cc: Alexander Sverdlin , Russell King , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ARM: kasan: Support CONFIG_KASAN_VMALLOC Date: Fri, 6 May 2022 08:01:12 +0200 Message-Id: <20220506060113.14881-1-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.10.2 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 713b2b9f-6663-482e-3fe7-08da2f25da59 X-MS-TrafficTypeDiagnostic: HE1PR0701MB2345:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LCndEZ7kDQgrKM6WQIG7+/l6CITyedr4GCGis7nNQ8mUqgXk/w3rsgHZIDK8y9W/k5x8lxAUD6hxqBTBoCCGXH54oMSwNaMqL34N7j5O1Rl61yNtNjc75TDeX/H4by/O8ozeuPwmBJ/6QD6rIDDdsXCcfnx1r4UHCxzk3PVpGHw4H0PVu9JcMp4xdeFGUxl4HOlX8SjBGsND2sQUZOAihsELFWps1Ssqx2nTW8CIuSF2LOEwuautBHVbkpi5aFgI3hGygrtQYomL6cBPnJO9LzG1gXb85xWGMKUyfW/PjjzIq2dJmDCNbbx6Mwj4s3LkUC3lhtogAULkjz+yRytCBgjfMmQFt9SVc1ELeg8dmGtmoY1DHZzLTRdRx25bsUOfVUK6QjbudDtQn44QNweiru2MpF6BTyebu0NSL48vOmW6Lp1CDEI41l5VzdrtWvSM2IQId38BhVzleNXMnpVGANg7ZH3OkMfvaB7yVrPTkhPFErJ2/5j3m5QaWv+YBpP7qLY6lyqOGwbjWCkEZg5Mko8c/5YRqiBkDyRsYAgqzdRpb8bHTaOnsTEbvIhvbCw3RzhTvKqRFTdnsNg3YxGZadBMIESPPXPo6LKid4KPVnAvmGTHhiKmvFZr9wLoUlh3q2zlWv0h0PyDeDLkSekNuZvxSHZOBv4IAkvRo+nXYWH7CBXpIi2oqqKivL7O6vEoPt07OzfC79LERn5/Lc5u9PvESeol36M8NS1i+A8j/3B9eQlLnyHWPNPTyIQYcR15 X-Forefront-Antispam-Report: CIP:131.228.2.8; CTRY:FI; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:fihe3nok0734.emea.nsn-net.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(36756003)(26005)(82960400001)(81166007)(36860700001)(47076005)(336012)(83380400001)(2906002)(508600001)(40460700003)(5660300002)(86362001)(8936002)(186003)(316002)(2616005)(6666004)(356005)(82310400005)(70206006)(70586007)(8676002)(4326008)(6916009)(54906003)(1076003)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2022 06:01:24.8986 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 713b2b9f-6663-482e-3fe7-08da2f25da59 X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.8]; Helo=[fihe3nok0734.emea.nsn-net.net] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT012.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0701MB2345 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_231545_456510_A83985DE X-CRM114-Status: UNSURE ( 9.95 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Alexander Sverdlin Create KASAN mapping between VMALLOC_START and VMALLOC_END instead of early shadow if KASAN_VMALLOC is configured. Signed-off-by: Alexander Sverdlin --- arch/arm/Kconfig | 1 + arch/arm/mm/kasan_init.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 2e8091e..f440cf5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -75,6 +75,7 @@ config ARM select HAVE_ARCH_KFENCE if MMU && !XIP_KERNEL select HAVE_ARCH_KGDB if !CPU_ENDIAN_BE32 && MMU select HAVE_ARCH_KASAN if MMU && !XIP_KERNEL + select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN select HAVE_ARCH_MMAP_RND_BITS if MMU select HAVE_ARCH_PFN_VALID select HAVE_ARCH_SECCOMP diff --git a/arch/arm/mm/kasan_init.c b/arch/arm/mm/kasan_init.c index 5ad0d6c5..c2f49f7 100644 --- a/arch/arm/mm/kasan_init.c +++ b/arch/arm/mm/kasan_init.c @@ -236,7 +236,12 @@ void __init kasan_init(void) clear_pgds(KASAN_SHADOW_START, KASAN_SHADOW_END); - kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START), + if (IS_ENABLED(CONFIG_KASAN_VMALLOC)) + create_mapping((void *)VMALLOC_START, (void *)VMALLOC_END); + else + kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_START), + kasan_mem_to_shadow((void *)VMALLOC_END)); + kasan_populate_early_shadow(kasan_mem_to_shadow((void *)VMALLOC_END), kasan_mem_to_shadow((void *)-1UL) + 1); for_each_mem_range(i, &pa_start, &pa_end) { From patchwork Fri May 6 06:01:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Sverdlin X-Patchwork-Id: 12840591 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1E1A2C433F5 for ; Fri, 6 May 2022 06:02:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tIPSOEf14RcFGP3r4PHe0ZgjTqFTTYTDhaaiPx+Nc6o=; b=vlD/M5w3T+9ktl 0ze9wXxl7MVzlw4ne1TU8qJ3dR9nHHLHAVtv9cXKcGh4DGxwK//Csaa360rXc4m66TOc9EzHRhY/i CPNVaOadN4rVZTZ/35kL302pcac//n3u6iG1/QAsboL/siXJ+o6SCMjZdBTwmmApL+CK6aAbIx+5z 2kBFqb3tA10IUp5lkmoVmFWgVm1tlPxD8YBwqPkUoNH9ONwWCniq+Tck5OiiOV8SEdLKF4UL1L299 i4HxGg2cIHEJKSBhPGBG/7XdIlzkcAvsAtMQzEYa40fW4bXoJ34rsPSPrmL+a/Z19ytvTuETyCfVD 04NCkYvpikaCNrz2IQZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmr1v-001X5B-HP; Fri, 06 May 2022 06:01:31 +0000 Received: from mail-am6eur05on20705.outbound.protection.outlook.com ([2a01:111:f400:7e1b::705] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmr1r-001X4L-DM for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 06:01:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G61DInEOv2eEeuxmvw7aZas/y97RtQjE10UCQLLn9DTuJEWTEpBWfjfGV2JQRvyXpfswUg6zdYfRZ3bAFwjJQkiN86JxEnynOqGjJL3QhVR6mrb3zXg185F73fyO7souUPabsmASpWQ1+1ERcF0CJIqGr9dqbJIcyMFQYg6XZGY3qcmrrB/jFYmig+TSaqdUjTZ27Vcby83HNqImg4np8cs+n8akIk42hoGUJaTaHwjFCV97qnuk4tBonEZ4dDJICcOdohr3qfnYGVIjdV4wEsgeeQTI5KxLXfC+azSTFBAMp+5RDS+3CU1YoZtKZmvOJLyrGqk2fN4oYG1p6cOPig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cbriUybfpReIgm3SoMDo3ayAPM+zbPmOVTAUaWJ5WJk=; b=n15VzyxqNzf+y3K/zv682Q/yvhNVM7SicMkT7QiGcvF4hGHcHoo89pS8x9HP473oQYbv80VgXYJBSQ0r6RG43WqdDFMaoI5zf8CSqH/V9fFDINaxSeP9T21ixdC27fbmKIpzArFQrAy5GqCNn5bcQDHJBwATxEIZXB0tUd+BFgAnfgDjjAn0w8ogszMpDJiRW0lVtS4W5731nqlJtnsSpMW/QJL7ETrQ9pXCc6ZgHGJ7UMi6zfVigRFfHviS3UD5JJcwzkhO8jMGYAEStUT8L2ZpFP/u5WxVFxkPnizFK5ILT10VBAwoKD4vKmxV3YqE60oBGlKoule6rCWMGCDQIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 131.228.2.8) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nokia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nokia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cbriUybfpReIgm3SoMDo3ayAPM+zbPmOVTAUaWJ5WJk=; b=MOhkFsuNNzSZsgtIcdoAXPO1tAiyHuOgi+VCL/4FnwDw4LOEPJbv10smH17rP44r4yooNUCwvnqqa5llLa8eidZGp+AQucofMEWPrTSDm6CZtGahT/U798E6QPB1C1HNHIAPKLEqjh7F6ED3dRL4nK9zEw2AJ8aCbEpIJIM19yQ= Received: from DB7PR05CA0008.eurprd05.prod.outlook.com (2603:10a6:10:36::21) by AM0PR07MB4449.eurprd07.prod.outlook.com (2603:10a6:208:75::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.18; Fri, 6 May 2022 06:01:20 +0000 Received: from DBAEUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:36:cafe::4) by DB7PR05CA0008.outlook.office365.com (2603:10a6:10:36::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.27 via Frontend Transport; Fri, 6 May 2022 06:01:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 131.228.2.8) smtp.mailfrom=nokia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nokia.com; Received-SPF: Pass (protection.outlook.com: domain of nokia.com designates 131.228.2.8 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.8; helo=fihe3nok0734.emea.nsn-net.net; Received: from fihe3nok0734.emea.nsn-net.net (131.228.2.8) by DBAEUR03FT036.mail.protection.outlook.com (100.127.142.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.15 via Frontend Transport; Fri, 6 May 2022 06:01:20 +0000 Received: from ulegcparamis.emea.nsn-net.net (ulegcparamis.emea.nsn-net.net [10.151.74.146]) by fihe3nok0734.emea.nsn-net.net (GMO) with ESMTP id 24661GKn018644; Fri, 6 May 2022 06:01:17 GMT From: Alexander A Sverdlin To: kasan-dev@googlegroups.com Cc: Alexander Sverdlin , Russell King , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] ARM: kasan: Fix compatibility with ARM_MODULE_PLTS Date: Fri, 6 May 2022 08:01:13 +0200 Message-Id: <20220506060113.14881-2-alexander.sverdlin@nokia.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20220506060113.14881-1-alexander.sverdlin@nokia.com> References: <20220506060113.14881-1-alexander.sverdlin@nokia.com> X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 7de4f0e2-98d3-4c56-72bd-08da2f25d779 X-MS-TrafficTypeDiagnostic: AM0PR07MB4449:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S2DYiuXfkYQpAtZoe76SBLfw9+dFnXW61J7q6fc2o7a4KT+9LVexjiC7V+1SOH+6SPAE1uImu0mFQvqyM6Y0wuZ7KRi7pVg0u/6B0FmmNbk3WdB3bYSmaeepoRjmGhEoBNAAKpfLiggXa6Ic4DxEgaDhXH9fSNxiv4s1t8E//vk14ZHYnwBxXISjgNSMgbSTBXvLPblDHQECtgnJvqNVyj7O6wZOKmkX/GtffsubKM057n6QtuRY5Gb8bXHHZ8G5iI3vLVgYZ1uxCP1T5UEnwUNQXkB1Iq/lHFBEMpN//4KVlxnysAOPLgUT4plCNhV4OfEpRhc80lnt3plRpHJRr8K5lbVwuq47uTbizE+n7huLAP9YFNRrdb+EO5htPIOXMtbnn4OoLBa7+fXL4+aMAfWH/r5vht+mYo/alvygO5ACqJjRt3hzdqBUXEW8MfqVvrkVArBeiYIvZ2FpyKa+HCF8cHu8T1XIeZ5SKGSxEyS6TVo62YWnKQLulAhQ7Q1JoPrNLbqZHAbke4VT3mEnYQ45uw3ZPJHA8OUftIf5yx/a7eBV8WVAguhC0ajFGSKRWbCmSRpr9I9oRKZdCj1dejvp+BTf5E2uJdCtlYq4PtufK34ulBQ6YNiPWe3lpoUyaLN48aN21Crt5r0IbDKxTUyzHcAPvT5oyf2j/oAoEOvt16INL70PRgSi/ajPqeDVlUOJK9OVMYOnUsuVAzF5fQ0kI8JZ3/P1ouebn5U49lNql/zyMl3p570KkSskDwfiE5pKH3WmCWpuhPjlRjUAzw== X-Forefront-Antispam-Report: CIP:131.228.2.8; CTRY:FI; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:fihe3nok0734.emea.nsn-net.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(36860700001)(83380400001)(47076005)(2906002)(40460700003)(6666004)(336012)(82310400005)(70586007)(8676002)(4326008)(70206006)(356005)(8936002)(508600001)(36756003)(82960400001)(81166007)(316002)(6916009)(54906003)(1076003)(2616005)(186003)(5660300002)(26005)(86362001)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2022 06:01:20.0765 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7de4f0e2-98d3-4c56-72bd-08da2f25d779 X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.8]; Helo=[fihe3nok0734.emea.nsn-net.net] X-MS-Exchange-CrossTenant-AuthSource: DBAEUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB4449 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_230127_666357_4BFB8FBC X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Alexander Sverdlin Select KASAN_VMALLOC if KASAN && ARM_MODULE_PLT. Otherwise module load into vmalloc area crashes the kernel: Unable to handle kernel paging request at virtual address bce42b5c CPU: 1 PID: 454 Comm: systemd-udevd PC is at mmioset+0x7e/0xa0 LR is at kasan_unpoison_shadow+0x1b/0x24 Stack: (mmioset) from (kasan_unpoison_shadow+0x1b/0x24) (kasan_unpoison_shadow) from (__asan_register_globals+0x27/0x4c) (__asan_register_globals) from (do_init_module+0x13d/0x5b8) (do_init_module) from (load_module+0x6733/0x80f8) (load_module) from (sys_finit_module+0x119/0x140) (sys_finit_module) from (ret_fast_syscall+0x1/0x5a) Signed-off-by: Alexander Sverdlin --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f440cf5..d9d60a3 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1519,6 +1519,7 @@ config HW_PERF_EVENTS config ARM_MODULE_PLTS bool "Use PLTs to allow module memory to spill over into vmalloc area" depends on MODULES + select KASAN_VMALLOC if KASAN default y help Allocate PLTs when loading modules so that jumps and calls whose