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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 B611FC56201 for ; Thu, 12 Nov 2020 01:37:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 504082076E for ; Thu, 12 Nov 2020 01:37:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="d5XFm+nA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729134AbgKLBhW (ORCPT ); Wed, 11 Nov 2020 20:37:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728053AbgKLAYO (ORCPT ); Wed, 11 Nov 2020 19:24:14 -0500 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C034C0613D1 for ; Wed, 11 Nov 2020 16:24:14 -0800 (PST) Received: by mail-pl1-x644.google.com with SMTP id x15so1866549pll.2 for ; Wed, 11 Nov 2020 16:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c/7uKp3kPU+6BPx3Z+SeH1/mQzwr6aT8nYVy2fS4R+I=; b=d5XFm+nAwxDiZJfOuHrbmay0x2G6YIjmHqsJkjPH4Sa9HYCRQv5IyztXPCSZqfh9Yw 679KGx0hlsmP3y99PKrn+VEIjpbVo4rjueN6Evg7X8w0/kkh85OlXnO8u+g9HpTf8HVi ts4I0Z2GIjvy/8z55qexA10hhM9TE60a6Bsgomyh3ORtbZCjzyiKcKQDlZaSgeBFjEAP fghegnsaPftDVrAoOxFa6Dtvs7hTxvAVs2yWTy7BiGXbOpOAPs+iE4M8jZBijbSvkxbj aHFLazgMiK9w6A+NSS/DPscD6fLpdPUTMZ3mUUd2lpkyGwYtAsqDCBMG018l/uSJ+74y jgew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c/7uKp3kPU+6BPx3Z+SeH1/mQzwr6aT8nYVy2fS4R+I=; b=mX+086BSwWTdxEYtEVZD459gNsUX69Cc1/HWc584buIRf7oPxG61wrzYt41RdG/Xk0 dnbZBUQlNhxdlG5I4Om130A+0r/S70M8f4ZYPdn7jtTDYyWM/g5HIHEl9ysHLUIzPCLk NUrcgbVAm6WLkrifPdNnd1PYQ/7/6THfv31/J3Wylmi945lFFRHfeOfkgjeicBFKja63 y5D+4TWEICi6QgmMRm1iY6j9/AxMD7OYU8BDj3x/htXCqFFgYQTvewqgOsI/2hz+dyMo wMznHe3bwYS1HikKMWcvql9I0SvWH4G7T2QJT8YeIrimNF7fjb0R9O5FGogqAkup7ns/ gyGA== X-Gm-Message-State: AOAM531E1UxC7L3f3xyUFylgxI9OgSarUiQI0Z6VHLZnFux/IbR2lhtb Mq4L3NvECsJ3GHjTjmTN8v3Wj8+6IFoIEcAMiBtj9g== X-Google-Smtp-Source: ABdhPJy+k0LGlBo1IZsQsrfPTKk9qsGvbmN8WMtLliu0P+kZNZHNe3D7VuRZiIk5rzJNbcPUoVAPBv8KQYaOTj3JCbs= X-Received: by 2002:a17:902:d90d:b029:d6:ecf9:c1dd with SMTP id c13-20020a170902d90db02900d6ecf9c1ddmr23089538plz.13.1605140653446; Wed, 11 Nov 2020 16:24:13 -0800 (PST) MIME-Version: 1.0 References: <3443e106c40799e5dc3981dec2011379f3cbbb0c.1605046662.git.andreyknvl@google.com> <20201111162051.GG517454@elver.google.com> In-Reply-To: <20201111162051.GG517454@elver.google.com> From: Andrey Konovalov Date: Thu, 12 Nov 2020 01:24:02 +0100 Message-ID: Subject: Re: [PATCH v2 05/20] kasan: allow VMAP_STACK for HW_TAGS mode To: Marco Elver Cc: Dmitry Vyukov , Alexander Potapenko , Catalin Marinas , Will Deacon , Vincenzo Frascino , Evgenii Stepanov , Andrey Ryabinin , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 11, 2020 at 5:20 PM Marco Elver wrote: > > On Tue, Nov 10, 2020 at 11:20PM +0100, Andrey Konovalov wrote: > > 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 > > --- > > Shouldn't this be in the other series? I don't think it makes much difference considering the series will go in together. > > FWIW, > > Reviewed-by: Marco Elver Thanks! > > > 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 > > -- > > 2.29.2.222.g5d2a92d10f8-goog > > 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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 70749C388F9 for ; Thu, 12 Nov 2020 00:24:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9454E207BB for ; Thu, 12 Nov 2020 00:24:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="d5XFm+nA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9454E207BB 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 BF8806B0036; Wed, 11 Nov 2020 19:24:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B81AB6B005D; Wed, 11 Nov 2020 19:24:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2D7D6B0068; Wed, 11 Nov 2020 19:24:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id 72AC46B0036 for ; Wed, 11 Nov 2020 19:24:15 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 1F5988249980 for ; Thu, 12 Nov 2020 00:24:15 +0000 (UTC) X-FDA: 77473869270.08.error23_4c0846727302 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id F08A91819E764 for ; Thu, 12 Nov 2020 00:24:14 +0000 (UTC) X-HE-Tag: error23_4c0846727302 X-Filterd-Recvd-Size: 5264 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Thu, 12 Nov 2020 00:24:14 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id d17so341370plr.5 for ; Wed, 11 Nov 2020 16:24:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c/7uKp3kPU+6BPx3Z+SeH1/mQzwr6aT8nYVy2fS4R+I=; b=d5XFm+nAwxDiZJfOuHrbmay0x2G6YIjmHqsJkjPH4Sa9HYCRQv5IyztXPCSZqfh9Yw 679KGx0hlsmP3y99PKrn+VEIjpbVo4rjueN6Evg7X8w0/kkh85OlXnO8u+g9HpTf8HVi ts4I0Z2GIjvy/8z55qexA10hhM9TE60a6Bsgomyh3ORtbZCjzyiKcKQDlZaSgeBFjEAP fghegnsaPftDVrAoOxFa6Dtvs7hTxvAVs2yWTy7BiGXbOpOAPs+iE4M8jZBijbSvkxbj aHFLazgMiK9w6A+NSS/DPscD6fLpdPUTMZ3mUUd2lpkyGwYtAsqDCBMG018l/uSJ+74y jgew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c/7uKp3kPU+6BPx3Z+SeH1/mQzwr6aT8nYVy2fS4R+I=; b=XNPg07tvIjP8i8rkZr8Yyy8FgtNx4QegpmrEjXWwIf9getxbCo9UPT+Cm+fH6NdgWY 7+SbS2ww6HUlwp5FQhiCh92CwSXKn6TMmPIN3vhWRTcIK/RVLQZWnrSsO1N+hbMkYaPf 2pnVHIVV0BgF+8GmAChSr4gItfHfM6gtyvjnE7LG+3xy/R8Eu+hvTIUQi5WXSJvMHAOH LA3rAjztjh8LqdKVsXfzUbtpwOeNc2Sd51GUn30Rdr6m81jHlYeQM0UDE5wKngf3qXWy pH4OuBfJy1e/PCnFOA6tDT0KoC8eQPTG9ABGFjCp3UPmiFqUPJZYiWdFFVs5FlMw9P6M QecQ== X-Gm-Message-State: AOAM533lyDWXW6vg22fSEUIPt7VDKfbB8+CJK8YDWQXjzswjeOHfxxMv tB/TXh94gJ2fgieFPxUIRakAJhQbyGujubcsXt3Ayw== X-Google-Smtp-Source: ABdhPJy+k0LGlBo1IZsQsrfPTKk9qsGvbmN8WMtLliu0P+kZNZHNe3D7VuRZiIk5rzJNbcPUoVAPBv8KQYaOTj3JCbs= X-Received: by 2002:a17:902:d90d:b029:d6:ecf9:c1dd with SMTP id c13-20020a170902d90db02900d6ecf9c1ddmr23089538plz.13.1605140653446; Wed, 11 Nov 2020 16:24:13 -0800 (PST) MIME-Version: 1.0 References: <3443e106c40799e5dc3981dec2011379f3cbbb0c.1605046662.git.andreyknvl@google.com> <20201111162051.GG517454@elver.google.com> In-Reply-To: <20201111162051.GG517454@elver.google.com> From: Andrey Konovalov Date: Thu, 12 Nov 2020 01:24:02 +0100 Message-ID: Subject: Re: [PATCH v2 05/20] kasan: allow VMAP_STACK for HW_TAGS mode To: Marco Elver Cc: Dmitry Vyukov , Alexander Potapenko , Catalin Marinas , Will Deacon , Vincenzo Frascino , Evgenii Stepanov , Andrey Ryabinin , Branislav Rankov , Kevin Brodsky , Andrew Morton , kasan-dev , Linux ARM , Linux Memory Management List , LKML 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: On Wed, Nov 11, 2020 at 5:20 PM Marco Elver wrote: > > On Tue, Nov 10, 2020 at 11:20PM +0100, Andrey Konovalov wrote: > > 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 > > --- > > Shouldn't this be in the other series? I don't think it makes much difference considering the series will go in together. > > FWIW, > > Reviewed-by: Marco Elver Thanks! > > > 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 > > -- > > 2.29.2.222.g5d2a92d10f8-goog > > 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=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 83E36C388F9 for ; Thu, 12 Nov 2020 00:25:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F066B207BB for ; Thu, 12 Nov 2020 00:25:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a5UPZmq9"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="d5XFm+nA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F066B207BB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7hf2yIAF/zKa4P1OleH7lJ/138psyMGOis4pnS1GGmQ=; b=a5UPZmq9vcqNq1oATfXU9KL9A YxOKoa5jzU5gRS2k0OEc+N4LWgDQS54QpJfQHOeAq2Hq8g7/k51AJb5m0eceQpzg3VNs9o2CukN4I 4CNI55jLgfoYC0508PBVfiwrqhPH8lDlGNaiuNX2PWU7tD1G3BmAqGDUk+nAcUH7pK0ki5t0IUo5W pL0ce2cQaZwQLMRE6BjaUUA9R8XAIaU+GxXGwYGtScTIuR6YMYJ197QkMW2N8IkiD40Ggf9XRZkJ4 Um4bMbvcU8U9zJcInwSvBqa2oe6P038RGGKod+oevnG0+5iOTJUvHuvStqfhIH/bLtl0E5FsrRGHR DvVu38wUQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd0PW-0002OZ-EM; Thu, 12 Nov 2020 00:24:22 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd0PP-0002Na-Ib for linux-arm-kernel@lists.infradead.org; Thu, 12 Nov 2020 00:24:16 +0000 Received: by mail-pl1-x643.google.com with SMTP id d3so1861539plo.4 for ; Wed, 11 Nov 2020 16:24:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c/7uKp3kPU+6BPx3Z+SeH1/mQzwr6aT8nYVy2fS4R+I=; b=d5XFm+nAwxDiZJfOuHrbmay0x2G6YIjmHqsJkjPH4Sa9HYCRQv5IyztXPCSZqfh9Yw 679KGx0hlsmP3y99PKrn+VEIjpbVo4rjueN6Evg7X8w0/kkh85OlXnO8u+g9HpTf8HVi ts4I0Z2GIjvy/8z55qexA10hhM9TE60a6Bsgomyh3ORtbZCjzyiKcKQDlZaSgeBFjEAP fghegnsaPftDVrAoOxFa6Dtvs7hTxvAVs2yWTy7BiGXbOpOAPs+iE4M8jZBijbSvkxbj aHFLazgMiK9w6A+NSS/DPscD6fLpdPUTMZ3mUUd2lpkyGwYtAsqDCBMG018l/uSJ+74y jgew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c/7uKp3kPU+6BPx3Z+SeH1/mQzwr6aT8nYVy2fS4R+I=; b=nVejPJiU5TCouj51nZaJ164aaU5KUyQixxbNqHFIs08M2UGniAajPRGyl00pwNeMSe AZ2U2YIgHYNBQFd9uVgY8jT8o6uQbn6nLte4zzc2njB4FNOBs9LDMASoLD1EBVFKGfnh WwJZznjIppGGQHRQ3aaG1CQ8LNCp0W890ZcJFakPsrHeWStbqPPG3kNynfu2MxRh6C+p 7rnNZECTvdhdyyO24aKLU4iubhvKchQeq+GWQmYPHtN9ePof8sfiRBajCXfwNC6gBaq4 YmXixtBx9bRwtUX+vjlDYJ/XFVDT3pjXjQe2h8zBqiWNc8udG9WKiJI4b0V17X6yMob4 +3nQ== X-Gm-Message-State: AOAM531+iiAbwSj0BbOc0XABuBhRn8wtJpu4o9w81SXcz5x8BJwvgiGs HkpkROMvYen5WyD0W6SvoFtd8M1ELWLHuEqpvLupMg== X-Google-Smtp-Source: ABdhPJy+k0LGlBo1IZsQsrfPTKk9qsGvbmN8WMtLliu0P+kZNZHNe3D7VuRZiIk5rzJNbcPUoVAPBv8KQYaOTj3JCbs= X-Received: by 2002:a17:902:d90d:b029:d6:ecf9:c1dd with SMTP id c13-20020a170902d90db02900d6ecf9c1ddmr23089538plz.13.1605140653446; Wed, 11 Nov 2020 16:24:13 -0800 (PST) MIME-Version: 1.0 References: <3443e106c40799e5dc3981dec2011379f3cbbb0c.1605046662.git.andreyknvl@google.com> <20201111162051.GG517454@elver.google.com> In-Reply-To: <20201111162051.GG517454@elver.google.com> From: Andrey Konovalov Date: Thu, 12 Nov 2020 01:24:02 +0100 Message-ID: Subject: Re: [PATCH v2 05/20] kasan: allow VMAP_STACK for HW_TAGS mode To: Marco Elver X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201111_192415_697584_4D52B655 X-CRM114-Status: GOOD ( 23.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linux ARM , Branislav Rankov , Catalin Marinas , Kevin Brodsky , Will Deacon , LKML , kasan-dev , Linux Memory Management List , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , Andrew Morton , Vincenzo Frascino , Evgenii Stepanov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 11, 2020 at 5:20 PM Marco Elver wrote: > > On Tue, Nov 10, 2020 at 11:20PM +0100, Andrey Konovalov wrote: > > 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 > > --- > > Shouldn't this be in the other series? I don't think it makes much difference considering the series will go in together. > > FWIW, > > Reviewed-by: Marco Elver Thanks! > > > 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 > > -- > > 2.29.2.222.g5d2a92d10f8-goog > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel