Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4732656pxj; Tue, 22 Jun 2021 06:55:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRAL5vYrJmwdrCSCa/u4Q2frEEcyLkqit7ZINS+v9H9VzeihqtAflZru0kMJKWe3Hufwg0 X-Received: by 2002:a5d:8a07:: with SMTP id w7mr240499iod.154.1624370135538; Tue, 22 Jun 2021 06:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624370135; cv=none; d=google.com; s=arc-20160816; b=efE/D7l3aJoat2vfwD6YR68okM0w+BMw4k/yWbUmzKX8uDrRnhkTeO5PnCvJQaPABP caTNM2ZnKxU+BB0+KDkDyFGAogbZJuGZM8GBpK+LExIWQj0KRFDBfAwlF1tnYShz8qsk JqnW1lL6X5atLmWHMnXi5JAzedarEH7QGl26lqxqai6Rvhu8lMm15WNQ9MVFFQCfc3qI d/yjf838Py6MFQWSA4g8J2/XhcTbYWprnEBJQpkA7yJFy8PpUtZWuwdsddw2CLWHOQ0g U84Dxsha9KtYCcooLXMBNjn792QfXPTMHTn17I+b9z/qGJwDSZtBN3Pvaxw4CSTdgLPu YIsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FByLAh6Nf6CrO0CmfvZoHDR68Ruso4bZUuWvxrdb7+g=; b=q1sROeqPSeZBNIndB2nTXJA966jXm8nXSY1c82iIpUg8PBotQD1Ocwu0gCSSoZO430 Qlx28ejF43LOe0TZmBf+bDnRyQDG1qdeAgXfBnEcn9NpaG2erg0uVC6ZnjHwzCjgrfm7 2UT+25ps1NZirKywK+hKKOv5fvvEo633OMhyku/St5BIUMUHX6iFQbFoTKPBt6QJoQin +QBpantYFXSshSZeyx8iIe0pUG8s/MlBt7Z5F/gZ/4mWS164kofN2zbJuavT7Lxj2wRs PSGSKChoWnkH0LzePRIZ6/HtRhrQB3JaKfx318/52vBbh5kef6I5RYCu05k7DGhjDMne N1bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tA5vW637; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e3si21661770iom.57.2021.06.22.06.55.21; Tue, 22 Jun 2021 06:55:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tA5vW637; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbhFVN4w (ORCPT + 99 others); Tue, 22 Jun 2021 09:56:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbhFVN4v (ORCPT ); Tue, 22 Jun 2021 09:56:51 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93291C061574 for ; Tue, 22 Jun 2021 06:54:35 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id he7so34637149ejc.13 for ; Tue, 22 Jun 2021 06:54:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FByLAh6Nf6CrO0CmfvZoHDR68Ruso4bZUuWvxrdb7+g=; b=tA5vW637kCakI7hlfEOyVaNxytSpmD41CBKAyDpRHd4Nn3k0+ZOuUy4ktkdPl1/o62 P+dR7c0sevpmjUYfYJL03s+RVXxoH8OjCLZnvrA9iibyuUPgCllBgCyDKYuVeZ0+XBrg TWGcLxJPYLoXL9c17cezS9A2eVBZVnfY8tO5BCG1XwIwj/oCs+dekgk5yel8P2qPaAnw S7g3Xkr+GY7P/VEoaR9DljrLM+euVjfN1bu2FzbOvQBjjdqMjGm1kC+onLxtNjs2aEdp 4QSwPemSPqTKNGJMGn5YQEyTFYebMUjFjZYlfhczM2OPyFwDUaL/iKO6JiRPrZw78FjM dFDA== 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=FByLAh6Nf6CrO0CmfvZoHDR68Ruso4bZUuWvxrdb7+g=; b=RYt9hba2KtzOfANP/XsDY4ZIaa6aHfF3EosbEuIW3eOiCQl0JmlfH/AL7tdGAMDPzx nxqPojuis6iRDNaHGPCupm3CcNXvFUCxhbRk3hllnCSuySBhEl8YRjh1FtIVwY4i8K4B h6p7hR4MwSGCx9rSHHwpC77AU+CfOmaXq+ddR1HNLiEkzkq375uO8blKjR8DCKud6VNP dbi+QzrvVTz91Emz9w6mts4auZVCQ/7f5yy643dTz7EvEEAtAkyW0qdXH/LxDtO70lZQ KzBT2dT1Bp0J/zBrwuQxF8n1SotjEG+qwZlTCVl92EnHIGQTmoe0by5Pmk8CEYjXAu7P VuWQ== X-Gm-Message-State: AOAM531Vuft3efyerG8YIbsR0BeXndoEiuaYJBmEFnNS+7sDLTYPyqeA Lp7i6FvX8WiEVTg0z6Ki7tS86OX71wMJpZD0sEk= X-Received: by 2002:a17:906:2f91:: with SMTP id w17mr4164114eji.443.1624370074257; Tue, 22 Jun 2021 06:54:34 -0700 (PDT) MIME-Version: 1.0 References: <20210620114756.31304-1-Kuan-Ying.Lee@mediatek.com> <20210620114756.31304-2-Kuan-Ying.Lee@mediatek.com> In-Reply-To: <20210620114756.31304-2-Kuan-Ying.Lee@mediatek.com> From: Andrey Konovalov Date: Tue, 22 Jun 2021 16:54:14 +0300 Message-ID: Subject: Re: [PATCH v3 1/3] kasan: rename CONFIG_KASAN_SW_TAGS_IDENTIFY to CONFIG_KASAN_TAGS_IDENTIFY To: Kuan-Ying Lee Cc: Andrey Ryabinin , Alexander Potapenko , Marco Elver , Dmitry Vyukov , Andrew Morton , Matthias Brugger , kasan-dev , LKML , Linux Memory Management List , Linux ARM , linux-mediatek@lists.infradead.org, wsd_upstream@mediatek.com, chinwen.chang@mediatek.com, nicholas.tang@mediatek.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 20, 2021 at 2:48 PM Kuan-Ying Lee wrote: > > This patch renames CONFIG_KASAN_SW_TAGS_IDENTIFY to > CONFIG_KASAN_TAGS_IDENTIFY in order to be compatible > with hardware tag-based mode. > > Signed-off-by: Kuan-Ying Lee > Suggested-by: Marco Elver > Cc: Andrey Ryabinin > Cc: Alexander Potapenko > Cc: Andrey Konovalov > Cc: Dmitry Vyukov > Cc: Andrew Morton > --- > lib/Kconfig.kasan | 2 +- > mm/kasan/kasan.h | 4 ++-- > mm/kasan/report_sw_tags.c | 2 +- > mm/kasan/sw_tags.c | 4 ++-- > 4 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan > index cffc2ebbf185..6f5d48832139 100644 > --- a/lib/Kconfig.kasan > +++ b/lib/Kconfig.kasan > @@ -155,7 +155,7 @@ config KASAN_STACK > CONFIG_COMPILE_TEST. On gcc it is assumed to always be safe > to use and enabled by default. > > -config KASAN_SW_TAGS_IDENTIFY > +config KASAN_TAGS_IDENTIFY > bool "Enable memory corruption identification" > depends on KASAN_SW_TAGS > help > diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h > index 8f450bc28045..b0fc9a1eb7e3 100644 > --- a/mm/kasan/kasan.h > +++ b/mm/kasan/kasan.h > @@ -153,7 +153,7 @@ struct kasan_track { > depot_stack_handle_t stack; > }; > > -#ifdef CONFIG_KASAN_SW_TAGS_IDENTIFY > +#ifdef CONFIG_KASAN_TAGS_IDENTIFY > #define KASAN_NR_FREE_STACKS 5 > #else > #define KASAN_NR_FREE_STACKS 1 > @@ -170,7 +170,7 @@ struct kasan_alloc_meta { > #else > struct kasan_track free_track[KASAN_NR_FREE_STACKS]; > #endif > -#ifdef CONFIG_KASAN_SW_TAGS_IDENTIFY > +#ifdef CONFIG_KASAN_TAGS_IDENTIFY > u8 free_pointer_tag[KASAN_NR_FREE_STACKS]; > u8 free_track_idx; > #endif > diff --git a/mm/kasan/report_sw_tags.c b/mm/kasan/report_sw_tags.c > index 3d20d3451d9e..821a14a19a92 100644 > --- a/mm/kasan/report_sw_tags.c > +++ b/mm/kasan/report_sw_tags.c > @@ -31,7 +31,7 @@ > > const char *kasan_get_bug_type(struct kasan_access_info *info) > { > -#ifdef CONFIG_KASAN_SW_TAGS_IDENTIFY > +#ifdef CONFIG_KASAN_TAGS_IDENTIFY > struct kasan_alloc_meta *alloc_meta; > struct kmem_cache *cache; > struct page *page; > diff --git a/mm/kasan/sw_tags.c b/mm/kasan/sw_tags.c > index 9362938abbfa..dd05e6c801fa 100644 > --- a/mm/kasan/sw_tags.c > +++ b/mm/kasan/sw_tags.c > @@ -177,7 +177,7 @@ void kasan_set_free_info(struct kmem_cache *cache, > if (!alloc_meta) > return; > > -#ifdef CONFIG_KASAN_SW_TAGS_IDENTIFY > +#ifdef CONFIG_KASAN_TAGS_IDENTIFY > idx = alloc_meta->free_track_idx; > alloc_meta->free_pointer_tag[idx] = tag; > alloc_meta->free_track_idx = (idx + 1) % KASAN_NR_FREE_STACKS; > @@ -196,7 +196,7 @@ struct kasan_track *kasan_get_free_track(struct kmem_cache *cache, > if (!alloc_meta) > return NULL; > > -#ifdef CONFIG_KASAN_SW_TAGS_IDENTIFY > +#ifdef CONFIG_KASAN_TAGS_IDENTIFY > for (i = 0; i < KASAN_NR_FREE_STACKS; i++) { > if (alloc_meta->free_pointer_tag[i] == tag) > break; > -- > 2.18.0 > Reviewed-by: Andrey Konovalov