Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3543035pxb; Mon, 24 Jan 2022 11:50:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrzJbgCgwVD0vMWY4yO10TltKtwHgmq7/OsdFgre8qEHNDkC7nnBTjdNV11N/YHoHdZC70 X-Received: by 2002:a17:902:74c7:b0:14a:e071:8ce3 with SMTP id f7-20020a17090274c700b0014ae0718ce3mr15630629plt.108.1643053831115; Mon, 24 Jan 2022 11:50:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643053831; cv=none; d=google.com; s=arc-20160816; b=ZDBXDYuhN22vXnYcjhxfemRh3csev5LG00+hLGqpe5kYjKI+yxalkA2/0gf7xi096d XvNltAUw17kBZkcWg+0bcCW2nlb3iWHSEbOjBhF0/2OQecqsG/82cTYyDtSxwjfX1PPc GVO3dOhT93MPgdnVjULLqgOXzFRTHsHQeqADtQTGSTehoAra1o1usfXIAppT3m1MzYma m9P2uqdYrR8EaGqKO4t7bbuGaNNQBXFjmBW50219g5VVep7cxG2a7GtHXCGWZhYrHD3i 07Hkt9PuzZZTU/FsCG/Xp6/P87MNmz3TckG4O5xrJJBgg75Aees8RuLXpOmMV0kVR6EM ntrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iNP88pCjnQrqi/xZg5Z3uUoNwPfihld579YonDiORFw=; b=WFwTsiomZHv96DoNctRuuVmk/nATfClrtyxQfVWTAuJLGjnY+wOvs6F0IIRBoPP29s YjOPEFVifIAIwYllPeOyEEFrAi5+L/60o4qlEk+HkapWOMuLgx8MGi7ENxDHDNNFjzI1 LSEikFU1/FG2vbtGSwM/zA4FNRTaUvEJ2WAEN5eYbX/8iA+a7UoqNz/W0cplsjyZP4Cx ortmQ6sy3X7c2m+JUXcTIHGUY1eF1S3ZailWk5IGgFRlYjHxyHly3ROUnF9nfYnwLTjh SH2nGRoqcnGUYW1ieNXTqExbd8nUksoICNIbMj1UrvzpUC9fBhQOdSRoEr40QIorWjgR 4mpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wHE5nEfz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x71si8322183pgd.523.2022.01.24.11.50.18; Mon, 24 Jan 2022 11:50:31 -0800 (PST) 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; dkim=pass header.i=@linux.dev header.s=key1 header.b=wHE5nEfz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244996AbiAXSIl (ORCPT + 99 others); Mon, 24 Jan 2022 13:08:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241561AbiAXSId (ORCPT ); Mon, 24 Jan 2022 13:08:33 -0500 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DF47C06173D for ; Mon, 24 Jan 2022 10:08:33 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1643047712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iNP88pCjnQrqi/xZg5Z3uUoNwPfihld579YonDiORFw=; b=wHE5nEfzV2Z4xHp+jp9YDlFb+5mvOKHRL3s+CepOxi4361G8mH6Zg8F1rA6ng6ENClWmTX sZlXt3qLm56Ela4HkNq00u8WUX0A791i536LJHFKZLgHpwUpGLlA57w2DthCQy1mtOpLlR r3rYg/lJEPcruLOZ2po2yt0Ifpb2woE= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, Vincenzo Frascino , Catalin Marinas , Will Deacon , Mark Rutland , linux-arm-kernel@lists.infradead.org, Peter Collingbourne , Evgenii Stepanov , linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH v6 37/39] arm64: select KASAN_VMALLOC for SW/HW_TAGS modes Date: Mon, 24 Jan 2022 19:05:11 +0100 Message-Id: <99d6b3ebf57fc1930ff71f9a4a71eea19881b270.1643047180.git.andreyknvl@google.com> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Konovalov Generic KASAN already selects KASAN_VMALLOC to allow VMAP_STACK to be selected unconditionally, see commit acc3042d62cb9 ("arm64: Kconfig: select KASAN_VMALLOC if KANSAN_GENERIC is enabled"). The same change is needed for SW_TAGS KASAN. HW_TAGS KASAN does not require enabling KASAN_VMALLOC for VMAP_STACK, they already work together as is. Still, selecting KASAN_VMALLOC still makes sense to make vmalloc() always protected. In case any bugs in KASAN's vmalloc() support are discovered, the command line kasan.vmalloc flag can be used to disable vmalloc() checking. Select KASAN_VMALLOC for all KASAN modes for arm64. Signed-off-by: Andrey Konovalov Acked-by: Catalin Marinas --- Changes v2->v3: - Update patch description. Changes v1->v2: - Split out this patch. --- arch/arm64/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 6978140edfa4..beefec5c7b90 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -205,7 +205,7 @@ config ARM64 select IOMMU_DMA if IOMMU_SUPPORT select IRQ_DOMAIN select IRQ_FORCED_THREADING - select KASAN_VMALLOC if KASAN_GENERIC + select KASAN_VMALLOC if KASAN select MODULES_USE_ELF_RELA select NEED_DMA_MAP_STATE select NEED_SG_DMA_LENGTH -- 2.25.1