linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kmemleak: Increase maximum early log entries to 1000000
@ 2019-07-23  7:26 Nicolas Boichat
  2019-07-23  7:46 ` Dmitry Vyukov
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Boichat @ 2019-07-23  7:26 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Masahiro Yamada, Kees Cook, Petr Mladek, Thomas Gleixner,
	Tetsuo Handa, Joe Lawrence, Sri Krishna chowdary,
	Uladzislau Rezki, Andy Shevchenko, Changbin Du, linux-kernel,
	Stephen Rothwell, Catalin Marinas, Dmitry Vyukov,
	Andrey Ryabinin

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).

Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index f567875b87657de..1a197b8125768b9 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -595,7 +595,7 @@ config DEBUG_KMEMLEAK
 config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
 	int "Maximum kmemleak early log entries"
 	depends on DEBUG_KMEMLEAK
-	range 200 40000
+	range 200 1000000
 	default 400
 	help
 	  Kmemleak must track all the memory allocations to avoid
-- 
2.22.0.657.g960e92d24f-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-30 15:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23  7:26 [PATCH] kmemleak: Increase maximum early log entries to 1000000 Nicolas Boichat
2019-07-23  7:46 ` Dmitry Vyukov
2019-07-23  8:13   ` Nicolas Boichat
2019-07-23  8:21     ` Dmitry Vyukov
2019-07-23 22:17       ` Doug Anderson
2019-07-24  7:10         ` Dmitry Vyukov
2019-07-24  9:00     ` Andrey Ryabinin
2019-07-30 15:22       ` Nicolas Boichat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).