Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp754258pxf; Wed, 24 Mar 2021 15:22:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLMggnto9zTogC65jL/WB/nXd3EmUhsORk/NI2ZlwpDLHsd9RClqHJYBPTx3OJdP4xFiEf X-Received: by 2002:a17:906:b846:: with SMTP id ga6mr6003883ejb.542.1616624554777; Wed, 24 Mar 2021 15:22:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616624554; cv=none; d=google.com; s=arc-20160816; b=hYKpKm7GQ1IDRw57GfpmF6pBa4nAPw9bDvqTQSvkVYOi4PTnOwg+S63WZlpR2AsRD5 EWtdiNqUkpKGJD90W4cmbwk82vdp7N3+WWb2qFclstg3+YozkefVunX9NWj+5xxtO8Mk BcNH5qYRiGtJ9w1pb+jXW6p//1Zqd5Ef1xDmPNqFXmanIsv8MX4LyvMXpYqmR0DT1AeV 2PDkBBVbEgKOU6WkiwwTf2OcwSp64mm7eUJxgld32j7SB8TBLOmYFMgXffMfb8RItmDs mj5M885rOE60Wm2tlWyqhetKdhDigbDT+OpMicKVnxTxYDC6Dw0qHh3Tw21hUPYtqIql Dygw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=jSA8u/XdlzgiyDM6T56sL9revISGzQ4wwNouayQ6oF4=; b=SOMCrXaH4cqCr4fst6cDBloRTCZI2yTslZ7KUihWyYAwkWrZ/z8Bo6t0juOJ8HdE40 Qg7ne2xQzOcoPvDjJ2POgQ8ActjdNVgQIoKpDaB7plvmIz1DLR+udtJ+8/w6dm8IAGlo OSaoQDoCfPl9JRmxz2YC5oUYPBvEIi1+64XpiwTzYiE+YDjB5ULFzEQLOO2g6O4/AD/V 5CNjZ5RmWueUI87f6ggXdSs6W5JdgXqc7WyowflsB/H9Pn7mhZTkrXo3ppGAFTPUO6Oh lTreFvn+tgQuClkSmoyrpuXWv2AU4nKVskRYMTbpwLyAT0V5mECzDqOEj4DjB0tLHuUd zsgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c18si2663651ejr.332.2021.03.24.15.22.11; Wed, 24 Mar 2021 15:22:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230415AbhCXEF7 (ORCPT + 99 others); Wed, 24 Mar 2021 00:05:59 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:33263 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229957AbhCXEFi (ORCPT ); Wed, 24 Mar 2021 00:05:38 -0400 X-UUID: e34170eaa28946bdbf56de68a9d3745c-20210324 X-UUID: e34170eaa28946bdbf56de68a9d3745c-20210324 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 979377580; Wed, 24 Mar 2021 12:05:35 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 24 Mar 2021 12:05:33 +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; Wed, 24 Mar 2021 12:05:33 +0800 From: Lecopzer Chen To: , , , , CC: , , , , , , , , , , , Lecopzer Chen Subject: [PATCH v4 5/5] arm64: Kconfig: select KASAN_VMALLOC if KANSAN_GENERIC is enabled Date: Wed, 24 Mar 2021 12:05:22 +0800 Message-ID: <20210324040522.15548-6-lecopzer.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210324040522.15548-1-lecopzer.chen@mediatek.com> References: <20210324040522.15548-1-lecopzer.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: A3457C077D10D4C7DD6B3D9223F0B41AFC95665282A9E44F390A034C7FB65A4C2000:8 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Before this patch, someone who wants to use VMAP_STACK when KASAN_GENERIC enabled must explicitly select KASAN_VMALLOC. From Will's suggestion [1]: > I would _really_ like to move to VMAP stack unconditionally, and > that would effectively force KASAN_VMALLOC to be set if KASAN is in use Because VMAP_STACK now depends on either HW_TAGS or KASAN_VMALLOC if KASAN enabled, in order to make VMAP_STACK selected unconditionally, we bind KANSAN_GENERIC and KASAN_VMALLOC together. Note that SW_TAGS supports neither VMAP_STACK nor KASAN_VMALLOC now, so this is the first step to make VMAP_STACK selected unconditionally. Bind KANSAN_GENERIC and KASAN_VMALLOC together is supposed to cost more memory at runtime, thus the alternative is using SW_TAGS KASAN instead. [1]: https://lore.kernel.org/lkml/20210204150100.GE20815@willie-the-truck/ Suggested-by: Will Deacon Signed-off-by: Lecopzer Chen --- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 3e54fa938234..07762359d741 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -195,6 +195,7 @@ config ARM64 select IOMMU_DMA if IOMMU_SUPPORT select IRQ_DOMAIN select IRQ_FORCED_THREADING + select KASAN_VMALLOC if KASAN_GENERIC select MODULES_USE_ELF_RELA select NEED_DMA_MAP_STATE select NEED_SG_DMA_LENGTH -- 2.25.1