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=-17.4 required=3.0 tests=BAYES_00,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, URIBL_BLOCKED,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 32E8DC2D0E2 for ; Thu, 24 Sep 2020 12:11:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9E26323772 for ; Thu, 24 Sep 2020 12:11:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="amEBg3Sa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E26323772 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 DE686900025; Thu, 24 Sep 2020 08:11:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D969C900017; Thu, 24 Sep 2020 08:11:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C86E4900025; Thu, 24 Sep 2020 08:11:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id B34BD900017 for ; Thu, 24 Sep 2020 08:11:17 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 64BCF8249980 for ; Thu, 24 Sep 2020 12:11:17 +0000 (UTC) X-FDA: 77297839794.17.sound11_0e0b4382715e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin17.hostedemail.com (Postfix) with ESMTP id 30C27180D01A6 for ; Thu, 24 Sep 2020 12:11:16 +0000 (UTC) X-HE-Tag: sound11_0e0b4382715e X-Filterd-Recvd-Size: 5800 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Thu, 24 Sep 2020 12:11:15 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id l15so6664815wmh.1 for ; Thu, 24 Sep 2020 05:11:15 -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:content-transfer-encoding; bh=TiwIu7mMni6DjsCfBHchRdA5CVaKLnFCdFVAp2ZYt6o=; b=amEBg3SanzowDpC8L92uFg1ii7jV8LSSaNhWsKDtzwGtMovPxnbrJScIct8Zbyhr2j kVBzfZ1zinNcK2dFmMHRf/ZxGy8tk+l35+9s3Uee/2IBwq4maZ23K/xb0ucg2z+iF60D VghPJMbTFUiJD+BIm7Nv3yVp2i7LNIpCLXwubebZovuHDOf2Acf+yDInfa4mWBU33TE5 7fC3orT+PJq01qgwR5RkcyWUqfyOYcRFBM/qaGrU+CbDHlXhbBPIRFnaT/k5g/pkYtxF eXrzgC4Id9nqF9Ru+y4M0nZkR/y2/OVG2b0BDLmj6kIxX1AUlejcBHQ2SQjR0CT1z60c KInQ== 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:content-transfer-encoding; bh=TiwIu7mMni6DjsCfBHchRdA5CVaKLnFCdFVAp2ZYt6o=; b=KaqLaLSuqgGGB11/N8um4SHSweSjQx/IM5udkRWBtHuRQ4nf7LUI/9QgpvFqT9wVoo IHtq/ws2W4ccVjOMYy/68dzWFL9gFl9PB3yOqlDU/s7+sFy1iTc0zy5CtSZCnSMYYOUf qDnq/KLRc8exC8FXdL+15a0nuJMBqAF2bWXzVLjzVQUC40t86/er84xcXqGvM0mL0bTM abxs7wUZwZZOYIofp27gK48SDPnXNYnp1g5wteDJ8IPgXU7FU53bkjxiU/gB3tlA2UVd zg+QdbdIvcQfPS1HtIDeJJ0xt6H22ZfEsUIUSqzuLS4sjMs9ruLgGyJ661XaWP51pais C1Fw== X-Gm-Message-State: AOAM530XRW85sOF0TRS29KuQVZBba1H6J6F1IYM0nk2S4Sy4G31svtNb Q3ur5fUIFRlwbadREuVyKJXgzAHkSxC7t9Dd0o03rQ== X-Google-Smtp-Source: ABdhPJzqXJqvh9i9Yw6uLQNsbhwEBrflRLruFC3gZHk6n9wh9Uk8sJJvov5IlWMP+9EB36a75P1Ve+qHwO/igHHpvVw= X-Received: by 2002:a7b:c182:: with SMTP id y2mr4671696wmi.21.1600949474250; Thu, 24 Sep 2020 05:11:14 -0700 (PDT) MIME-Version: 1.0 References: <20200924040513.31051-1-walter-zh.wu@mediatek.com> In-Reply-To: From: Alexander Potapenko Date: Thu, 24 Sep 2020 14:11:03 +0200 Message-ID: Subject: Re: [PATCH v4 3/6] kasan: print timer and workqueue stack To: Marco Elver Cc: Walter Wu , Andrew Morton , Andrey Ryabinin , Dmitry Vyukov , Andrey Konovalov , Matthias Brugger , kasan-dev , Linux Memory Management List , LKML , Linux ARM , wsd_upstream , linux-mediatek@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Thu, Sep 24, 2020 at 1:55 PM Marco Elver wrote: > > On Thu, 24 Sep 2020 at 13:47, Alexander Potapenko wro= te: > > > > On Thu, Sep 24, 2020 at 6:05 AM Walter Wu w= rote: > > > > > > The aux_stack[2] is reused to record the call_rcu() call stack, > > > timer init call stack, and enqueuing work call stacks. So that > > > we need to change the auxiliary stack title for common title, > > > print them in KASAN report. > > > > > > Signed-off-by: Walter Wu > > > Suggested-by: Marco Elver > > > Acked-by: Marco Elver > > > Reviewed-by: Dmitry Vyukov > > > Reviewed-by: Andrey Konovalov > > > Cc: Andrey Ryabinin > > > Cc: Alexander Potapenko > > > --- > > > > > > v2: > > > - Thanks for Marco suggestion. > > > - We modify aux stack title name in KASAN report > > > in order to print call_rcu()/timer/workqueue stack. > > > > > > --- > > > mm/kasan/report.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/mm/kasan/report.c b/mm/kasan/report.c > > > index 4f49fa6cd1aa..886809d0a8dd 100644 > > > --- a/mm/kasan/report.c > > > +++ b/mm/kasan/report.c > > > @@ -183,12 +183,12 @@ static void describe_object(struct kmem_cache *= cache, void *object, > > > > > > #ifdef CONFIG_KASAN_GENERIC > > > if (alloc_info->aux_stack[0]) { > > > - pr_err("Last call_rcu():\n"); > > > + pr_err("Last potentially related work creatio= n:\n"); > > > > This doesn't have to be a work creation (expect more callers of > > kasan_record_aux_stack() in the future), so maybe change the wording > > here to "Last potentially related auxiliary stack"? > > I suggested "work creation" as it's the most precise for what it is > used for now. I see, then maybe my suggestion is premature. > What other users do you have in mind in future that are not work creation= ? I think saving stacks may help in any case where an object is reused for a different purpose without reallocation. SKBs, maybe? -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Stra=C3=9Fe, 33 80636 M=C3=BCnchen Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg