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=-14.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham 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 D62B0C47255 for ; Mon, 11 May 2020 10:52:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 848F7206D5 for ; Mon, 11 May 2020 10:52:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ILnkM6H1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 848F7206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2426D900024; Mon, 11 May 2020 06:52:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1CC4E900006; Mon, 11 May 2020 06:52:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 094E1900024; Mon, 11 May 2020 06:52:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0054.hostedemail.com [216.40.44.54]) by kanga.kvack.org (Postfix) with ESMTP id E0CED900006 for ; Mon, 11 May 2020 06:52:31 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id A014B180AD80F for ; Mon, 11 May 2020 10:52:31 +0000 (UTC) X-FDA: 76804124502.29.bomb64_331fd2212474d X-HE-Tag: bomb64_331fd2212474d X-Filterd-Recvd-Size: 6001 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 May 2020 10:52:31 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id l1so3972521qtp.6 for ; Mon, 11 May 2020 03:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=72CupRCuRPXXCvNwucE/1jDQJJRDxROzY5cHpuICnYs=; b=ILnkM6H19JK17KC3M5FAIaz0BrdJVQQCiKVz4hMQKY+zmUQLJmBjxqaofT2C/PU3bR lHITSoyEEq2oW26FnPNPLeLM+tiaSBXyJn5L1+kFGVUjqX7SpOtLm9yp/z6X6p6oEQmH ndb1m0gPuuPgyVNoMkNvQVywYqrDZDn39LAH6xZrCMKOauwpePg1Oz+BIRB6x8nt6d4B lQ1P9Eaw9sPiGAiWu4AhIUnGQrLw2+nsxYKt4JvErU8YbQ0Cb5jgY1s8cq7MP8HPxc76 eUQS+lo9zvS/M7Rt+cjaAuH4xJ64f62hwjRn8smLeYRcRmBvI4hLFUrWOGCgn+0RgD9k 9pNw== 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=72CupRCuRPXXCvNwucE/1jDQJJRDxROzY5cHpuICnYs=; b=ZjWo9LKpBn9wSuFunfsLvEl1yIXi59Ruh6zoCFYtCRLoka4f4qy6UliApeiXe48Rnp w6b+b9uExWAC/hb2c7eeNpF1oPvxvszq8X3rkhVVuiU+CiRYrbRF49SBIU7VilwoPvKk H7jCjlj9u+0e7ADvxoSsWhhwzSfaJVg4a19pP+CDuxzvC/aqJ/ZhCS0OiB+T1cPc8Zl2 jaAF0K7nUBLnHRF9NZAnBiMw/nrIjxoawl+b35FFzcI8PILdCdnw99XdX3mlt4W3QXoz dwBB14aC6Ksz8vRHvbmtXNuqIOPzFUWLaU4/f2RgIFvvJstr7OU5nh/gUjBHmspV4thm jX2A== X-Gm-Message-State: AGi0PuZk66Ni0qeDn7/oaOMaqd8P9BX3UFmZ+wXQ4fgXpfKvKwaX5s4p gkrpTMU96SbCpkpOL3xmD0U3+ptpIc4tl3OyVBmWxw== X-Google-Smtp-Source: APiQypJuV7vh5fEAGAZHwSjBCKi7okLe7bGzhUJ7V6MHqJk55bkwMB8VH74FcIlcoOfXfKrlsq8FE9ROC7OHxh1Ytq4= X-Received: by 2002:ac8:370c:: with SMTP id o12mr15522299qtb.380.1589194350352; Mon, 11 May 2020 03:52:30 -0700 (PDT) MIME-Version: 1.0 References: <20200511023231.15437-1-walter-zh.wu@mediatek.com> In-Reply-To: <20200511023231.15437-1-walter-zh.wu@mediatek.com> From: Dmitry Vyukov Date: Mon, 11 May 2020 12:52:19 +0200 Message-ID: Subject: Re: [PATCH v2 3/3] kasan: update documentation for generic kasan To: Walter Wu Cc: Andrey Ryabinin , Alexander Potapenko , Jonathan Corbet , kasan-dev , Linux-MM , LKML , Linux ARM , wsd_upstream , linux-mediatek@lists.infradead.org Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, May 11, 2020 at 4:32 AM Walter Wu wrote: > > Generic KASAN will support to record first and last call_rcu() call > stack and print them in KASAN report. so we update documentation. > > Signed-off-by: Walter Wu > Cc: Andrey Ryabinin > Cc: Dmitry Vyukov > Cc: Alexander Potapenko > Cc: Jonathan Corbet > --- > Documentation/dev-tools/kasan.rst | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst > index c652d740735d..d4efcfde9fff 100644 > --- a/Documentation/dev-tools/kasan.rst > +++ b/Documentation/dev-tools/kasan.rst > @@ -193,6 +193,12 @@ function calls GCC directly inserts the code to check the shadow memory. > This option significantly enlarges kernel but it gives x1.1-x2 performance > boost over outline instrumented kernel. > > +Currently Currently is excessive here. Everything in the doc is about the current state of the things. > generic KASAN can print call_rcu() s/can print/prints/ > call stack in KASAN report, it KASAN is implied for "report" in this doc. s/KASAN// > +can't increase the cost of memory consumption, It does not increase only as compared to the current state of things. But strictly saying, if we now take the call_rcu stacks away, we can reduce memory consumption. This statement is confusing because stacks consume memory. > but it has one limitations. > +It can't get both call_rcu() call stack and free stack, so that it can't > +print free stack for allocation objects in KASAN report. 1. This sentence produces the impression that KASAN does not print free stack for freed objects. KASAN does still print free stack for freed objects. 2. This sentence is mostly relevant as diff on top of the current situation and thus more suitable for the commit description. We never promise to print free stack for allocated objects. And free stack for allocated objects is not an immediately essential thing either. So for a reader of this doc, this is not a limitation. > This feature is > +only suitable for generic KASAN. We already mentioned "generic" in the first sentence. So this is excessive. This paragraph can be reduced to: "Generic KASAN prints up to 2 call_rcu() call stacks in reports, the first and the last one." The rest belongs to change description and is only interesting as a historic reference. Generally documentation does not accumulate everything that happened since the creation of the world :) > Software tag-based KASAN > ~~~~~~~~~~~~~~~~~~~~~~~~ > > -- > 2.18.0 > > -- > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20200511023231.15437-1-walter-zh.wu%40mediatek.com.