Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp8172561rwd; Tue, 20 Jun 2023 11:08:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5c7Bq8JaA8W8LVSn5LoloZXO+YMSmbzrX06odh0J+FtRCX+DO8Vm16SIl8DxvT7ECcWT9Q X-Received: by 2002:a05:6a00:10c4:b0:656:3d3a:da9c with SMTP id d4-20020a056a0010c400b006563d3ada9cmr10117886pfu.2.1687284510955; Tue, 20 Jun 2023 11:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687284510; cv=none; d=google.com; s=arc-20160816; b=WLY4U7OyusDhtpOjmpRg+T0HwM9Jt876tXtCnwfRbtWIKsShYeZ1ZCzZXBP+vmRxso 4oVYiGRqGpa2h1tkLZ6AxjwujOaWq1pbGBCpUGllecS0KIVpPW1QfuNDrUJPy5i8CD4L ck9v025GpwvrZmMR4VZOs9v/i0Q3hunW3KV7ij158ahTv9co12Had6QbdWH+8ST9NMk8 18rx9K/jH7MdGVwkrYbIu9nh/zi6AbcfFMvY3bDEGYkaMBLr4coQaH0nx89USl9INVJS U+ci9Tu62OE3ZqNEXV9L/MoWAbvxuIHoNdv/SW2oJo+so+nxY3+y0QPqQpbLDA5Pu6An rgfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=s9mWYfGROnySR6uue4WG7vLMYCpdaHNd7ovm5oIrCjM=; b=S0x1UEeoaJVjYJ969JBfgBQzfX22C77pT4WysFgKyBshjz+CR+H8R0MXvS+a3Hz9qV VgEL6NUcYvjc8V3IXRXwroBJw9uzrMuzomWWOmhAIMPdrHk2wYcxsI4yvolkpdeNQ6Lu 0mQTJk9B4QzoBU3UrSpRmbSEIx8i0xdeqJRHNxVvtfij0G/gMgXhvX6v3KD9JvExQx9M oZPlcbQ1s8HbHNfjtFzT2fE3uqIdzOgu4YaY4nALPtzz9GmYrjIxcB12Qoy7xV6Gsxhe IOhqKKD7TiTeE5s5sktx+yLAYnSm6ihb4WpBKOCH3/tz70Tx2tB4S5Dy5BwSQc/D6NIq omRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=sjjrqJuC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f129-20020a625187000000b00654d446d357si2144310pfb.177.2023.06.20.11.08.13; Tue, 20 Jun 2023 11:08:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=sjjrqJuC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229595AbjFTRXn (ORCPT + 99 others); Tue, 20 Jun 2023 13:23:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbjFTRXl (ORCPT ); Tue, 20 Jun 2023 13:23:41 -0400 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC23210C1 for ; Tue, 20 Jun 2023 10:23:39 -0700 (PDT) Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-312863a983fso40791f8f.2 for ; Tue, 20 Jun 2023 10:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687281818; x=1689873818; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=s9mWYfGROnySR6uue4WG7vLMYCpdaHNd7ovm5oIrCjM=; b=sjjrqJuC8PtXRZT+5ho8yuTY2RZb87MRMx42D91FylA8zy7UMk2YpWvEyJCAJal1b6 Y0kRm37nwj9f+T/Cwqsz7krNQ+i18PGH0LOxj66r7TJDy5pxVw26z/VEwlKYSSx+XGE8 wz52XXQJ0/e2DhlkqGFyt3J/IpFe3JqZYjQcDPuAl2kKymDu/0qNz8mtv8eQcxpW5zG8 24z2T+nHBY7ld2xxKWJ8JG1i8kE8bhe3wVd8Qz2ZrjdA3E6JYa3r8DJWfpR+pS6tyiNy lrx7viRfFKHW0VGpHt0RRHaVrX3ZOI5wjftMsTv0O6/Y0YpVNMX6yElyJK2957vFOC4M qxTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687281818; x=1689873818; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=s9mWYfGROnySR6uue4WG7vLMYCpdaHNd7ovm5oIrCjM=; b=WjvL0YDr3kbhfNNFbfSzBi2wsUohuPahcCy336UgansotbmH2CpwOWEMnuAJmhJoHS qhjfkg2TdAqwwx6hGUy2Kkma4F1ik2k10sTTy0KEiT/dE6d1JdfCWYw207GKepkgPNgT wEWjQKw+Pg1xdXgOHZOR1Qag9q8cw5J7BA/6m1p+99MIM44AjfaekC7SAqwHBX9aFMAo wLX5uJuvPIE/7cQzA8SaaaSGUuIwq0z8kyT3wBhgbIykZ6vGvZXZLtomi3+rvcD6fMuN ysNcSh6VbXSmNOP01d5XCr/LLceJTKTXeSqH+RnmYBo7ypi37pBqRdL6/P0/bwDzT+Wt E/jA== X-Gm-Message-State: AC+VfDzaRq1+v1DjWTNw9w7Nh5Snbo1S5wqQHTsplZwepslO5s4ZduPP JBk4lhvFmGGhV2h8tK7xIY+VFw== X-Received: by 2002:adf:f004:0:b0:311:1df7:3e05 with SMTP id j4-20020adff004000000b003111df73e05mr9335340wro.22.1687281818234; Tue, 20 Jun 2023 10:23:38 -0700 (PDT) Received: from elver.google.com ([2a00:79e0:9c:201:8530:a6a3:373f:683c]) by smtp.gmail.com with ESMTPSA id g18-20020a7bc4d2000000b003f8d0308604sm14028860wmk.9.2023.06.20.10.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 10:23:37 -0700 (PDT) Date: Tue, 20 Jun 2023 19:23:31 +0200 From: Marco Elver To: Andrey Konovalov , Andrew Morton Cc: Alexander Potapenko , Dmitry Vyukov , Taras Madan , Aleksandr Nogikh , Andrey Ryabinin , Vincenzo Frascino , Jonathan Corbet , kasan-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Catalin Marinas Subject: Re: [PATCH] kasan: add support for kasan.fault=panic_on_write Message-ID: References: <20230614095158.1133673-1-elver@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.9 (2022-11-12) X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 20, 2023 at 06:27PM +0200, Andrey Konovalov wrote: > On Tue, Jun 20, 2023 at 4:49 PM Marco Elver wrote: > > > > On Tue, Jun 20, 2023 at 03:56PM +0200, Andrey Konovalov wrote: > > ... > > > Could you move this to the section that describes the kasan.fault > > > flag? This seems more consistent. > > > > Like this? > > > > > > diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst > > index 7f37a46af574..f4acf9c2e90f 100644 > > --- a/Documentation/dev-tools/kasan.rst > > +++ b/Documentation/dev-tools/kasan.rst > > @@ -110,7 +110,9 @@ parameter can be used to control panic and reporting behaviour: > > - ``kasan.fault=report``, ``=panic``, or ``=panic_on_write`` controls whether > > to only print a KASAN report, panic the kernel, or panic the kernel on > > invalid writes only (default: ``report``). The panic happens even if > > - ``kasan_multi_shot`` is enabled. > > + ``kasan_multi_shot`` is enabled. Note that when using asynchronous mode of > > + Hardware Tag-Based KASAN, ``kasan.fault=panic_on_write`` always panics on > > + asynchronously checked accesses (including reads). > > > > Software and Hardware Tag-Based KASAN modes (see the section about various > > modes below) support altering stack trace collection behavior: > > Yes, this looks great! Thanks! The patch here is already in mm-stable (which I recall doesn't do rebases?), so I sent https://lkml.kernel.org/r/ZJHfL6vavKUZ3Yd8@elver.google.com to be used as a fixup or just added to mm-stable by Andrew at one point or another as well. Thanks, -- Marco