Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8990415ybi; Tue, 23 Jul 2019 19:35:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPogGbFzPPkCMN0BfLLKTZfDGNBTP2WNvyRDFOfTCTmODGWys+vnynn2iNaHfngrjT40RJ X-Received: by 2002:a65:6081:: with SMTP id t1mr80199621pgu.9.1563935713862; Tue, 23 Jul 2019 19:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935713; cv=none; d=google.com; s=arc-20160816; b=TWkMPEpY3x2eCnf8ZwHL8YRWEvXudtUIEOpZccFyPm6jlQ3m7ut6y2BCGdlR+gdfJc 2Oej8dp6rwZjRnyb7xjSwmHV5BvZydiOnnIpdKgicsmynENqLv+1XlFBweJvBMCtDy0D 7f4oR+sGSAwHERTr5XbAUmpmyiSPL0mBZiwH5+CNIj8txcy65d6taekuAG+6Y1a+FpNn St/Ou1sT79w0eLi/dQxyJ3Hdi6BpUh7kiCFph1oz3ywwyhpo/RPxFGeNkVY/BlQryHnb LMo6X89/Ipog63uD96CMOrZh5cp/LUSp7h5MsIA2x2ZyQ7M37eAxFpXlkuIb0+YXM+bK bnOg== 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=cwfou+bwYvh+NgeiS9WMeMU0g5CDhL3xxSGMHlwshUw=; b=QCGte5AsahyHPkqe3Ei5fzsZla4AGUNfyg+T/urklopikGuILJyoqwIqUvbOOxZ7od OzYioclOMG+zUc2R+U7pwT7jdiecGKVpiEmLjaV8T+Kozvg6lNQC6f4kW26bnPFVL1gW uWVj45XJsJn+nsJCl4tFkWCGqHfZcEgCqD7Z359SgY2d70rGd9vztaYMebvTITljkDMZ pXObt90XJzG+++g64VFild/3Uk7AR+Kvj4CgatbRD3TfK4w/FSSbsaScx/K2R/BDpb/F uxj5extneGU5blxtvxgqIea88GARz/OBvEYlToz0eF0pRprvF8a2OXspLky2J4J3im1h JOKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aYpuS5OT; 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 p17si12458988plo.310.2019.07.23.19.34.58; Tue, 23 Jul 2019 19:35:13 -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=aYpuS5OT; 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 S2392518AbfGWWZJ (ORCPT + 99 others); Tue, 23 Jul 2019 18:25:09 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:36249 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729617AbfGWWZH (ORCPT ); Tue, 23 Jul 2019 18:25:07 -0400 Received: by mail-io1-f67.google.com with SMTP id o9so85382986iom.3 for ; Tue, 23 Jul 2019 15:25:06 -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=cwfou+bwYvh+NgeiS9WMeMU0g5CDhL3xxSGMHlwshUw=; b=aYpuS5OTuXHnpMldiw3wqJiOvQAhmm3oc5rZGWUiRn9QhULPccYSGlqFNQInmVVeT9 hji/G16nV9YMdPg5Hq2vpl3tEYwV9pb0CUNRoJfxup+s5HcUtJtOGXp12/GWht5aGMxc mSRRN0m+wMh9vfPIVQO8R93K+k5alY9suQ6P4= 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=cwfou+bwYvh+NgeiS9WMeMU0g5CDhL3xxSGMHlwshUw=; b=TgAEWlb6xPvx387Zp3EooY14ozpdI4y8vNlXz4PstNbDCHWo6ypNdQJWjvmDbvR/KO uR3YvUzZGc8XmnAAbypwke/rUbVHbe46IubYdfHB9k6xgkj+Zd7S7M4OvHZeJNm7dWCM TPRh7AFFzJkxxljTCcssfN9Sxqy4q9d9FMuHpkpdZhb1MJOY83pfBycWnqn7J/WzFFqu YQ3VhpfnH09o2SO21QFAUGKYcWE314bh7+Srh9iYMToZqvvv3CiDCZC/SABhGzca29j3 FJO3Zhmg3sg92kRrjSEYft0w1F+oK2pQRUFaoFHsyz0n4rkapKOivWn8aRtoFLkqk5Uw vQ3Q== X-Gm-Message-State: APjAAAX6xB/DCg46YxiuATXdlnkwAhEms/yjKZ4XfMq9VuGVCtgKTDaJ jFMOBlp9CE29+AXF71JmHyRuLCfVdNM= X-Received: by 2002:a02:8663:: with SMTP id e90mr80872192jai.98.1563920705980; Tue, 23 Jul 2019 15:25:05 -0700 (PDT) Received: from mail-io1-f52.google.com (mail-io1-f52.google.com. [209.85.166.52]) by smtp.gmail.com with ESMTPSA id z17sm62115573iol.73.2019.07.23.15.25.05 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jul 2019 15:25:05 -0700 (PDT) Received: by mail-io1-f52.google.com with SMTP id k20so85264970ios.10 for ; Tue, 23 Jul 2019 15:25:05 -0700 (PDT) X-Received: by 2002:a5d:96d8:: with SMTP id r24mr10971823iol.269.1563920265159; Tue, 23 Jul 2019 15:17:45 -0700 (PDT) MIME-Version: 1.0 References: <20190723072605.103456-1-drinkcat@chromium.org> In-Reply-To: From: Doug Anderson Date: Tue, 23 Jul 2019 15:17:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] kmemleak: Increase maximum early log entries to 1000000 To: Dmitry Vyukov Cc: Nicolas Boichat , Andrew Morton , Masahiro Yamada , Kees Cook , Petr Mladek , Thomas Gleixner , Tetsuo Handa , Joe Lawrence , Uladzislau Rezki , Andy Shevchenko , LKML , Stephen Rothwell , Catalin Marinas , Andrey Ryabinin , Matthias Kaehlcke , Nick Desaulniers , Manoj Gupta 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 Hi, On Tue, Jul 23, 2019 at 1:21 AM Dmitry Vyukov wrote: > > On Tue, Jul 23, 2019 at 10: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... > > So perhaps it's due to arm64, or you have even more configs, or maybe > running on real hardware. But I guess it's fine as is, just wondered > why such a radical difference. Thanks. If I had to guess I'd guess gcc vs. clang. I think we've noticed a few places where clang+kasan produces much bloatier code than gcc+kasan. Oh look, I just invented a new word: bloatier. :-P ...could you try building with gcc and see if that explains the problems? -Doug