Message ID | 20230623075805.1630-1-chanho.min@lge.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp5611615vqr; Fri, 23 Jun 2023 01:13:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ALZt2VsUvaEl570dQ5w2Tf3twhYRddOYJQk/qnsUssor8kVBkxEYs00IHwGyAAM5u3OkO X-Received: by 2002:a05:6a20:431d:b0:125:4589:a668 with SMTP id h29-20020a056a20431d00b001254589a668mr3967147pzk.17.1687508030833; Fri, 23 Jun 2023 01:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687508030; cv=none; d=google.com; s=arc-20160816; b=JGzlYuJN1Shm40z/LFIJ4J0wTtLDF0XIVl/eB91PnH8iJtuytHuqaLsytEn/QLJ31H fl4pDuigWZy08klV1kT/ADD69gQYVjSPTSPRWl620+w34iJxQ8nkmPcMT3c+OeWvsKnp qXb3R/i4qTQlYdvqOjRmMaAbZUTQ77PKOwlZSpQbO2yALus2KvpStSblv9F9mbxPRxrU gzE3RCPa/68fQBGqt6f+Za5WyOw21wLMs2iZzpuJn4GBD0ytf+oHsDpTsxdrb62ovQGI miJL++ubNtW2pw9Q59iWWzGSTuOLptE9gABnuvNXg+nhD2MWJZlcoARC3WRfLkorC2Ro MVIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=JoKGkYgZzPdv1qxY2Tw1MfAsCqyqgX341vwV35LziNw=; b=VVbfzBr9m4gaFuJae8b3D4//z0husJBtKcIvY5SY7nlwe2sCxtj15kPPGs03QClb4/ VvKFBcFF9mWAzM3BUv3NNtt4EKghlLs51Aswj8n4hasFplufeybtuaa096mURu3WKJJE ErAxolApIKfd9ipoA/MW0hjnuSQ+/lmSByD7S3UJt1X8Um5Xnb/iwb1LMatfTkoIPzst DLqtsS3R6O0mnsuOxnhr2dP34EOVL9vHU8c4lqW7dCMMjex3Ftayh6hCCntmrdQggh/x mJJK6Qsum2psuCIJNLX9Pp8qrgpjBiWjiNWjlT035zTzE7WGqF2XkgtuKnwPK/P2OQdj GNPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w2-20020a170902ca0200b001b69de1eaecsi892442pld.489.2023.06.23.01.13.38; Fri, 23 Jun 2023 01:13:50 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbjFWH6M (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Fri, 23 Jun 2023 03:58:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230163AbjFWH6K (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 23 Jun 2023 03:58:10 -0400 Received: from lgeamrelo11.lge.com (lgeamrelo11.lge.com [156.147.23.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1B9381BCC for <linux-kernel@vger.kernel.org>; Fri, 23 Jun 2023 00:58:07 -0700 (PDT) Received: from unknown (HELO lgeamrelo01.lge.com) (156.147.1.125) by 156.147.23.51 with ESMTP; 23 Jun 2023 16:58:05 +0900 X-Original-SENDERIP: 156.147.1.125 X-Original-MAILFROM: chanho.min@lge.com Received: from unknown (HELO localhost.localdomain) (10.178.31.96) by 156.147.1.125 with ESMTP; 23 Jun 2023 16:58:05 +0900 X-Original-SENDERIP: 10.178.31.96 X-Original-MAILFROM: chanho.min@lge.com From: Chanho Min <chanho.min@lge.com> To: andreyknvl@gmail.com Cc: chanho.min@lge.com, dvyukov@google.com, elver@google.com, glider@google.com, gunho.lee@lge.com, kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, ryabinin.a.a@gmail.com, vincenzo.frascino@arm.com Subject: [PATCH v2] kasan: fix mention for KASAN_HW_TAGS Date: Fri, 23 Jun 2023 16:58:05 +0900 Message-Id: <20230623075805.1630-1-chanho.min@lge.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <CA+fCnZfi_o6QbfDamUjsPXjtnEwKyBn8y+T8=zxV2mEpA=DUyQ@mail.gmail.com> References: <CA+fCnZfi_o6QbfDamUjsPXjtnEwKyBn8y+T8=zxV2mEpA=DUyQ@mail.gmail.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SORTED_RECIPS,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769126114589219327?= X-GMAIL-MSGID: =?utf-8?q?1769480420827444225?= |
Series |
[v2] kasan: fix mention for KASAN_HW_TAGS
|
|
Commit Message
Chanho Min
June 23, 2023, 7:58 a.m. UTC
This patch fixes description of the KASAN_HW_TAGS's memory consumption.
KASAN_HW_TAGS are dependent on the HW implementation and are not reserved
from system memory like shadow memory.
Suggested-by: Andrey Konovalov <andreyknvl@gmail.com>
Signed-off-by: Chanho Min <chanho.min@lge.com>
---
lib/Kconfig.kasan | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Fri, Jun 23, 2023 at 9:58 AM Chanho Min <chanho.min@lge.com> wrote: > > This patch fixes description of the KASAN_HW_TAGS's memory consumption. > KASAN_HW_TAGS are dependent on the HW implementation and are not reserved > from system memory like shadow memory. > > Suggested-by: Andrey Konovalov <andreyknvl@gmail.com> > Signed-off-by: Chanho Min <chanho.min@lge.com> > --- > lib/Kconfig.kasan | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan > index fdca89c05745..f8f9e12510b7 100644 > --- a/lib/Kconfig.kasan > +++ b/lib/Kconfig.kasan > @@ -124,7 +124,8 @@ config KASAN_HW_TAGS > Supported only on arm64 CPUs starting from ARMv8.5 and relies on > Memory Tagging Extension and Top Byte Ignore. > > - Consumes about 1/32nd of available memory. > + Does not consume memory by itself but relies on the 1/32nd of > + available memory being reserved by the firmware when MTE is enabled. > > May potentially introduce problems related to pointer casting and > comparison, as it embeds a tag into the top byte of each pointer. > -- > 2.17.1 > Reviewed-by: Andrey Konovalov <andreyknvl@gmail.com> Thank you!
diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan index fdca89c05745..f8f9e12510b7 100644 --- a/lib/Kconfig.kasan +++ b/lib/Kconfig.kasan @@ -124,7 +124,8 @@ config KASAN_HW_TAGS Supported only on arm64 CPUs starting from ARMv8.5 and relies on Memory Tagging Extension and Top Byte Ignore. - Consumes about 1/32nd of available memory. + Does not consume memory by itself but relies on the 1/32nd of + available memory being reserved by the firmware when MTE is enabled. May potentially introduce problems related to pointer casting and comparison, as it embeds a tag into the top byte of each pointer.