diff mbox series

Reduce number of concurrent KGDB_MAX_BREAKPOINTS

Message ID 7563f100-63bf-b184-0734-7df20f900828@gmx.de (mailing list archive)
State Accepted, archived
Headers show
Series Reduce number of concurrent KGDB_MAX_BREAKPOINTS | expand

Commit Message

Helge Deller Dec. 20, 2022, 8:14 p.m. UTC
------- Forwarded Message --------
Subject: [PATCH] Reduce number of concurrent KGDB_MAX_BREAKPOINTS
Date: Mon, 19 Dec 2022 23:11:07 +0100
From: Helge Deller <deller@gmx.de>
To: Jason Wessel <jason.wessel@windriver.com>, Daniel Thompson <daniel.thompson@linaro.org>, Douglas Anderson <dianders@chromium.org>, kgdb-bugreport@lists.sourceforge.net

On my 32-bit machine, with BREAK_INSTR_SIZE=4 the kgdb_break[] structure
allocates 16000 bytes of static kernel memory, which is - by default -
to be able to handle up to 1000 concurrent kgdb breakpoints.  I might be
wrong, but I doubt that in real life someone really needs that many
breakpoints, so I suggest to reduce the number of possible kgdb
breakpoints and thus reduce the memory footprint of kgdb_break[].

Signed-off-by: Helge Deller <deller@gmx.de>
diff mbox series

Patch

diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h
index 258cdde8d356..fab81c4f007e 100644
--- a/include/linux/kgdb.h
+++ b/include/linux/kgdb.h
@@ -95,7 +95,7 @@  extern char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs);
  extern int dbg_set_reg(int regno, void *mem, struct pt_regs *regs);
  #endif
  #ifndef KGDB_MAX_BREAKPOINTS
-# define KGDB_MAX_BREAKPOINTS	1000
+# define KGDB_MAX_BREAKPOINTS	40
  #endif

  #define KGDB_HW_BREAKPOINT	1