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 X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CECE8C63697 for ; Mon, 23 Nov 2020 20:15:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3DFE020657 for ; Mon, 23 Nov 2020 20:15:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="ftOluYgs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DFE020657 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8F3B76B007D; Mon, 23 Nov 2020 15:15:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8A1F46B007E; Mon, 23 Nov 2020 15:15:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 71A596B0080; Mon, 23 Nov 2020 15:15:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0198.hostedemail.com [216.40.44.198]) by kanga.kvack.org (Postfix) with ESMTP id 40E346B007D for ; Mon, 23 Nov 2020 15:15:07 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DF11A1EE6 for ; Mon, 23 Nov 2020 20:15:06 +0000 (UTC) X-FDA: 77516787012.01.metal00_191503c27368 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id B3AFB1004A755 for ; Mon, 23 Nov 2020 20:15:06 +0000 (UTC) X-HE-Tag: metal00_191503c27368 X-Filterd-Recvd-Size: 4895 Received: from mail-qv1-f74.google.com (mail-qv1-f74.google.com [209.85.219.74]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Mon, 23 Nov 2020 20:15:05 +0000 (UTC) Received: by mail-qv1-f74.google.com with SMTP id 5so13766457qvk.3 for ; Mon, 23 Nov 2020 12:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=01BW1GkidBPog12oysmILVzISd/+h9nT3tAZwCe3eCQ=; b=ftOluYgsoGAOE5Ye/to9lLng+2ouMijOYaYtwma2Ox9E53wFC3jC7Nqa0GnHSc266v 7venxL4adfRnnuzv07o06M9sPHJt+dDW40FZqv8UC20VDOUHQgD11io/dJVACWzd5Crp NyCk5K3h5KXsbQg+rRlQ0KFgtBFOS94A1KVMBNcjTIUeRCkb113dfiZjpB1xcq3rtsuB zkGdOifa55a0nfyRYqdixyGXB6OXKvBSZu5bw11Vg4HhJQoZ7veWEiiF3/bcJyIsl+06 NXpZUiOOOis3fhzxBKjaSCZNXCdhA3reqMwAszBN4vudp7UH4LMtCP4gOnylYl/ep3ys oIDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=01BW1GkidBPog12oysmILVzISd/+h9nT3tAZwCe3eCQ=; b=AT+lr4U47ZmJJMtCOV8ObXfxAjo9lL1MQndc1BK7YoMrs2jsd0NipAF14ts0CAvpCC 1doi4r4pAtnMAsnl5s+9OTG2b2/ngjLfDkbhR4Fy7P6GHpSXFHYue3t5rkgv9eFpI2tp hRe2nBAAdPjrQDx+cfI5j0JdLGe0LyvT8VXLhazWSHkwDlcReUIhUkJT4qnZXYnmTmzg Lw/Y7XwezB9zGg4Zn3FxSBkjMAzm+siTCcB0/dvLs4+8tL4O0oN4uCeHS1RyCbXaGOVi 5NFYY4MPB0ziLyaPTzbeqQQeEQbPFIKrGtygJn5qECutP6M3o3VwyQJUKOScFonJuyKN mzjw== X-Gm-Message-State: AOAM531VkpiZ1oDIBW3+UADpGHkZ/y5V2czIj155qDV2w8rfyYlAw/4k 4Q34OqPa8bY43cXIzq8Z5BznsX9Opt5u0Xxh X-Google-Smtp-Source: ABdhPJxJLu3lTiGvBa9uPDvK6XDnw+JLdTht9mXTq7OHyNsPd/2Yeymonl71MNmRULVBzyGWvGUs9Gqp+tGli6N/ X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a0c:804a:: with SMTP id 68mr1169751qva.1.1606162505149; Mon, 23 Nov 2020 12:15:05 -0800 (PST) Date: Mon, 23 Nov 2020 21:14:35 +0100 In-Reply-To: Message-Id: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.454.gaff20da3a2-goog Subject: [PATCH mm v4 05/19] kasan: allow VMAP_STACK for HW_TAGS mode From: Andrey Konovalov To: Andrew Morton Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Dmitry Vyukov , Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Even though hardware tag-based mode currently doesn't support checking vmalloc allocations, it doesn't use shadow memory and works with VMAP_STACK as is. Change VMAP_STACK definition accordingly. Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Acked-by: Catalin Marinas Reviewed-by: Dmitry Vyukov Link: https://linux-review.googlesource.com/id/I3552cbc12321dec82cd7372676e9372a2eb452ac --- arch/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 762096e4ec16..6092102b29e9 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -955,16 +955,16 @@ config VMAP_STACK default y bool "Use a virtually-mapped stack" depends on HAVE_ARCH_VMAP_STACK - depends on !KASAN || KASAN_VMALLOC + depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC help Enable this if you want the use virtually-mapped kernel stacks with guard pages. This causes kernel stack overflows to be caught immediately rather than causing difficult-to-diagnose corruption. - To use this with KASAN, the architecture must support backing - virtual mappings with real shadow memory, and KASAN_VMALLOC must - be enabled. + To use this with software KASAN modes, the architecture must support + backing virtual mappings with real shadow memory, and KASAN_VMALLOC + must be enabled. config ARCH_OPTIONAL_KERNEL_RWX def_bool n -- 2.29.2.454.gaff20da3a2-goog