From patchwork Tue Nov 10 22:20:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 11895647 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 44C561391 for ; Tue, 10 Nov 2020 22:20:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ED6D9206B2 for ; Tue, 10 Nov 2020 22:20:44 +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="anCq4Edn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED6D9206B2 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 C4CA56B0080; Tue, 10 Nov 2020 17:20:43 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B873F6B0081; Tue, 10 Nov 2020 17:20:43 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A01786B0082; Tue, 10 Nov 2020 17:20:43 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) by kanga.kvack.org (Postfix) with ESMTP id 67D6E6B0080 for ; Tue, 10 Nov 2020 17:20:43 -0500 (EST) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0CCE0362B for ; Tue, 10 Nov 2020 22:20:43 +0000 (UTC) X-FDA: 77469929166.29.scene63_56160ed272f8 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id DB9CD180868DA for ; Tue, 10 Nov 2020 22:20:42 +0000 (UTC) X-Spam-Summary: 1,0,0,87c55b4d637feb5c,d41d8cd98f00b204,3obkrxwokca0n0q4rbx08yt11tyr.p1zyv07a-zzx8npx.14t@flex--andreyknvl.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:967:973:988:989:1042:1260:1277:1313:1314:1345:1359:1431:1437:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2559:2563:2682:2685:2859:2902:2911:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3152:3352:3865:3867:3868:3871:3872:3873:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4250:4321:4425:5007:6261:6653:6742:9025:9969:10004:10400:11026:11232:11473:11658:11914:12043:12296:12297:12438:12555:12679:12895:12986:13069:13311:13357:14096:14097:14181:14394:14659:14721:21080:21365:21444:21451:21627:21740:21772:21939:30054:30070:30091,0,RBL:209.85.167.73:@flex--andreyknvl.bounces.google.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100;04y8ezmfrix9x3h9m89ok9zf9umnpypikdzaokjtrqt7r6qqmrszyfjiqifww15.k4tbe5s5gqhexrducakjrey48kp7qjqocth95j47r36k7rgc4nzwutekxjxuhog.1- lbl8.mai X-HE-Tag: scene63_56160ed272f8 X-Filterd-Recvd-Size: 4749 Received: from mail-lf1-f73.google.com (mail-lf1-f73.google.com [209.85.167.73]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Nov 2020 22:20:42 +0000 (UTC) Received: by mail-lf1-f73.google.com with SMTP id 64so78650lfk.15 for ; Tue, 10 Nov 2020 14:20:42 -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=iclGPRxOEu/Y72cezYx1VmP9mDKpdmhcr9SlAN2oUkA=; b=anCq4EdnMSfYibAYpKrbP8hc679KEJvqPcdaN5/ex3VCos1k3cAadzjksNjGffBqyb 9lgrUg03iHa8hf4SaVEeE+mhD1mCHcljJ1Z7Ec/ZghnpiPfwDV4+tZOz03wyyuzCkWN9 T4v3wHx6wv0e4wpOUdjnOJR7SC5EgpvpDGy+L1000n3KvhEK62jVSzkseAUDrGlOW3r0 g8ZvAhT1g1U4eFHzE8Pxdb2eONP3u7u7CYSfsjuF0yjCdSWIeOtzbawwk3RpvEMvyPf3 Z/XsxkAcX/vePoc584Itp3epvSDKWY3tEZhC9BFnXQ7YFDQwHJPCHiGaCKIKNknphdDi D6Ww== 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=iclGPRxOEu/Y72cezYx1VmP9mDKpdmhcr9SlAN2oUkA=; b=OiVQxxPWyqjl7RpphZatmogxL8fQ5qmlwG+g+n+aVMvEtSZhrxTGDsdMBbiA2/Yu3N P1CnZt0tKySj6qz8QmY+KNp4EK31u+5jEG/1CY+ePgdxMdeiHWvxPGc8bwjFdUOMwn/G dZUcDKxijJLMP5OWLcwmxR+ZhncupKnkvGjsU9Okj1xEhVUl036ShCxlTA4Y5KIvty0m lRNLaMVNB+R1ev44c1oMXl2vdnPzDp6k/e30ZbCKND8qsb+6AEITv/liTCBe3mV71Ab8 t1NXrgpY/XmMumI3TZNo3D7+tZUnFaRPkEshazjMsP6Ny7rtwLYyABjKDKMLo+0N4qhT OAGA== X-Gm-Message-State: AOAM531p+EOPAcDCQvBSG1repYqyq2vtq0JkOiRpjpVIujGX0WZDVsZI EO6Qajxt2PC4g+r9aOPKZ7Fj1DDjTYOV1dbe X-Google-Smtp-Source: ABdhPJz/vW2PmB5nvPRSNdQS5v8e1QIaJCbChgmywQIwIw3qCBt2wYADSNx1GYS36rwbNkkvrKv/2+gFZwdZs5i0 X-Received: from andreyknvl3.muc.corp.google.com ([2a00:79e0:15:13:7220:84ff:fe09:7e9d]) (user=andreyknvl job=sendgmr) by 2002:a2e:320c:: with SMTP id y12mr9612197ljy.362.1605046840773; Tue, 10 Nov 2020 14:20:40 -0800 (PST) Date: Tue, 10 Nov 2020 23:20:09 +0100 In-Reply-To: Message-Id: <3443e106c40799e5dc3981dec2011379f3cbbb0c.1605046662.git.andreyknvl@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog Subject: [PATCH v2 05/20] kasan: allow VMAP_STACK for HW_TAGS mode From: Andrey Konovalov To: Dmitry Vyukov , Alexander Potapenko , Marco Elver Cc: Catalin Marinas , Will Deacon , Vincenzo Frascino , Evgenii Stepanov , Andrey Ryabinin , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov 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 Link: https://linux-review.googlesource.com/id/I3552cbc12321dec82cd7372676e9372a2eb452ac Reviewed-by: Marco Elver Acked-by: Catalin Marinas --- arch/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 56b6ccc0e32d..7e7d14fae568 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -914,16 +914,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