Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9220582ybi; Wed, 24 Jul 2019 00:12:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwz3F3xO8Hmvxo9qiF339aQMlxWiHw+OPuwVB3cnYCCPth25LeoqtNYxKESVbH/Q+YnKwaK X-Received: by 2002:a62:82c2:: with SMTP id w185mr10211138pfd.202.1563952370911; Wed, 24 Jul 2019 00:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563952370; cv=none; d=google.com; s=arc-20160816; b=o+93U7iknN3EQUlnn0VC9DO/i5d7KgvK3hRVQJ5lMKxAPEbkb0hKsRBoHYv8YULdEZ jcj8gJu7AtRv1Ev4P2kB9oLDwHGj7VyhaIwt4GPOaKdpUoSjG9IdpATKR3XNcxgSomhw YN1fuoGtyrkPodeWZjTPrst0St1nh6v9nJp6gZP9M/J5+i7jClUVVXTvA1MYlT/VGsmX bwXrBpuhtL3MOPJzKASRQ39HWDvFzonKJwY41NKcpNhq8OpzA6aX2ViJy2MG7VyAuPKt 4KpJ4N9xiVl2WKzMjGkO/GgbNmpCZKHpMtEvtgjgTSgA4AFmEnkwtxlzF/8q/WqTaNnx ck0Q== 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=8YismThz5V4muUnYY1qClW5cinII46QirkdsyCteNKI=; b=KSPTlHaYF0bpdbS9ZjHyretiMWgtEFFsqo6jqnxn8EMrtWQuKWHnVb/zli3lWjo1zh S+hGbc7EOS+lDP/KBnxA1eJDyXCpkKphZhFIXS+HxrZFmTQCga3telg/B+kYNbsFX0pO ng8vkN0NkPQzIaEW4rkapvxrDvlrvVh/KaD52n+RIcB+c6ksrl+KJ3TqjA4YYaB/KiMv wY0ETV3HXx0jcLXkfy2wkS0LV51C/KHEpRoIEOF0TVsXrnySc7gy1di+pp0p/cMQD2gH XLTYtgFOpPsUFkaqROBWhbJkgLH8nlyUok3zkoI91Q+9IZswXsAH+9juRJDRnuTwntPl 4dsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fFWIepym; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si39947396plv.153.2019.07.24.00.12.36; Wed, 24 Jul 2019 00:12:50 -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=@google.com header.s=20161025 header.b=fFWIepym; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726300AbfGXHKe (ORCPT + 99 others); Wed, 24 Jul 2019 03:10:34 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:35027 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbfGXHKe (ORCPT ); Wed, 24 Jul 2019 03:10:34 -0400 Received: by mail-io1-f68.google.com with SMTP id m24so87430080ioo.2 for ; Wed, 24 Jul 2019 00:10:33 -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=8YismThz5V4muUnYY1qClW5cinII46QirkdsyCteNKI=; b=fFWIepymAOxZ/7wsNjuQYgFw7/AFh4OeZs9PLI6q7actDNgju38LCDscCD+3xLy1ML hhaYzpx3Ov81IZbLeVAiNP9q6Eo7Zw+0MX2zcFfVE6WF+K4AsHQN9eDj/kb4mebdtPiS 2OubBKh97eKYSeevJonbzZ657KizutJMzx1ktgHbQFGQ9/GOSVmyntIIwqUx0+lfN28G RovqyEUT/yFHTgEHHuCU1yc/SsgZfiGFcfeyFctev9LyjkDiIjuEzu2w0Vg8DH3ONND4 4lWDyBhPG33PgQQcXfj1N4aYzMcloWMOkoNV/r2z03xIiGLEZQzkoKzoVcTZ/XbZzvje sl7g== 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=8YismThz5V4muUnYY1qClW5cinII46QirkdsyCteNKI=; b=HOECnL3CzMTB/V3u/U3FvCRakR//gExTy1S7iF/x8lNHELjjJkLZT1MrLjjP1Dk/mA ikrq8Z8ouKuIKtTIKFhBBRxE+uHMQtzhvgsmcuM4/+rW348IQCj5kekpv4n1UQBV71Tu CvBgHwAnbMkoNQlC9S9mtPc5crWmQkX2VMRSU4WNdtlhq7BvNbuUKoFpPdV8I2AJRWpd sBc1sTcA/j9kGaQk83C0ejbVIGaRNZkG+7Fd1SHQuzIr/q58Z0/P3IWyL7wjCxnwNO0+ NL3Te5tXI83PzILqoDzXAUvp63uUE1OJ4j8FNcG5xTBxfk5NCp+wdElyH79ybfmn50IP ZOaw== X-Gm-Message-State: APjAAAWwxm/t/9VWQl6xYKvWDYs6P+ti58dECC/ySqY40D51vLyWlNna X6zRcMuSAs6p1gIpoUkhIipRP6+DNplzbhWVP19G5g== X-Received: by 2002:a5e:c241:: with SMTP id w1mr70546096iop.58.1563952233103; Wed, 24 Jul 2019 00:10:33 -0700 (PDT) MIME-Version: 1.0 References: <20190723072605.103456-1-drinkcat@chromium.org> In-Reply-To: From: Dmitry Vyukov Date: Wed, 24 Jul 2019 09:10:20 +0200 Message-ID: Subject: Re: [PATCH] kmemleak: Increase maximum early log entries to 1000000 To: Doug Anderson 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 On Wed, Jul 24, 2019 at 12:17 AM Doug Anderson wrote: > > 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? Just in case, there is no problem per se. There is just a difference :) Whom have you asked? We use gcc with KEMEMLEAK atm. But compiler should not affect number of kernel heap allocations.