Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp263155pxk; Thu, 24 Sep 2020 05:15:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZQU6wFgCxSDbY5mReHKZ0cX/JR0WIniHRM9KfzrXFZIMz0TEJvkWYRarGpqzJGUwo//tZ X-Received: by 2002:a05:6402:1007:: with SMTP id c7mr684317edu.339.1600949728265; Thu, 24 Sep 2020 05:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600949728; cv=none; d=google.com; s=arc-20160816; b=h4bEycdKMqwc02moIT/KDALD/F9oUo8nh8ekofarX0LgLdkJoqA3YpOcWTMXiqg+OL F8E7KpmlXy0gv0fKDouMNEL1Q0z9ZhPYdZWqdPfh1YkBR3kYTfURRfm7Gg1i+acPKHVL PnJOBmn1O6kac3aR6pkMdBxWfZDppR00jedsuB90mAehkKyQsnBJJTsg7tiLMiT9UsH8 aDrt23pmtoUa8mgk4emD8wbCwV5j7FkIDljHftMT97BLF1gJXQM035Uec0n+CgmaxjUl tEpn5C8cs8QAZHiasbFrvG30r2EreDxcpPmcR+dMiwAiUszPE8PIvfhIi1U8NAwE2K/J GmtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TiwIu7mMni6DjsCfBHchRdA5CVaKLnFCdFVAp2ZYt6o=; b=Y/DRGAIKa9hceQp5fBYl3rA0WNQh/PGBg3QM60RwQViI8NJ/e6oFcfVJM6ldC19g4J ZM15UdkenAS477TNF2I1LrUcTp4Ih/xRkg/UoY164CdtZk7jcuD5YnkmDG1YEhPtoLl9 MguVdsZMhQ17RCn6Z/VGGyScAqUWdvpWT5b2oRxEcMO5/D/UIMqAtEX48xJLBr8gidy7 iTG0we3IfnpnU6Nfg9L8UHttjmTf3YOB5o5FW3J5j7AvLJuN0hP5QxIvPIsw9v5ZTb+e 8K/Ssup+0474HUmCuCnxccrEBjZPF7NbAPXuYTkrbdRkI7w2zwtxM5PVVL6WJoFboJ8a Mujg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=amEBg3Sa; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a19si2078361edx.553.2020.09.24.05.15.03; Thu, 24 Sep 2020 05:15:28 -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=@google.com header.s=20161025 header.b=amEBg3Sa; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727707AbgIXMLY (ORCPT + 99 others); Thu, 24 Sep 2020 08:11:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbgIXMLQ (ORCPT ); Thu, 24 Sep 2020 08:11:16 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4D95C0613CE for ; Thu, 24 Sep 2020 05:11:15 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id v12so3345614wmh.3 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=bknOFuI/RBq0shcmhS2dyWXkR6wr2ChwWBS2CHdaoSH0BvA1FPz0YKlK9+9Q88xYKU Rz2jzURiVPyOhoOd5D4YWjiY0SNW24dz0ElBggc01hrbz3uN1O5cEoS/NTJCgz1AXLtu hdC6hiwVNLrWqMqXElYpor8ehFYiqIvQ314Haqa3JkNse8KS8xCeW7M8cqgThQR5viBh IAGaBABCR2DKqnL9gkzRpStVMthwpiGX2zUuBYjImbSfysfCfLncn4WqdS5QsNXGFppo z+a1JVr4e5Zus4q1AYeWS2dQl/WirLokRRmPPqDIILpCnX8ojM2K9OZn+fUIaexNqEeS Cl/g== X-Gm-Message-State: AOAM533slLGdM8suC8D+7D4/VLczOWr6tgn1KZxckOKRGcARbl/ZH22C sjL85vRBsqRvBw2Dtngb6LoNJIHEgiecxoylJE+32A== 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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