<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/misc/kgdbts.c, branch PD13.0.0alpha</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>kgdbts: only use new asm-generic/ptrace.h api when needed</title>
<updated>2011-06-01T07:35:01+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-05-28T14:04:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=603d04b2010976a52f62b7633f9999d104046900'/>
<id>603d04b2010976a52f62b7633f9999d104046900</id>
<content type='text'>
The new instruction_pointer_set helper is defined for people who have
converted to asm-generic/ptrace.h, so don't use it generally unless
the arch needs it (in which case it has been converted).  This should
fix building of kgdb tests for arches not yet converted.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The new instruction_pointer_set helper is defined for people who have
converted to asm-generic/ptrace.h, so don't use it generally unless
the arch needs it (in which case it has been converted).  This should
fix building of kgdb tests for arches not yet converted.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdbts: unify/generalize gdb breakpoint adjustment</title>
<updated>2011-05-27T00:12:36+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-05-26T23:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=63ab25ebbc50f74550bd8d164a34724b498f6fb9'/>
<id>63ab25ebbc50f74550bd8d164a34724b498f6fb9</id>
<content type='text'>
The Blackfin arch, like the x86 arch, needs to adjust the PC manually
after a breakpoint is hit as normally this is handled by the remote gdb.
However, rather than starting another arch ifdef mess, create a common
GDB_ADJUSTS_BREAK_OFFSET define for any arch to opt-in via their kgdb.h.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@mvista.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Blackfin arch, like the x86 arch, needs to adjust the PC manually
after a breakpoint is hit as normally this is handled by the remote gdb.
However, rather than starting another arch ifdef mess, create a common
GDB_ADJUSTS_BREAK_OFFSET define for any arch to opt-in via their kgdb.h.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Acked-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
Cc: Sergei Shtylyov &lt;sshtylyov@mvista.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix common misspellings</title>
<updated>2011-03-31T14:26:23+00:00</updated>
<author>
<name>Lucas De Marchi</name>
<email>lucas.demarchi@profusion.mobi</email>
</author>
<published>2011-03-31T01:57:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=25985edcedea6396277003854657b5f3cb31a628'/>
<id>25985edcedea6396277003854657b5f3cb31a628</id>
<content type='text'>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi &lt;lucas.demarchi@profusion.mobi&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdboc,kgdbts: strlen() doesn't count the terminator</title>
<updated>2011-03-25T21:37:30+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2010-03-15T12:28:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=adb4b83c12f9d966ea3478aa14c60511467c9916'/>
<id>adb4b83c12f9d966ea3478aa14c60511467c9916</id>
<content type='text'>
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.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdbts: prevent re-entry to kgdbts before it unregisters</title>
<updated>2010-10-29T18:14:41+00:00</updated>
<author>
<name>Dongdong Deng</name>
<email>dongdong.deng@windriver.com</email>
</author>
<published>2010-08-31T02:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4dacd5c073150cd78dfb6004cbfa71986f0258a4'/>
<id>4dacd5c073150cd78dfb6004cbfa71986f0258a4</id>
<content type='text'>
The "kgdb_connected" variable of debug_core just indicates whether or
not kgdbts is connected to the debug_core.  It does not completely
prevent a script from trying invoke kgdbts again and possibly crashing
the system (see Call Trace below).

The configured variable in kgtbts can be used instead of
kgdb_connected instead of kgdb_connected. The cleanup_kgdbts() can
also be removed because there is no possible way to build kgdbts as a
kernel module that you could unload with rmmod.

Call Trace:
-----------------------------------------------------------------
root:/$ echo kgdbts=V1S1000 &gt; /sys/module/kgdbts/parameters/kgdbts
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
------------[ cut here ]------------
WARNING: at kernel/debug/debug_core.c:1002
kgdb_unregister_io_module+0xec/0x100()
Hardware name: Moon Creek platform
Modules linked in:
Pid: 664, comm: sh Not tainted 2.6.34.1-WR4.0.0.0_standard #58
Call Trace:
 [&lt;c103b1ed&gt;] warn_slowpath_common+0x6d/0xa0
 [&lt;c1079fdc&gt;] ? kgdb_unregister_io_module+0xec/0x100
 [&lt;c1079fdc&gt;] ? kgdb_unregister_io_module+0xec/0x100
 [&lt;c10544e0&gt;] ? param_attr_store+0x0/0x20
 [&lt;c103b235&gt;] warn_slowpath_null+0x15/0x20
 [&lt;c1079fdc&gt;] kgdb_unregister_io_module+0xec/0x100
 [&lt;c124e4ea&gt;] cleanup_kgdbts+0x1a/0x20
 [&lt;c124eced&gt;] param_set_kgdbts_var+0x6d/0xb0
 [&lt;c124ec80&gt;] ? param_set_kgdbts_var+0x0/0xb0
 [&lt;c10544f7&gt;] param_attr_store+0x17/0x20
 [&lt;c105457c&gt;] module_attr_store+0x2c/0x40
 [&lt;c111fe84&gt;] sysfs_write_file+0x94/0xf0
 [&lt;c10d42f6&gt;] vfs_write+0x96/0x130
 [&lt;c111fdf0&gt;] ? sysfs_write_file+0x0/0xf0
 [&lt;c10d44d6&gt;] sys_write+0x46/0xd0
 [&lt;c13bf329&gt;] system_call_done+0x0/0x4
---[ end trace 4eb028c6ee43154c ]---
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
-----------------------------------------------------------------

[jason.wessel@windriver.com: remove cleanup_kgdbts() ]
Signed-off-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "kgdb_connected" variable of debug_core just indicates whether or
not kgdbts is connected to the debug_core.  It does not completely
prevent a script from trying invoke kgdbts again and possibly crashing
the system (see Call Trace below).

The configured variable in kgtbts can be used instead of
kgdb_connected instead of kgdb_connected. The cleanup_kgdbts() can
also be removed because there is no possible way to build kgdbts as a
kernel module that you could unload with rmmod.

Call Trace:
-----------------------------------------------------------------
root:/$ echo kgdbts=V1S1000 &gt; /sys/module/kgdbts/parameters/kgdbts
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
------------[ cut here ]------------
WARNING: at kernel/debug/debug_core.c:1002
kgdb_unregister_io_module+0xec/0x100()
Hardware name: Moon Creek platform
Modules linked in:
Pid: 664, comm: sh Not tainted 2.6.34.1-WR4.0.0.0_standard #58
Call Trace:
 [&lt;c103b1ed&gt;] warn_slowpath_common+0x6d/0xa0
 [&lt;c1079fdc&gt;] ? kgdb_unregister_io_module+0xec/0x100
 [&lt;c1079fdc&gt;] ? kgdb_unregister_io_module+0xec/0x100
 [&lt;c10544e0&gt;] ? param_attr_store+0x0/0x20
 [&lt;c103b235&gt;] warn_slowpath_null+0x15/0x20
 [&lt;c1079fdc&gt;] kgdb_unregister_io_module+0xec/0x100
 [&lt;c124e4ea&gt;] cleanup_kgdbts+0x1a/0x20
 [&lt;c124eced&gt;] param_set_kgdbts_var+0x6d/0xb0
 [&lt;c124ec80&gt;] ? param_set_kgdbts_var+0x0/0xb0
 [&lt;c10544f7&gt;] param_attr_store+0x17/0x20
 [&lt;c105457c&gt;] module_attr_store+0x2c/0x40
 [&lt;c111fe84&gt;] sysfs_write_file+0x94/0xf0
 [&lt;c10d42f6&gt;] vfs_write+0x96/0x130
 [&lt;c111fdf0&gt;] ? sysfs_write_file+0x0/0xf0
 [&lt;c10d44d6&gt;] sys_write+0x46/0xd0
 [&lt;c13bf329&gt;] system_call_done+0x0/0x4
---[ end trace 4eb028c6ee43154c ]---
kgdb: Unregistered I/O driver kgdbts, debugger disabled.
-----------------------------------------------------------------

[jason.wessel@windriver.com: remove cleanup_kgdbts() ]
Signed-off-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdbts,sh: Add in breakpoint pc offset for superh</title>
<updated>2010-04-02T19:58:17+00:00</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2010-04-02T16:31:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cad08acebf4b7d993b0cefb9af67208c48fb9a5e'/>
<id>cad08acebf4b7d993b0cefb9af67208c48fb9a5e</id>
<content type='text'>
The kgdb test suite mimics the behavior of gdb.  For the sh
architecture the pc must be decremented by 2 for software breakpoint.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The kgdb test suite mimics the behavior of gdb.  For the sh
architecture the pc must be decremented by 2 for software breakpoint.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Acked-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdb: Replace strstr() by strchr() for single-character needles</title>
<updated>2009-12-11T14:43:15+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2009-12-11T14:43:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59d309f9c8ef0bd01bf93cc0e758f1d810417bdb'/>
<id>59d309f9c8ef0bd01bf93cc0e758f1d810417bdb</id>
<content type='text'>
Some versions of gcc replace calls to strstr() with single-character
"needle" string parameters by calls to strchr() behind our back.
This causes linking errors if strchr() is defined as an inline function
in &lt;asm/string.h&gt; (e.g. on m68k, which BTW doesn't have kgdb support).

Prevent this by explicitly calling strchr() instead.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some versions of gcc replace calls to strstr() with single-character
"needle" string parameters by calls to strchr() behind our back.
This causes linking errors if strchr() is defined as an inline function
in &lt;asm/string.h&gt; (e.g. on m68k, which BTW doesn't have kgdb support).

Prevent this by explicitly calling strchr() instead.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdbts: Read buffer overflow</title>
<updated>2009-12-11T14:43:15+00:00</updated>
<author>
<name>Roel Kluin</name>
<email>roel.kluin@gmail.com</email>
</author>
<published>2009-12-11T14:43:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b4f1b67be99d6eda8f2f252460905858ace871ef'/>
<id>b4f1b67be99d6eda8f2f252460905858ace871ef</id>
<content type='text'>
Prevent write to put_buf[BUFMAX] in kgdb test suite.

If put_buf_cnt was BUFMAX - 1 at the earlier test,
`\0' is written to put_buf[BUFMAX].

Signed-off-by: Roel Kluin &lt;roel.kluin@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent write to put_buf[BUFMAX] in kgdb test suite.

If put_buf_cnt was BUFMAX - 1 at the earlier test,
`\0' is written to put_buf[BUFMAX].

Signed-off-by: Roel Kluin &lt;roel.kluin@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdbts: Use HW breakpoints with CONFIG_DEBUG_RODATA</title>
<updated>2008-05-28T17:49:57+00:00</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2008-05-28T17:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b33cb815b565a94c654a0fe8e62e36f5b4053888'/>
<id>b33cb815b565a94c654a0fe8e62e36f5b4053888</id>
<content type='text'>
Whenever CONFIG_DEBUG_RODATA is set in the kernel config many kernel
text sections become read-only, and the use of software breakpoints in
the kgdb tests will cause the kernel to fail to complete the start up.

Until such time that there is an official API for modifying read-only
text sections hardware breakpoints must be used to run the do_fork or
sys_open tests or the tests get skipped.

Also fix the duplicated include reported by:
Huang Weiyi &lt;weiyi.huang@gmail.com&gt;

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Whenever CONFIG_DEBUG_RODATA is set in the kernel config many kernel
text sections become read-only, and the use of software breakpoints in
the kgdb tests will cause the kernel to fail to complete the start up.

Until such time that there is an official API for modifying read-only
text sections hardware breakpoints must be used to run the do_fork or
sys_open tests or the tests get skipped.

Also fix the duplicated include reported by:
Huang Weiyi &lt;weiyi.huang@gmail.com&gt;

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kgdb: use common ascii helpers and put_unaligned_be32 helper</title>
<updated>2008-05-28T17:49:56+00:00</updated>
<author>
<name>Harvey Harrison</name>
<email>harvey.harrison@gmail.com</email>
</author>
<published>2008-05-28T17:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=827e609b4581282b98bdf7666f6e93ff1bd1a63e'/>
<id>827e609b4581282b98bdf7666f6e93ff1bd1a63e</id>
<content type='text'>
Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Harvey Harrison &lt;harvey.harrison@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
