lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YCEbQdE8FfUUFvuo@elver.google.com>
Date:   Mon, 8 Feb 2021 12:06:41 +0100
From:   Marco Elver <elver@...gle.com>
To:     Andrey Konovalov <andreyknvl@...gle.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Dmitry Vyukov <dvyukov@...gle.com>,
        Alexander Potapenko <glider@...gle.com>,
        Will Deacon <will.deacon@....com>,
        Andrey Ryabinin <aryabinin@...tuozzo.com>,
        Peter Collingbourne <pcc@...gle.com>,
        Evgenii Stepanov <eugenis@...gle.com>,
        Branislav Rankov <Branislav.Rankov@....com>,
        Kevin Brodsky <kevin.brodsky@....com>,
        kasan-dev@...glegroups.com, linux-arm-kernel@...ts.infradead.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 mm 13/13] kasan: clarify that only first bug is
 reported in HW_TAGS

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 <andreyknvl@...gle.com>

Reviewed-by: Marco Elver <elver@...gle.com>

> ---
>  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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ