kgdb/kdb tree for 2.6.39-rc1
Jason Wessel
maintainerLinus, please pull the for_linus branch to pick up the minor clean ups for kgdb for 2.6.39.
git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git for_linus
Thanks,
Jason.
---
The following changes since commit 4bbba111d94781d34081c37856bbc5eb33f6c72a:
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 (2011-03-23 07:58:09 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb.git for_linus
Dan Carpenter (1):
kgdboc,kgdbts: strlen() doesn't count the terminator
Jason Wessel (1):
kgdb,x86_64: fix compile warning found with sparse
Jovi Zhang (1):
kdb: code cleanup to use macro instead of value
Namhyung Kim (1):
kdb: add usage string of 'per_cpu' command
arch/x86/kernel/kgdb.c | 4 ++-- drivers/misc/kgdbts.c | 2 +- drivers/tty/serial/kgdboc.c | 2 +- kernel/debug/kdb/kdb_main.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-)
Jason Wessel
maintainerPATCH 1/4 kgdboc,kgdbts: strlen() doesn't count the terminator
From: Dan Carpenter <[email protected]>
This is an off by one because strlen() doesn't count the null terminator. We strcpy() these strings into an array of size MAX_CONFIG_LEN.
--- drivers/misc/kgdbts.c | 2 +- drivers/tty/serial/kgdboc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/misc/kgdbts.c +1 -1
@@ -988,7 +988,7 @@ static void kgdbts_run_tests(void)static int kgdbts_option_setup (char *opt) { -if (strlen (opt) >MAX_CONFIG_LEN ) { +if (strlen (opt) >=MAX_CONFIG_LEN ) {printk (KERN_ERR "kgdbts: config string too long\n" );return -ENOSPC ; }
drivers/tty/serial/kgdboc.c +1 -1
@@ -131,7 +131,7 @@ static void kgdboc_unregister_kbd(void)static int kgdboc_option_setup (char *opt) { -if (strlen (opt) >MAX_CONFIG_LEN ) { +if (strlen (opt) >=MAX_CONFIG_LEN ) {printk (KERN_ERR "kgdboc: config string too long\n" );return -ENOSPC ; }
Signature · 1 line
1.7.1
Jason Wessel
maintainerPATCH 2/4 kdb: code cleanup to use macro instead of value
In reply to Jason WesselFrom: Jovi Zhang <[email protected]>
It's better to use macro KDB_BASE_CMD_MAX instead of 50
--- kernel/debug/kdb/kdb_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/debug/kdb/kdb_main.c +1 -1
@@ -78,7 +78,7 @@ static unsigned int kdb_continue_catastrophic;static kdbtab_t *kdb_commands;#define KDB_BASE_CMD_MAX 50static int kdb_max_commands =KDB_BASE_CMD_MAX ; -static kdbtab_t kdb_base_commands[50 ]; +static kdbtab_t kdb_base_commands[KDB_BASE_CMD_MAX ];#define for_each_kdbcmd (cmd, num) \ for ((cmd) = kdb_base_commands, (num) = 0; \ num < kdb_max_commands; \
Signature · 1 line
1.7.1
Jason Wessel
maintainerPATCH 3/4 kgdb,x86_64: fix compile warning found with sparse
In reply to Jason WesselFix sparse warning:
arch/x86/kernel/kgdb.c:123:9: warning: switch with no cases
--- arch/x86/kernel/kgdb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/kgdb.c +2 -2
@@ -121,8 +121,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)memcpy (mem, (void *)regs + dbg_reg_def[regno].offset, dbg_reg_def[regno].size); -switch (regno) {#ifdef CONFIG_X86_32 +switch (regno) {case GDB_SS :if (!user_mode_vm (regs)) *(unsigned long *)mem = __KERNEL_DS;
@@ -135,8 +135,8 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)case GDB_FS : *(unsigned long *)mem =0xFFFF ; break; -#endif } +#endif return dbg_reg_def[regno].name; }
Signature · 1 line
1.7.1
Jason Wessel
maintainerPATCH 4/4 kdb: add usage string of 'per_cpu' command
In reply to Jason WesselFrom: Namhyung Kim <[email protected]>
--- kernel/debug/kdb/kdb_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/debug/kdb/kdb_main.c +1 -1
@@ -2892,7 +2892,7 @@ static void __init kdb_inittab(void) "Send a signal to a process", 0, KDB_REPEAT_NONE);kdb_register_repeat ("summary" , kdb_summary,"" ,"Summarize the system" ,4 ,KDB_REPEAT_NONE ); -kdb_register_repeat ("per_cpu" , kdb_per_cpu,"" , +kdb_register_repeat ("per_cpu" , kdb_per_cpu,"<sym> [<bytes>] [<cpu>]" ,"Display per_cpu variables" ,3 ,KDB_REPEAT_NONE );kdb_register_repeat ("grephelp" , kdb_grep_help,"" ,"Display help on | grep" ,0 ,KDB_REPEAT_NONE );
Signature · 1 line
1.7.1