[Kgdb-bugreport] [RFC v3 1/9] sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb

2014-05-08 Thread Daniel Thompson
on the key table when kdb is triggered by something other than SysRq-g however in that case any other CPU involved should release the spin lock before kgdb parks the slave CPUs. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- drivers/tty/sysrq.c | 11 --- include/linux

[Kgdb-bugreport] [RFC v3 4/9] kdb: Rename kdb_register_repeat() to kdb_register_flags()

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org We're about to add more options for commands behaviour, so let's give a more generic name to the low-level kdb command registration function. There are just various renames, no functional changes. Signed-off-by: Anton Vorontsov

[Kgdb-bugreport] [RFC v3 7/9] kdb: Categorize kdb commands (similar to SysRq categorization)

2014-05-08 Thread Daniel Thompson
: kill Reboot: reboot All:cpu, kgdb, (and all of the above), nmi_console Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h | 52 ++- kernel/debug/kdb/kdb_bp.c | 21 ++ kernel/debug/kdb/kdb_main.c | 100

[Kgdb-bugreport] [RFC v3 6/9] kdb: Remove KDB_REPEAT_NONE flag

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org Since we now treat KDB_REPEAT_* as flags, there is no need to pass KDB_REPEAT_NONE. It's just the default behaviour when no flags are specified. Signed-off-by: Anton Vorontsov anton.voront...@linaro.org Signed-off-by: John Stultz

[Kgdb-bugreport] [RFC v3 0/9] kdb: Allow selective reduction in capabilities (was kiosk mode)

2014-05-08 Thread Daniel Thompson
to cmd_flags kdb: Rename kdb_register_repeat() to kdb_register_flags() kdb: Use KDB_REPEAT_* values as flags kdb: Remove KDB_REPEAT_NONE flag kdb: Add enable mask for groups of commands Daniel Thompson (3): sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb kdb

[Kgdb-bugreport] [PATCH 1/3] kdb: Add framework to display sequence files

2014-05-08 Thread Daniel Thompson
files via kdb. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h | 3 +++ kernel/debug/kdb/kdb_io.c | 51 +++ 2 files changed, 54 insertions(+) diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 290db12

Re: [Kgdb-bugreport] [RFC v3 1/9] sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb

2014-05-08 Thread Daniel Thompson
On 25/04/14 17:45, Steven Rostedt wrote: On Fri, 25 Apr 2014 17:29:22 +0100 Daniel Thompson daniel.thomp...@linaro.org wrote: If kdb is triggered using SysRq-g then any use of the sr command results in the SysRq key table lock being recursively acquired, killing the debug session

[Kgdb-bugreport] [PATCH 3/3] kdb: Implement seq_file command

2014-05-08 Thread Daniel Thompson
of a brave expert an even bigger subset can be unsafely examined). Good arguments to try with this command include: cpuinfo_op, gpiolib_seq_ops and vmalloc_op. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- kernel/debug/kdb/kdb_main.c | 28 1 file changed

Re: [Kgdb-bugreport] [RFC v3 7/9] kdb: Categorize kdb commands (similar to SysRq categorization)

2014-05-08 Thread Daniel Thompson
On 25/04/14 17:57, Steven Rostedt wrote: +KDB_ENABLE_ALL_NO_ARGS = KDB_ENABLE_ALL 16, +KDB_ENABLE_MEM_READ_NO_ARGS = KDB_ENABLE_MEM_READ 16, +KDB_ENABLE_MEM_WRITE_NO_ARGS = KDB_ENABLE_MEM_WRITE 16, +KDB_ENABLE_REG_READ_NO_ARGS = KDB_ENABLE_REG_READ 16, +

[Kgdb-bugreport] [RFC v3 2/9] kdb: Remove currently unused kdbtab_t-cmd_flags

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org The struct member is never used in the code, so we can remove it. We will introduce real flags soon by renaming cmd_repeat to cmd_flags. Signed-off-by: Anton Vorontsov anton.voront...@linaro.org Signed-off-by: John Stultz john.stu...@linaro.org

Re: [Kgdb-bugreport] [RFC v3 1/9] sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb

2014-05-08 Thread Daniel Thompson
On 28/04/14 18:44, Colin Cross wrote: Is that case documented somewhere in the code comments? Perhaps not near enough to the _nolock but the primary bit of comment is here (and in same file as kdb_sr). --- cut here --- * kdb_main_loop - After initial setup and assignment of the *

[Kgdb-bugreport] [PATCH v4 6/9] kdb: Remove KDB_REPEAT_NONE flag

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org Since we now treat KDB_REPEAT_* as flags, there is no need to pass KDB_REPEAT_NONE. It's just the default behaviour when no flags are specified. Signed-off-by: Anton Vorontsov anton.voront...@linaro.org Signed-off-by: John Stultz

[Kgdb-bugreport] [RFC v3 5/9] kdb: Use KDB_REPEAT_* values as flags

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org The actual values of KDB_REPEAT_* enum values and overall logic stayed the same, but we now treat the values as flags. This makes it possible to add other flags and combine them, plus makes the code a lot simpler and shorter. But

[Kgdb-bugreport] [RFC v3 3/9] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org We're about to add more options for command behaviour, so let's expand the meaning of kdb_repeat_t. So far we just do various renames, there should be no functional changes. Signed-off-by: Anton Vorontsov anton.voront...@linaro.org Signed-off-by:

[Kgdb-bugreport] [PATCH v4 3/9] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags

2014-05-08 Thread Daniel Thompson
-by: John Stultz john.stu...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h| 6 +++--- kernel/debug/kdb/kdb_main.c| 6 +++--- kernel/debug/kdb/kdb_private.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux

[Kgdb-bugreport] [PATCH 0/3] kdb: Infrastructure to display sequence files

2014-05-08 Thread Daniel Thompson
() and used it to fix build error when CONFIG_KGDB_KDB is not set (oops). * Better comment explaining why seq_file's lock member can be left uninitialized (its will not detect errors because we know it is already not allowed for seq_file ops to use it). Daniel Thompson (3): kdb: Add framework

[Kgdb-bugreport] [PATCH v4 0/9] kdb: Allow selective reduction in capabilities (was kiosk mode)

2014-05-08 Thread Daniel Thompson
: Rename kdb_register_repeat() to kdb_register_flags() kdb: Use KDB_REPEAT_* values as flags kdb: Remove KDB_REPEAT_NONE flag kdb: Add enable mask for groups of commands Daniel Thompson (3): sysrq: Implement __handle_sysrq_nolock to avoid recursive locking in kdb kdb: Categorize kdb

[Kgdb-bugreport] [RFC v3 8/9] kdb: Add enable mask for groups of commands

2014-05-08 Thread Daniel Thompson
Stultz john.stu...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h | 1 + kernel/debug/kdb/kdb_main.c | 30 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/include/linux/kdb.h b/include/linux/kdb.h

[Kgdb-bugreport] [PATCH 1/3] kdb: Add framework to display sequence files

2014-05-08 Thread Daniel Thompson
files via kdb. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h | 5 + kernel/debug/kdb/kdb_io.c | 51 +++ 2 files changed, 56 insertions(+) diff --git a/include/linux/kdb.h b/include/linux/kdb.h index 290db12

[Kgdb-bugreport] [PATCH v4 2/9] kdb: Remove currently unused kdbtab_t-cmd_flags

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org The struct member is never used in the code, so we can remove it. We will introduce real flags soon by renaming cmd_repeat to cmd_flags. Signed-off-by: Anton Vorontsov anton.voront...@linaro.org Signed-off-by: John Stultz john.stu...@linaro.org

[Kgdb-bugreport] [PATCH v4 7/9] kdb: Categorize kdb commands (similar to SysRq categorization)

2014-05-08 Thread Daniel Thompson
: kill Reboot: reboot All:cpu, kgdb, (and all of the above), nmi_console Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h | 68 +- kernel/debug/kdb/kdb_bp.c | 21 ++ kernel/debug/kdb/kdb_main.c | 100

[Kgdb-bugreport] [PATCH v4 9/9] kdb: Allow access to sensitive commands to be restricted by default

2014-05-08 Thread Daniel Thompson
Currently kiosk mode must be explicitly requested by the bootloader or userspace. It is convenient to be able to change the default value in a similar manner to CONFIG_MAGIC_SYSRQ_DEFAULT_MASK. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- kernel/debug/kdb/kdb_main.c | 2 +- lib

[Kgdb-bugreport] [PATCH v4 4/9] kdb: Rename kdb_register_repeat() to kdb_register_flags()

2014-05-08 Thread Daniel Thompson
...@linaro.org Signed-off-by: John Stultz john.stu...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h | 10 +++--- kernel/debug/kdb/kdb_bp.c | 14 kernel/debug/kdb/kdb_main.c | 86 ++--- kernel/trace

[Kgdb-bugreport] [PATCH v4 8/9] kdb: Add enable mask for groups of commands

2014-05-08 Thread Daniel Thompson
Stultz john.stu...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- include/linux/kdb.h | 1 + kernel/debug/kdb/kdb_main.c | 30 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/include/linux/kdb.h b/include/linux/kdb.h

[Kgdb-bugreport] [PATCH 0/3] kdb: Infrastructure to display sequence files

2014-05-08 Thread Daniel Thompson
that kdb has interrupt context. Note also that some of the seq_operations structures hook into driver supplied code that will only be called if that driver is enabled so the test above are useful but cannot be exhaustive. Daniel Thompson (3): kdb: Add framework to display sequence files proc

[Kgdb-bugreport] [PATCH v4 5/9] kdb: Use KDB_REPEAT_* values as flags

2014-05-08 Thread Daniel Thompson
From: Anton Vorontsov anton.voront...@linaro.org The actual values of KDB_REPEAT_* enum values and overall logic stayed the same, but we now treat the values as flags. This makes it possible to add other flags and combine them, plus makes the code a lot simpler and shorter. But

[Kgdb-bugreport] [PATCH 3/3] kdb: Implement seq_file command

2014-05-08 Thread Daniel Thompson
of a brave expert an even bigger subset can be unsafely examined). Good arguments to try with this command include: cpuinfo_op, gpiolib_seq_ops and vmalloc_op. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- kernel/debug/kdb/kdb_io.c | 6 -- kernel/debug/kdb/kdb_main.c | 28

[Kgdb-bugreport] [PATCH 2/3] proc: Provide access to /proc/interrupts from kdb

2014-05-08 Thread Daniel Thompson
the file to be displayed from kdb. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- fs/proc/interrupts.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c index a352d57..1f8eeaf 100644 --- a/fs/proc/interrupts.c +++ b/fs/proc

[Kgdb-bugreport] [PATCH v2] tty: kgdb_nmi: Automatically manage tty enable

2014-07-16 Thread Daniel Thompson
use /dev/console or if it uses /dev/console only to log messages (O_WRONLY) then the user prompt is retained. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Jiri Slaby jsl...@suse.cz Cc: linux-ser...@vger.kernel.org Cc: Jason Wessel

[Kgdb-bugreport] [PATCH] kdb: Remove stack dump when entering kgdb due to NMI

2014-07-16 Thread Daniel Thompson
than like oops. Note also that the stack dump does not offer any information that cannot be trivial retrieved using the 'bt' command. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com Cc: Mike Travis tra...@sgi.com Cc: Ingo Molnar mi

[Kgdb-bugreport] [RESEND PATCH 3.17rc1] kdb: Remove stack dump when entering kgdb due to NMI

2014-08-18 Thread Daniel Thompson
than like oops. Note also that the stack dump does not offer any information that cannot be trivial retrieved using the 'bt' command. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com Cc: Mike Travis tra...@sgi.com Cc: Ingo Molnar mi

[Kgdb-bugreport] [PATCH 3.17-rc4 0/3] kdb: Improve command output searching

2014-09-11 Thread Daniel Thompson
This patchset improves kdb's capabilities to search the output of commands. Specifically it fixes a bug in the prompt management when '| grep' is used and adds a new feature to search command output interactively from the more prompt. Daniel Thompson (3): kdb: Fix a prompt management bug when

[Kgdb-bugreport] [PATCH 3.17-rc4 1/3] kdb: Fix a prompt management bug when using | grep

2014-09-11 Thread Daniel Thompson
Enter the kdb_grepping_flag is cleared when kdb_parse() tries to make sense of whatever they typed. This patch resolves the problem by moving the clearing of this flag from the middle of command processing to the beginning. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- kernel

[Kgdb-bugreport] [PATCH 3.17-rc4 2/3] kdb: Provide forward search at more prompt

2014-09-11 Thread Daniel Thompson
to navigate function traces because these traces often have a useful trigger string *before* the point of interest. This patch reuses the existing filtering logic to introduce a simple forward search to kdb that can be triggered from the more prompt. Signed-off-by: Daniel Thompson daniel.thomp

Re: [Kgdb-bugreport] [PATCH 3.17-rc4 v2 0/2] trace: kdb: Bug fixes for ftdump

2014-09-24 Thread Daniel Thompson
. Thanks! -- Steve On Wed, 24 Sep 2014 11:32:59 +0100 Daniel Thompson daniel.thomp...@linaro.org wrote: This patchset makes it possible to use kdb's ftdump command without panicing, crashing or livelocking. Changes since v1: * Fixed use-after-free problems in v1 by adding logic

Re: [Kgdb-bugreport] Instrument KGDB locally on target: is it possible?

2014-11-07 Thread Daniel Thompson
On 06/11/14 23:36, joaoandrefe...@sapo.pt wrote: Good evening, I'm wondering how complex (or possible) would be to instrument locally KGDB on the target machine, i. e., somehow remove the serial connection (and the host machine, GDB) from the setup, since on this new scenario the host

Re: [Kgdb-bugreport] Instrument KGDB locally on target: is it possible?

2014-11-14 Thread Daniel Thompson
On 14/11/14 01:29, joaoandrefe...@sapo.pt wrote: Citando Daniel Thompson daniel.thomp...@linaro.org: On 06/11/14 23:36, joaoandrefe...@sapo.pt wrote: Good evening, I'm wondering how complex (or possible) would be to instrument locally KGDB on the target machine, i. e., somehow remove

Re: [Kgdb-bugreport] How to estimate how much time the target has been idle? (3 possible solutions)

2014-11-14 Thread Daniel Thompson
On 14/11/14 02:51, joaoandrefe...@sapo.pt wrote: Good evening, I've made a small bash script that performs a single bit-flip on a target with KGDB. It tells it to stop, makes the bit-slip, and resumes the target's execution. I need to estimate, as accurately as possible, the impact /

Re: [Kgdb-bugreport] [RFC] debug: add parameters to prevent entering debug mode on errors

2014-11-18 Thread Daniel Thompson
On 18/11/14 12:08, Kiran Kumar Raparthy wrote: From: Colin Cross ccr...@android.com debug: add parameters to prevent entering debug mode on errors On non-developer devices kgdb prevents CONFIG_PANIC_TIMEOUT from rebooting the device after a panic. Add module parameters

Re: [Kgdb-bugreport] [RFC] debug: add parameters to prevent entering debug mode on errors

2014-11-20 Thread Daniel Thompson
On 20/11/14 08:18, Kiran Raparthy wrote: Hi Daniel, On 18 November 2014 22:43, Daniel Thompson daniel.thomp...@linaro.org wrote: On 18/11/14 12:08, Kiran Kumar Raparthy wrote: From: Colin Cross ccr...@android.com debug: add parameters to prevent entering debug mode on errors On non

Re: [Kgdb-bugreport] [RFC v3] debug: prevent entering debug mode on errors

2014-11-27 Thread Daniel Thompson
On 26/11/14 17:45, Colin Cross wrote: On Wed, Nov 26, 2014 at 1:14 AM, Kiran Raparthy kiran.ku...@linaro.org wrote: From: Colin Cross ccr...@android.com debug: prevent entering debug mode on errors On non-developer devices kgdb prevents CONFIG_PANIC_TIMEOUT from rebooting the device

[Kgdb-bugreport] [PULL] kgdb patches for 3.20

2015-02-06 Thread Daniel Thompson
. Colin Cross (1): debug: prevent entering debug mode on panic/exception. Daniel Thompson (5): kdb: Avoid printing KERN_ levels to consoles kdb: Remove stack dump when entering kgdb due to NMI kdb: Fix a prompt management bug when using | grep kdb: Provide

Re: [Kgdb-bugreport] [RFC v5 - RESEND] debug: prevent entering debug mode on panic/exception.

2015-01-28 Thread Daniel Thompson
message. panic_timeout is used instead of break_on_panic and break_on_exception to honor CONFIG_PANIC_TIMEOUT Modified the commit as per community feedback] Signed-off-by: Kiran Raparthy kiran.ku...@linaro.org Reviewed-by: Daniel Thompson daniel.thomp...@linaro.org --- kernel/debug

Re: [Kgdb-bugreport] Getting Linux kernel symbols to resolve in kgdb

2015-01-06 Thread Daniel Thompson
On 05/01/15 22:59, Jake Oshins wrote: (gdb) target remote /dev/ttyS0 Remote debugging using /dev/ttyS0 0x9e120bd4 in ?? () (gdb) cont Continuing. [Inferior 1 (Remote target) exited with code 01] (gdb) cont The program is not being run. (gdb) target remote /dev/ttyS0 Remote

Re: [Kgdb-bugreport] [RFC v4] debug: prevent entering debug mode on panic/exception.

2015-01-06 Thread Daniel Thompson
On 06/01/15 00:14, Andrew Morton wrote: On Tue, 23 Dec 2014 18:08:29 +0530 Kiran Raparthy kiran.ku...@linaro.org wrote: From: Colin Cross ccr...@android.com debug: prevent entering debug mode on panic/exception. On non-developer devices, kgdb prevents the device from rebooting after a

[Kgdb-bugreport] [RESEND PATCH v5 3.19-rc2 0/8] kdb: Allow selective reduction in capabilities

2015-01-12 Thread Daniel Thompson
-cmd_flags kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags kdb: Rename kdb_register_repeat() to kdb_register_flags() kdb: Use KDB_REPEAT_* values as flags kdb: Remove KDB_REPEAT_NONE flag kdb: Add enable mask for groups of commands Daniel Thompson (2): kdb: Categorize

[Kgdb-bugreport] [RESEND PATCH v5 3.19-rc2 5/8] kdb: Remove KDB_REPEAT_NONE flag

2015-01-12 Thread Daniel Thompson
...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com --- include/linux/kdb.h | 1 - kernel/debug/kdb/kdb_bp.c | 6 ++--- kernel/debug/kdb/kdb_main.c | 59 ++--- kernel/trace/trace_kdb.c

[Kgdb-bugreport] [RESEND PATCH v5 3.19-rc2 7/8] kdb: Add enable mask for groups of commands

2015-01-12 Thread Daniel Thompson
Stultz john.stu...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com --- include/linux/kdb.h | 1 + kernel/debug/kdb/kdb_main.c | 30 +- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git

[Kgdb-bugreport] [RESEND PATCH 3.19-rc2 1/3] kdb: Fix a prompt management bug when using | grep

2015-01-12 Thread Daniel Thompson
Enter and the kdb_grepping_flag is cleared as kdb_parse() tries to make sense of whatever they typed. This patch resolves the problem by moving the clearing of this flag from the middle of command processing to the beginning. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- kernel

[Kgdb-bugreport] [RESEND PATCH 3.19-rc2 2/3] kdb: Provide forward search at more prompt

2015-01-12 Thread Daniel Thompson
to navigate function traces because these traces often have a useful trigger string *before* the point of interest. This patch reuses the existing filtering logic to introduce a simple forward search to kdb that can be triggered from the more prompt. Signed-off-by: Daniel Thompson daniel.thomp

[Kgdb-bugreport] [RESEND PATCH v3 3.19-rc2] kdb: Avoid printing KERN_ levels to consoles

2015-01-12 Thread Daniel Thompson
: convert the format for KERN_LEVEL to a 2 byte pattern). Note also that this patch does *not* restore the original behaviour from v3.5. Instead it makes printk() from within a kdb command display the message without any prefix (i.e. like printk() normally does). Signed-off-by: Daniel Thompson

[Kgdb-bugreport] [RESEND PATCH v5 3.19-rc2 6/8] kdb: Categorize kdb commands (similar to SysRq categorization)

2015-01-12 Thread Daniel Thompson
: kill Reboot: reboot All:cpu, kgdb, (and all of the above), nmi_console Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com --- include/linux/kdb.h | 48 +- kernel/debug/kdb/kdb_bp.c | 21

[Kgdb-bugreport] [RESEND PATCH 3.19-rc2 0/3] kdb: Improve command output searching

2015-01-12 Thread Daniel Thompson
spotted when implementing the other two patches. Daniel Thompson (3): kdb: Fix a prompt management bug when using | grep kdb: Provide forward search at more prompt kdb: Const qualifier for kdb_getstr's prompt argument kernel/debug/kdb/kdb_io.c | 24 +--- kernel/debug/kdb

[Kgdb-bugreport] [RESEND PATCH v3.19-rc2] kdb: Remove stack dump when entering kgdb due to NMI

2015-01-12 Thread Daniel Thompson
than like oops. Note also that the stack dump does not offer any information that cannot be trivial retrieved using the 'bt' command. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com --- kernel/debug/kdb/kdb_main.c | 1 - 1 file changed, 1

[Kgdb-bugreport] [RESEND PATCH v5 3.19-rc2 2/8] kdb: Rename kdb_repeat_t to kdb_cmdflags_t, cmd_repeat to cmd_flags

2015-01-12 Thread Daniel Thompson
-by: John Stultz john.stu...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com --- include/linux/kdb.h| 6 +++--- kernel/debug/kdb/kdb_main.c| 6 +++--- kernel/debug/kdb/kdb_private.h | 2 +- 3 files changed, 7 insertions

[Kgdb-bugreport] [RESEND PATCH 3.19-rc2 3/3] kdb: Const qualifier for kdb_getstr's prompt argument

2015-01-12 Thread Daniel Thompson
All current callers of kdb_getstr() can pass constant pointers via the prompt argument. This patch adds a const qualification to make explicit the fact that this is safe. Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org --- kernel/debug/kdb/kdb_io.c | 2 +- kernel/debug/kdb

[Kgdb-bugreport] [RESEND PATCH v5 3.19-rc2 3/8] kdb: Rename kdb_register_repeat() to kdb_register_flags()

2015-01-12 Thread Daniel Thompson
...@linaro.org Signed-off-by: John Stultz john.stu...@linaro.org Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com --- include/linux/kdb.h | 10 +++--- kernel/debug/kdb/kdb_bp.c | 14 kernel/debug/kdb/kdb_main.c | 86

[Kgdb-bugreport] [RESEND PATCH v5 3.19-rc2 1/8] kdb: Remove currently unused kdbtab_t-cmd_flags

2015-01-12 Thread Daniel Thompson
Signed-off-by: Daniel Thompson daniel.thomp...@linaro.org Cc: Jason Wessel jason.wes...@windriver.com --- kernel/debug/kdb/kdb_main.c| 1 - kernel/debug/kdb/kdb_private.h | 1 - 2 files changed, 2 deletions(-) diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index

[Kgdb-bugreport] kgdb-next not pushed to Linus for 3.19

2015-01-06 Thread Daniel Thompson
Hi Jason I'm trying to figure out what to do with my long-outstanding kgdb/kdb patches in preparation for the 3.20 merge window. As of now I have five pending patch sets some of which are well over six months old (and none have nay outstanding review comments). When I raised this with you a

Re: [Kgdb-bugreport] [RFC v4] debug: prevent entering debug mode on panic/exception.

2015-01-06 Thread Daniel Thompson
On 06/01/15 00:14, Andrew Morton wrote: We appear to have forgotten to document panic_timeout. Sigh. I knew I'd seen it somewhere... Once its been sysctlised it ends up called panic: https://www.kernel.org/doc/Documentation/sysctl/kernel.txt

Re: [Kgdb-bugreport] [RFC v4] debug: prevent entering debug mode on panic/exception.

2015-01-07 Thread Daniel Thompson
On 06/01/15 21:16, Andrew Morton wrote: On Tue, 06 Jan 2015 15:31:31 + Daniel Thompson daniel.thomp...@linaro.org wrote: On 06/01/15 00:14, Andrew Morton wrote: We appear to have forgotten to document panic_timeout. Sigh. I knew I'd seen it somewhere... Once its been sysctlised

Re: [Kgdb-bugreport] [PULL] kgdb patches for 3.20

2015-02-11 Thread Daniel Thompson
On 06/02/15 07:42, Jason Wessel wrote: On 02/06/2015 06:20 AM, Daniel Thompson wrote: The following changes since commit e36f014edff70fc02b3d3d79cead1d58f289332e: Linux 3.19-rc7 (2015-02-01 20:07:21 -0800) are available in the git repository at: https://git.linaro.org/people

Re: [Kgdb-bugreport] kgdb-next not pushed to Linus for 3.19

2015-01-07 Thread Daniel Thompson
On 06/01/15 22:30, Jason Wessel wrote: On 01/06/2015 03:21 PM, Andrew Morton wrote: On Tue, 06 Jan 2015 10:57:42 -0800 Joe Perches j...@perches.com wrote: On Tue, 2015-01-06 at 18:54 +, Daniel Thompson wrote: Hi Jason I'm trying to figure out what to do with my long-outstanding kgdb/kdb

Re: [Kgdb-bugreport] kdb: core for kgdb back end (1 of 2)

2015-03-02 Thread Daniel Thompson
On Thu, 2015-02-26 at 14:16 +0300, Dan Carpenter wrote: Hello Jason Wessel, The patch 5d5314d6795f: kdb: core for kgdb back end (1 of 2) from May 20, 2010, leads to the following static checker warning: kernel/debug/kdb/kdb_io.c:352 kdb_read() warn: bool is not less than zero.

Re: [Kgdb-bugreport] [PATCH] kdb: match return value to function signature

2015-05-12 Thread Daniel Thompson
kdb_task_state_string(const char *s) { - long res = 0; + unsigned long res = 0; if (!s) { s = kdbgetenv(PS); if (!s) Reviewed-by: Daniel Thompson daniel.thomp...@linaro.org [providing the above tab/space comment above addressed

Re: [Kgdb-bugreport] About kgdb hardware breakpoint/watchpoint.

2015-07-01 Thread Daniel Thompson
On 01/07/15 10:01, Prafull Suryawanshi wrote: Hi, Anyone can point me what function of KGDB code gets called when hardware watchpoint or breakpoint hits. I earlier asked question about aarch64 hardware watchpoint but I think this is proper question. You mean how does the arm64 specific trap

Re: [Kgdb-bugreport] About kgdb hardware breakpoint/watchpoint.

2015-07-02 Thread Daniel Thompson
On 02/07/15 07:40, Prafull Suryawanshi wrote: Thanks Daniel for reply. On 01/07/15 10:01, Prafull Suryawanshi wrote: Hi, Anyone can point me what function of KGDB code gets called when hardware watchpoint or breakpoint hits. I earlier asked question about aarch64 hardware watchpoint but I

Re: [Kgdb-bugreport] [PATCH] kdb: Replace strncasecmp with strcasecmp

2016-03-14 Thread Daniel Thompson
On 14/03/16 02:27, Joe Perches wrote: > Remove the unnecessary last sizeof("foo") argument to strncasecmp using > strcasecmp without that sizeof as it iss equivalent, simpler and smaller. > > Signed-off-by: Joe Perches <j...@perches.com> Reviewed-by: Daniel Thompson

Re: [Kgdb-bugreport] [RESEND PATCH] arm64: kgdb: fix single stepping

2016-09-15 Thread Daniel Thompson
On 15/09/16 08:56, AKASHI Takahiro wrote: > On Wed, Sep 14, 2016 at 03:58:51PM +0100, Will Deacon wrote: >> Hi Akashi, >> >> On Tue, Apr 21, 2015 at 02:13:13AM +0100, AKASHI Takahiro wrote: >>> Could you please review my patch below? >>> See also arm64 maintainer's comment: >>>

Re: [Kgdb-bugreport] [PATCH] debug: More properly delay for secondary CPUs

2016-10-18 Thread Daniel Thompson
On 14/10/16 19:41, Douglas Anderson wrote: > We've got a delay loop waiting for secondary CPUs. That loop uses > loops_per_jiffy. However, loops_per_jiffy doesn't actually mean how > many tight loops make up a jiffy on all architectures. It is quite > common to see things like this in the boot

Re: [Kgdb-bugreport] [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info

2017-04-21 Thread Daniel Thompson
On 21/04/17 03:26, Li Qiang wrote: > > @Daniel > > 2017-04-20 23:28 GMT+08:00 Daniel Thompson <daniel.thomp...@linaro.org > <mailto:daniel.thomp...@linaro.org>>: > > On 19/04/17 02:58, Li Qiang wrote: > > CONFIG_STRICT_KERNEL_RWX is no longer sel

Re: [Kgdb-bugreport] [PATCH] Documentation: DocBook: kgdb: update CONFIG_STRICT_KERNEL_RWX info

2017-04-20 Thread Daniel Thompson
On 19/04/17 02:58, Li Qiang wrote: > CONFIG_STRICT_KERNEL_RWX is no longer selectable on most architectures. > Update this info to thedocumentation. "git grep STRICT_KERNEL_RWX" comes up with nothing. It is selectable on any architecture? If not we should remove it entirely! Daniel. > >

Re: [Kgdb-bugreport] [PATCH] kdb: remove unnecessary variable assignment in kdb_bc()

2017-06-23 Thread Daniel Thompson
On 22/06/17 23:41, Gustavo A. R. Silva wrote: Value assigned to variable _bp_ at line 415 is the same as at line 434. This makes such variable assignment unnecessary. Addresses-Coverity-ID: 1227025 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> Reviewed-by: Daniel Th

Re: [Kgdb-bugreport] KGDB/KDB treats WARN*() as Oops on x86 since 4.12

2017-10-13 Thread Daniel Thompson
On 09/10/17 13:24, Ilya Dryomov wrote: Hi Jason, Starting with 4.12, WARN*() is implemented with ud0, generating an Invalid Opcode exception. KGDB/KDB gets entered as if it were an Oops, making KGDB/KDB rather hard to use, particularly on testing kernels. Alexander posted a fix a while back,

Re: [Kgdb-bugreport] [PATCH] misc: kgdbts: Display progress of asynchronous tests

2017-12-14 Thread Daniel Thompson
On 14/12/17 15:20, Jason Wessel wrote: On 12/12/2017 06:10 AM, Daniel Thompson wrote: kgdbts includes a couple of different "thrashing" style tests that may have long runtimes (especially on simulated platforms) and which run asynchronously. This is uncomfortable for interactive use

[Kgdb-bugreport] [PATCH] MAINTAINERS: kgdb: Replace Jason with Daniel

2017-12-05 Thread Daniel Thompson
... with many, many thanks for Jason for all his hard work. Cc: Jason Wessel <jason.wes...@windriver.com> Signed-off-by: Daniel Thompson <daniel.thomp...@linaro.org> --- Notes: Over the years Jason has become increasingly hard to get hold off and I think he must now

[Kgdb-bugreport] [PATCH] misc: kgdbts: Display progress of asynchronous tests

2017-12-12 Thread Daniel Thompson
ns to show progress during these tests. Selecting 100 is somewhat arbitrary but it matches the step used on the synchronous tests, is large enough to keep the call to printk from invalidating the testing and is human enough to "feel about right". Signed-off-by: Daniel Thompson <dan

Re: [Kgdb-bugreport] [PATCH] MAINTAINERS: kgdb: Replace Jason with Daniel

2017-12-05 Thread Daniel Thompson
On 05/12/17 14:37, Jason Wessel wrote: On 12/05/2017 08:09 AM, Lee Jones wrote: On Tue, 05 Dec 2017, Daniel Thompson wrote: ... with many, many thanks for Jason for all his hard work. Cc: Jason Wessel <jason.wes...@windriver.com> Signed-off-by: Daniel Thompson <daniel.thomp...@l

Re: [Kgdb-bugreport] [PATCH] arm64: fix single step issue in kgdb

2018-04-28 Thread Daniel Thompson
On Fri, Apr 20, 2018 at 08:57:08PM +0800, Wei Li wrote: > Because the former mail is in html by my mistake, it is rejected by > the mailing list server. I'm afraid that switching to plain text isn't quite enough; the patch appears to be corrupt. I'd personally suggest switching over to `git

Re: [Kgdb-bugreport] [PATCH] misc: kgdbts: silence array underflow warning

2018-05-17 Thread Daniel Thompson
On Thu, May 17, 2018 at 03:22:29PM +0300, Dan Carpenter wrote: > Smatch distrusts simple_strtol(). I don't know the code well enough > to say if the distrust is justified here, but it seems harmless to > silence the warning. What warning does this fix? I'd prefer to have it in the description.

Re: [Kgdb-bugreport] [PATCH] kdb: prefer strlcpy to strncpy

2018-05-30 Thread Daniel Thompson
On Tue, May 29, 2018 at 07:01:35PM -0700, Nick Desaulniers wrote: > On Tue, May 29, 2018 at 12:57 AM, Arnd Bergmann wrote: > > On Tue, May 29, 2018 at 7:57 AM, Nick Desaulniers > > wrote: > >> Fixes stringop-truncation and stringop-overflow warnings from gcc-8. > > > > That patch description

Re: [Kgdb-bugreport] [PATCH 1/1] agent-proxy: improve error handling

2018-05-01 Thread Daniel Thompson
On Mon, Apr 30, 2018 at 01:34:38PM +0200, Heinrich Schuchardt wrote: > If the baud rate cannot be set provide an error message and abort. > > Signed-off-by: Heinrich Schuchardt I was about to ack this but no need! Jason has already merged it. Daniel. > --- >

Re: [Kgdb-bugreport] [PATCH] kdb: use ktime_get_seconds() instead of ktime_get_ts()

2018-01-26 Thread Daniel Thompson
On Fri, Jan 26, 2018 at 10:21:58AM +0100, Arnd Bergmann wrote: > On Fri, Jan 26, 2018 at 4:03 AM, Baolin Wang wrote: > > The kdb code will print the monotonic time by ktime_get_ts(), but > > the ktime_get_ts() will be protected by a sequence lock, that will > > introduce

Re: [Kgdb-bugreport] [PATCH] kdb: Change timespec to use timespec64

2018-01-25 Thread Daniel Thompson
On Thu, Jan 25, 2018 at 05:18:54PM +0800, Baolin Wang wrote: > On 25 January 2018 at 16:55, Arnd Bergmann wrote: > > On Thu, Jan 25, 2018 at 9:05 AM, Baolin Wang wrote: > >> @@ -2554,7 +2554,7 @@ static int kdb_summary(int argc, const char **argv) > >>

Re: [Kgdb-bugreport] [PATCH v2] kdb: use ktime_get_mono_fast_ns() instead of ktime_get_ts()

2018-01-30 Thread Daniel Thompson
h we entered the debugger. > > Thus we can use the ktime_get_mono_fast_ns() to get the monotonic > time, which is NMI safe access to clock monotonic. Moreover we can > remove the 'struct timespec', which is not y2038 safe. > > Signed-off-by: Baolin Wang <baolin.w...@linaro.o

Re: [Kgdb-bugreport] [PATCH] kdb: kdb_main: mark expected switch fall-throughs

2018-08-15 Thread Daniel Thompson
On 05/08/18 05:14, Gustavo A. R. Silva wrote: In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 115090 ("Missing break in switch") Addresses-Coverity-ID: 115091 ("Missing break in switch") Addresses-Coverity-ID:

Re: [Kgdb-bugreport] [PATCH] kdb: kdb_keyboard: mark expected switch fall-throughs

2018-08-15 Thread Daniel Thompson
expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Daniel Thompson --- kernel/debug/kdb/kdb_keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/debug/kdb/kdb_keyboard.c b/kernel/debug/kdb/kdb_keyboard.c index 118527a..750497b 100644 --

Re: [Kgdb-bugreport] [PATCH] kdb: kdb_support: mark expected switch fall-throughs

2018-08-15 Thread Daniel Thompson
expecting to find. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Daniel Thompson --- kernel/debug/kdb/kdb_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/debug/kdb/kdb_support.c b/kernel/debug/kdb/kdb_support.c index 990b3cc..89ac604 100644 --

Re: [Kgdb-bugreport] [PATCH] kdb: kdb_main: refactor code in kdb_md_line

2018-08-16 Thread Daniel Thompson
Missing break in switch") > Addresses-Coverity-ID: 115091 ("Missing break in switch") > Addresses-Coverity-ID: 114700 ("Missing break in switch") > > Suggested-by: Daniel Thompson > Signed-off-by: Gustavo A. R. Silva > --- > kernel/debug/kdb/kdb_ma

Re: [Kgdb-bugreport] [PATCH] kgdboc: Passing ekgdboc to command line causes panic

2018-08-14 Thread Daniel Thompson
On Wed, Aug 08, 2018 at 11:59:44PM +0800, zhe...@windriver.com wrote: > From: He Zhe > > kgdboc_option_setup does not check input argument before passing it > to strlen. The argument would be a NULL pointer if "ekgdboc", without > its value, is set in command line and thus cause the following

Re: [Kgdb-bugreport] [PATCH v2] kdb: kdb_main: refactor code in kdb_md_line

2018-08-17 Thread Daniel Thompson
Missing break in switch") > Addresses-Coverity-ID: 115091 ("Missing break in switch") > Addresses-Coverity-ID: 114700 ("Missing break in switch") > > Suggested-by: Daniel Thompson > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Daniel Thompson > --- &g

Re: [Kgdb-bugreport] [PATCH v3 2/2] kgdboc: Change printk to the right fashion

2018-08-17 Thread Daniel Thompson
On Tue, Aug 14, 2018 at 10:57:40PM +0800, zhe...@windriver.com wrote: > From: He Zhe > > pr_* is preferred according to scripts/checkpatch.pl. > > Signed-off-by: He Zhe I thought I'd already done this but it looks like maybe I didn't get round to it... Acked-by: Daniel Thomps

Re: [Kgdb-bugreport] [PATCH v2 2/2] kgdboc: Change printk to the right fashion

2018-08-14 Thread Daniel Thompson
On Tue, Aug 14, 2018 at 07:04:11AM -0700, Joe Perches wrote: > On Tue, 2018-08-14 at 14:35 +0100, Daniel Thompson wrote: > > On Tue, Aug 14, 2018 at 08:46:01PM +0800, zhe...@windriver.com wrote: > > > From: He Zhe > > > > > > pr_* is preferred according to sc

Re: [Kgdb-bugreport] [PATCH v2 2/2] kgdboc: Change printk to the right fashion

2018-08-14 Thread Daniel Thompson
On Tue, Aug 14, 2018 at 08:46:01PM +0800, zhe...@windriver.com wrote: > From: He Zhe > > pr_* is preferred according to scripts/checkpatch.pl. > > Cc: sta...@vger.kernel.org This change does not "fix a problem that causes a build error (but not for things marked CONFIG_BROKEN), an oops, a

Re: [Kgdb-bugreport] [PATCH v2 1/2] kgdboc: Passing ekgdboc to command line causes panic

2018-08-14 Thread Daniel Thompson
!opt) { > + pr_err("kgdboc: null option\n"); Apologies... I should have picked this up when I replied earlier but this error message describes what the function gets when I think it should report what the user actually did. So should be something like: p

Re: [Kgdb-bugreport] [PATCH] kdb: use bool for binary state indicators

2018-07-20 Thread Daniel Thompson
; indication here. > > Signed-off-by: Nicholas Mc Guire Reviewed-by: Daniel Thompson > --- > > Found during code review. > Not a functional issue - just type correctness. > > Patch was compile tested with: x86_64_defconfig + CONFIG_KGDB=y, > CONFIG_KGDB_KDB=y >

Re: [Kgdb-bugreport] [PATCH 14/18] kdb_support: change strncpy+truncation to strlcpy

2018-07-16 Thread Daniel Thompson
On Fri, Jul 13, 2018 at 05:18:51PM +0200, Dominique Martinet wrote: > Daniel Thompson wrote on Fri, Jul 13, 2018: > > On Fri, Jul 13, 2018 at 03:25:58AM +0200, Dominique Martinet wrote: > > > Generated by scripts/coccinelle/misc/strncpy_truncation.cocci > > > >

[Kgdb-bugreport] [PATCH 1/5] kdb: Tidy up code to handle escape sequences

2018-08-31 Thread Daniel Thompson
the control flow. This makes the main body of the code easier to review. Signed-off-by: Daniel Thompson --- kernel/debug/kdb/kdb_io.c | 127 -- 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb

[Kgdb-bugreport] [PATCH 4/5] kdb: Improve handling of characters from different input sources

2018-08-31 Thread Daniel Thompson
character rather then the '\e'. This is a bigger refactor that might be expected because the new character needs to go through escape sequence detection. Signed-off-by: Daniel Thompson --- kernel/debug/kdb/kdb_io.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions

[Kgdb-bugreport] [PATCH 3/5] kdb: Remove special case logic from kdb_read()

2018-08-31 Thread Daniel Thompson
can also rename in order to make its role clearer. Signed-off-by: Daniel Thompson --- kernel/debug/kdb/kdb_io.c | 56 --- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/kernel/debug/kdb/kdb_io.c b/kernel/debug/kdb/kdb_io.c index 0ba490728459

  1   2   3   4   5   >