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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 23C45C433E0 for ; Mon, 8 Feb 2021 11:08:00 +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 A30B964E37 for ; Mon, 8 Feb 2021 11:07:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A30B964E37 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=fuoQw8t4WusJYcypBVQ5PisqMF7YzqwXiC6ZWkgJ55Q=; b=wPlJ7SeleRxab2vYvKUHaPj+a 4kX/m2pd5Nb59TGKsX6cP/60O6GOeGcfYik6xlPt4jyVDrpsPMpbXPsbHaspkEP49hf4vq/c9A50D dPOKETXtTVMi0cKTY4AQAL+nDmoOunlOUZV0tgXtdrV8GpQaYIXa9Ms+H384hF1w7WMPqQjY5zQwq hu+kPyNtlaA0orpMo6sm86Y8s+K10MCFPb1gkjLY7/5dCiEVK0kiEdOIYyhWpGW2N0eYK1sfjKv6k qzLz+84y+AWHOtTjbGnuiYeDiHTSr/4aNEmlwiFqViXKpYwayFt05Mky+aySJuBCuQBH6AOljGrxI wMG2HwusQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l94NY-0004BQ-GS; Mon, 08 Feb 2021 11:06:52 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l94NV-0004AS-MX for linux-arm-kernel@lists.infradead.org; Mon, 08 Feb 2021 11:06:50 +0000 Received: by mail-wm1-x32c.google.com with SMTP id t142so10030813wmt.1 for ; Mon, 08 Feb 2021 03:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YCKQyJ5X4pSKK2TbNsb8boRdw0GR7LFT4BRguWXjjyI=; b=NG8H9UUSvX43gPqT7atIFiGW1Hf53RneCc9N82ovlTQDtkdhQjLF8xI+K74EFIihsg 0hgVdQ/g29wTbAtYid5lHzGLlbCzDYlJL6GyhxueutxhN+/5WNFvx5HCs0dTlhw71siV uuIDAMP0uwNGhGygPzSU9wnnEx69GfK/+J1RTqLjPrimI9+07hU43gHJsbYkOx1AQcZ2 QurDBUSrVL80e3UI0evOOFZeGalicP4M7F8d5q8T6TohLso4uyBzQokgCwFoNhWqLHYB vt99Fiavcx0CnqAJBspQ8tdIsUQD+5UKuzyp8SXKkv/HRvDcmoJ28ZTuC0+3G+Cnu9g8 FCvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YCKQyJ5X4pSKK2TbNsb8boRdw0GR7LFT4BRguWXjjyI=; b=tnuWkm9e2Dt+HAJ/PnkvmxqWxhS9Psj1MkxRQYRh9gSjC5DaDNEsohb6UmL0MrtBy4 Mqvnmjfqmzlx13EUTWuB8PKPScA90xp7sI1l6w13dZCU/mL2KtGhVcA6XkNEaU95ZJDs ooYQIw4VU6b6P9OPOwNwAoG1Op/BnetI5t6Vzcr3KjaA+5uTCL2+bHxWniI2kmVVPM8G p61Jw1X/UZtVpqT+veEbkGJOqRH7hpZkjFGRLAg8PVs8u64AWEd1BlNk/911jIVcPghl M6YlHiZe/NxlH2wIhLwr+THemDF8WxXAneeXraHPwRgeh4XnY0qo917TlCEJobpPUO4U Ru9A== X-Gm-Message-State: AOAM5317DZkL6QKR9WH4Qqtah5PI9QhIULee3rJK/Baha/3nu5DUlCLs l+haYo3HTpSlIUK1i3glPAYueg== X-Google-Smtp-Source: ABdhPJycTndKfO4Hva6eoih56akIcC3ZddjnlFN+i/+r1mkgFIHQuNb7jnV4Lpigvq1x76HTJHnLOg== X-Received: by 2002:a05:600c:4f4d:: with SMTP id m13mr14358030wmq.118.1612782408117; Mon, 08 Feb 2021 03:06:48 -0800 (PST) Received: from elver.google.com ([2a00:79e0:15:13:497f:76ef:2e62:d028]) by smtp.gmail.com with ESMTPSA id g16sm19401367wmi.30.2021.02.08.03.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 03:06:47 -0800 (PST) Date: Mon, 8 Feb 2021 12:06:41 +0100 From: Marco Elver To: Andrey Konovalov Subject: Re: [PATCH v3 mm 13/13] kasan: clarify that only first bug is reported in HW_TAGS Message-ID: References: <00383ba88a47c3f8342d12263c24bdf95527b07d.1612546384.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <00383ba88a47c3f8342d12263c24bdf95527b07d.1612546384.git.andreyknvl@google.com> User-Agent: Mutt/2.0.2 (2020-11-20) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210208_060649_832526_C6B4B0B8 X-CRM114-Status: GOOD ( 20.70 ) 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-kernel@lists.infradead.org, Branislav Rankov , Catalin Marinas , Kevin Brodsky , Will Deacon , linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Andrew Morton , Vincenzo Frascino , Peter Collingbourne , Dmitry Vyukov 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 Fri, Feb 05, 2021 at 06:34PM +0100, Andrey Konovalov wrote: > Hwardware tag-based KASAN only reports the first found bug. After that MTE > tag checking gets disabled. Clarify this in comments and documentation. > > Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver > --- > Documentation/dev-tools/kasan.rst | 8 ++++++-- > mm/kasan/hw_tags.c | 2 +- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst > index e022b7506e37..1faabbe23e09 100644 > --- a/Documentation/dev-tools/kasan.rst > +++ b/Documentation/dev-tools/kasan.rst > @@ -155,7 +155,7 @@ Boot parameters > ~~~~~~~~~~~~~~~ > > Hardware tag-based KASAN mode (see the section about various modes below) is > -intended for use in production as a security mitigation. Therefore it supports > +intended for use in production as a security mitigation. Therefore, it supports > boot parameters that allow to disable KASAN competely or otherwise control > particular KASAN features. > > @@ -166,7 +166,8 @@ particular KASAN features. > ``off``). > > - ``kasan.fault=report`` or ``=panic`` controls whether to only print a KASAN > - report or also panic the kernel (default: ``report``). > + report or also panic the kernel (default: ``report``). Note, that tag > + checking gets disabled after the first reported bug. > > For developers > ~~~~~~~~~~~~~~ > @@ -296,6 +297,9 @@ Note, that enabling CONFIG_KASAN_HW_TAGS always results in in-kernel TBI being > enabled. Even when kasan.mode=off is provided, or when the hardware doesn't > support MTE (but supports TBI). > > +Hardware tag-based KASAN only reports the first found bug. After that MTE tag > +checking gets disabled. > + > What memory accesses are sanitised by KASAN? > -------------------------------------------- > > diff --git a/mm/kasan/hw_tags.c b/mm/kasan/hw_tags.c > index e529428e7a11..6c9285c906b8 100644 > --- a/mm/kasan/hw_tags.c > +++ b/mm/kasan/hw_tags.c > @@ -48,7 +48,7 @@ EXPORT_SYMBOL(kasan_flag_enabled); > /* Whether to collect alloc/free stack traces. */ > DEFINE_STATIC_KEY_FALSE(kasan_flag_stacktrace); > > -/* Whether panic or disable tag checking on fault. */ > +/* Whether to panic or print a report and disable tag checking on fault. */ > bool kasan_flag_panic __ro_after_init; > > /* kasan=off/on */ > -- > 2.30.0.365.g02bc693789-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel