Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4876897ybi; Tue, 30 Jul 2019 09:40:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjb5OpQIBcZ9kmr0Fz1fMTYWOR0UNlgpWRloTjSQjIM4uSFv5elAyxWjEIB++cjrCpSESh X-Received: by 2002:a17:90a:601:: with SMTP id j1mr115736571pjj.96.1564504806810; Tue, 30 Jul 2019 09:40:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564504806; cv=none; d=google.com; s=arc-20160816; b=qRwxii3uvH1pbSfbdesuYVdzL4qL7VtgNp8Lw0nxbVQTfMHPB+kT+i3p+8iuhzJqMV 8RWM+Xi6loqRzMMLqxLC14RhJFhDJwQ6kQ033P1Ga8MuZGBqo/NEG0W5savdus/SKere Ma7IhtkxIcZxVLxHRQM+rjZyR7Ex3H24WXvfGz/FY71MeNxVaPr1VHA8WBwK+rWjFAaj PkAZ836j1pn5qFzLGQb9GPRBmyP66/N0FPXEFhHF82XQoIiiN8shtJMCdb+4sPp9DCMR moBQ1lH5GuPNYnMM9x1IXjYtGx1IAtPTPFkg36hKEdcBIT9jQPG8Ty/GUe7Fea/OMJ5F ZH8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0/VikeT/40/94mlzafqQ+br06jiibogiKOd39iZFxVU=; b=TBO+TXc/EqWFGdBu6dvWicPHhPctwV24dtARBo93+GCugEHkmaeUW4nkVhnOyQigzT a4mlTsRuLR53aac2JeB9TPysPl9PGgBal5eo+JM0G6ONAHK/erfYTVrTWuCGzElNE2z1 i/X3/hrudExYXrOibD5+J0iqx9sPapNZiL5CfnuxuAAcitr1KkoSWfpCXZ16FaPIw+ql 2DU376NsoG9UMndKFebCt0337I1OlsGotN06pueue4D4v1KgzOcp3oYnNo4u0N6T06DF GyZ8dJickxnIQ6/sST6jJ5fkcS14n7MvcYhe5q2rgSnktd6vhUScbG2QlUFizZ/cOH6Z ZGIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=S3vv2HDT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si30566976pff.277.2019.07.30.09.39.51; Tue, 30 Jul 2019 09:40:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=S3vv2HDT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732261AbfG3PWd (ORCPT + 99 others); Tue, 30 Jul 2019 11:22:33 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:38623 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728855AbfG3PWd (ORCPT ); Tue, 30 Jul 2019 11:22:33 -0400 Received: by mail-qt1-f194.google.com with SMTP id n11so63400689qtl.5 for ; Tue, 30 Jul 2019 08:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0/VikeT/40/94mlzafqQ+br06jiibogiKOd39iZFxVU=; b=S3vv2HDTN4GlOLWRrQu3XWT4f7svDBLxxP3BZ+0r+2d9QzUmW4mbQN09LYmtyL1+p+ HD0LZROqt+yxspDRIhYZIywaOnDd7tAyFU81sKIzQMxVoR22sbVFXRz0CkULNmEjq8PU FeZsgGbmbAg/rUHJZCIixw7umVesNt7VUdF+Y= 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=0/VikeT/40/94mlzafqQ+br06jiibogiKOd39iZFxVU=; b=ILeEZYXxC/Fpqqt8nckJfSbkgPpQLCBu/gDmgKPtlxyHz7Nr3bAFXSiIIu6pj/aOUe u+PNgXf2Ar7YQ3DlaLn+s7pIblulIlFRwchbTYSe2rzoGE2kjK5ur4kz7Rn3Oqp2WlGU lKuCd0SG+pfPRXFE2TysFNMSPqVZoEmwyCYTuokAKkG4d8vDS4EDqZo7hj19IcwDBp6L vSL0Xdnkx67pJl9Fn5sGE6GpskqWZSnt2VT3D8WmsYprfTtzmUNp7qf4TkcpPveqL2Kb 6yYN0z0sjv1L1pEX0w/frCMU0++CzgA+RnACU+w7puBgRjtkk32UYV5yiVfAnOtsoeZ8 t8HQ== X-Gm-Message-State: APjAAAUOPR7UkwMXV1dWzbgChXmRX5cTiXn7i64UDbvGRj4D1/2qgWk6 YRV2Ok+8ZGmcFguL17WMnz6o6j7zlKZo/AWb7xcQbA== X-Received: by 2002:ac8:6619:: with SMTP id c25mr44624329qtp.221.1564500152521; Tue, 30 Jul 2019 08:22:32 -0700 (PDT) MIME-Version: 1.0 References: <20190723072605.103456-1-drinkcat@chromium.org> <095e2bc3-9284-e72d-8ed8-e2c6ec3f7c23@virtuozzo.com> In-Reply-To: <095e2bc3-9284-e72d-8ed8-e2c6ec3f7c23@virtuozzo.com> From: Nicolas Boichat Date: Tue, 30 Jul 2019 08:22:21 -0700 Message-ID: Subject: Re: [PATCH] kmemleak: Increase maximum early log entries to 1000000 To: Andrey Ryabinin Cc: Dmitry Vyukov , Andrew Morton , Masahiro Yamada , Kees Cook , Petr Mladek , Thomas Gleixner , Tetsuo Handa , Joe Lawrence , Sri Krishna chowdary , Uladzislau Rezki , Andy Shevchenko , Changbin Du , LKML , Stephen Rothwell , Catalin Marinas Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 24, 2019 at 2:01 AM Andrey Ryabinin wrote: > > > > On 7/23/19 11:13 AM, Nicolas Boichat wrote: > > On Tue, Jul 23, 2019 at 3:46 PM Dmitry Vyukov wrote: > >> > >> On Tue, Jul 23, 2019 at 9:26 AM Nicolas Boichat wrote: > >>> > >>> When KASan is enabled, a lot of memory is allocated early on, > >>> and kmemleak complains (this is on a 4GB RAM system): > >>> kmemleak: Early log buffer exceeded (129846), please increase > >>> DEBUG_KMEMLEAK_EARLY_LOG_SIZE > >>> > >>> Let's increase the upper limit to 1M entry. That would take up > >>> 160MB of RAM at init (each early_log entry is 160 bytes), but > >>> the memory would later be freed (early_log is __initdata). > >> > >> Interesting. Is it on an arm64 system? > > > > Yes arm64. And this is chromiumos-4.19 tree. I didn't try to track > > down where these allocations come from... > > > > Is this still a problem in upstream tree? 4.19 doesn't have fed84c785270 ("mm/memblock.c: skip kmemleak for kasan_init()") Sorry for the delay, and thanks for the hint, indeed, not a problem with that patch backported to our 4.19 tree: the number of allocations shrinks from 100K+ to 1K+. However, I think Dmitry is still right that the default (400) is too low, I will send a patch for that.