<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/debug, branch v2.6.38-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/debug?h=v2.6.38-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/debug?h=v2.6.38-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2010-12-22T17:57:02Z</updated>
<entry>
<title>Merge branch 'master' into for-next</title>
<updated>2010-12-22T17:57:02Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2010-12-22T17:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b7bd364700d9ac8372eff48832062b936d0793b'/>
<id>urn:sha1:4b7bd364700d9ac8372eff48832062b936d0793b</id>
<content type='text'>
Conflicts:
	MAINTAINERS
	arch/arm/mach-omap2/pm24xx.c
	drivers/scsi/bfa/bfa_fcpim.c

Needed to update to apply fixes for which the old branch was too
outdated.
</content>
</entry>
<entry>
<title>kdb: fix crash when KDB_BASE_CMD_MAX is exceeded</title>
<updated>2010-11-17T19:54:57Z</updated>
<author>
<name>Jovi Zhang</name>
<email>bookjovi@gmail.com</email>
</author>
<published>2010-11-10T13:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5450d904054b4ed582793ad6ecb5469f03cc4c46'/>
<id>urn:sha1:5450d904054b4ed582793ad6ecb5469f03cc4c46</id>
<content type='text'>
When the number of dyanmic kdb commands exceeds KDB_BASE_CMD_MAX, the
kernel will fault.

Signed-off-by: Jovi Zhang &lt;bookjovi@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>kdb: fix memory leak in kdb_main.c</title>
<updated>2010-11-17T19:54:57Z</updated>
<author>
<name>Jovi Zhang</name>
<email>bookjovi@gmail.com</email>
</author>
<published>2010-11-10T13:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=85e76ab50aecbdc9011806f2f8943450ccb0d93c'/>
<id>urn:sha1:85e76ab50aecbdc9011806f2f8943450ccb0d93c</id>
<content type='text'>
Call kfree in the error path as well as the success path in kdb_ll().

Signed-off-by: Jovi Zhang &lt;bookjovi@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>tree-wide: fix comment/printk typos</title>
<updated>2010-11-01T19:38:34Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2010-11-01T19:38:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b595076a180a56d1bb170e6eceda6eb9d76f4cd3'/>
<id>urn:sha1:b595076a180a56d1bb170e6eceda6eb9d76f4cd3</id>
<content type='text'>
"gadget", "through", "command", "maintain", "maintain", "controller", "address",
"between", "initiali[zs]e", "instead", "function", "select", "already",
"equal", "access", "management", "hierarchy", "registration", "interest",
"relative", "memory", "offset", "already",

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>debug_core,x86,blackfin: Clean up hw debug disable API</title>
<updated>2010-10-29T18:14:41Z</updated>
<author>
<name>Dongdong Deng</name>
<email>dongdong.deng@windriver.com</email>
</author>
<published>2010-08-18T11:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7ba979d45272385ce0fdf141d922e61ff48e07b'/>
<id>urn:sha1:d7ba979d45272385ce0fdf141d922e61ff48e07b</id>
<content type='text'>
The kgdb_disable_hw_debug() was an architecture specific function for
disabling all hardware breakpoints on a per cpu basis when entering
the debug core.

This patch will remove the weak function kdbg_disable_hw_debug() and
change it into a call back which lives with the rest of hw breakpoint
call backs in struct kgdb_arch.

Signed-off-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>kdb: Fix early debugging crash regression</title>
<updated>2010-10-29T18:14:41Z</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2010-10-29T18:14:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=578bd4dfcda63d2ef15f025f1d5d55c0e56b9660'/>
<id>urn:sha1:578bd4dfcda63d2ef15f025f1d5d55c0e56b9660</id>
<content type='text'>
The kdb_current legally be equal to NULL in the early boot of the x86
arch.  The problem pcan be observed by booting with the kernel arguments:

    earlyprintk=vga ekgdboc=kbd kgdbwait

The kdb shell will oops on entry and recursively fault because it
cannot get past the final stage of shell initialization.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>kdb: fix per_cpu command to remove supress mask</title>
<updated>2010-10-29T18:14:40Z</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2010-10-29T13:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=931ea24819f2bd40cca2dc214558bfcc3c91549e'/>
<id>urn:sha1:931ea24819f2bd40cca2dc214558bfcc3c91549e</id>
<content type='text'>
Rusty pointed out that the per_cpu command uses up lots of space on
the stack and the cpu supress mask is probably not needed.

This patch removes the need for the supress mask as well as fixing up
the following problems with the kdb per_cpu command:
  * The per_cpu command should allow an address as an argument
  * When you have more data than can be displayed on one screen allow
    the user to break out of the print loop.

Reported-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>kdb,debug_core: adjust master cpu switch logic against new debug_core locking</title>
<updated>2010-10-22T20:34:13Z</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2010-05-21T13:46:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=495363d380b4f4745bd8677912688654afc44020'/>
<id>urn:sha1:495363d380b4f4745bd8677912688654afc44020</id>
<content type='text'>
The kdb shell needs to enforce switching back to the original CPU that
took the exception before restoring normal kernel execution.  Resuming
from a different CPU than what took the original exception will cause
problems with spin locks that are freed from the a different processor
than had taken the lock.

The special logic in dbg_cpu_switch() can go away entirely with
because the state of what cpus want to be masters or slaves will
remain unchanged between entry and exit of the debug_core exception
context.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>debug_core: refactor locking for master/slave cpus</title>
<updated>2010-10-22T20:34:13Z</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2010-05-21T13:46:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dfee3a7b92208b30f77876068aece9ea571270c2'/>
<id>urn:sha1:dfee3a7b92208b30f77876068aece9ea571270c2</id>
<content type='text'>
For quite some time there have been problems with memory barriers and
various races with NMI on multi processor systems using the kernel
debugger.  The algorithm for entering the kernel debug core and
resuming kernel execution was racy and had several known edge case
problems with attempting to debug something on a heavily loaded system
using breakpoints that are hit repeatedly and quickly.

The prior "locking" design entry worked as follows:

  * The atomic counter kgdb_active was used with atomic exchange in
    order to elect a master cpu out of all the cpus that may have
    taken a debug exception.
  * The master cpu increments all elements of passive_cpu_wait[].
  * The master cpu issues the round up cpus message.
  * Each "slave cpu" that enters the debug core increments its own
    element in cpu_in_kgdb[].
  * Each "slave cpu" spins on passive_cpu_wait[] until it becomes 0.
  * The master cpu debugs the system.

The new scheme removes the two arrays of atomic counters and replaces
them with 2 single counters.  One counter is used to count the number
of cpus waiting to become a master cpu (because one or more hit an
exception). The second counter is use to indicate how many cpus have
entered as slave cpus.

The new entry logic works as follows:

  * One or more cpus enters via kgdb_handle_exception() and increments
    the masters_in_kgdb. Each cpu attempts to get the spin lock called
    dbg_master_lock.
  * The master cpu sets kgdb_active to the current cpu.
  * The master cpu takes the spinlock dbg_slave_lock.
  * The master cpu asks to round up all the other cpus.
  * Each slave cpu that is not already in kgdb_handle_exception()
    will enter and increment slaves_in_kgdb.  Each slave will now spin
    try_locking on dbg_slave_lock.
  * The master cpu waits for the sum of masters_in_kgdb and slaves_in_kgdb
    to be equal to the sum of the online cpus.
  * The master cpu debugs the system.

In the new design the kgdb_active can only be changed while holding
dbg_master_lock.  Stress testing has not turned up any further
entry/exit races that existed in the prior locking design.  The prior
locking design suffered from atomic variables not being truly atomic
(in the capacity as used by kgdb) along with memory barrier races.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Acked-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
</content>
</entry>
<entry>
<title>debug_core: disable hw_breakpoints on all cores in kgdb_cpu_enter()</title>
<updated>2010-10-22T20:34:12Z</updated>
<author>
<name>Dongdong Deng</name>
<email>dongdong.deng@windriver.com</email>
</author>
<published>2010-09-13T11:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c1bb9a9c1911036549c5cdfb23f32d7d20ffdc5a'/>
<id>urn:sha1:c1bb9a9c1911036549c5cdfb23f32d7d20ffdc5a</id>
<content type='text'>
The slave cpus do not have the hw breakpoints disabled upon entry to
the debug_core and as a result could cause unrecoverable recursive
faults on badly placed breakpoints, or get out of sync with the arch
specific hw breakpoint operations.

This patch addresses the problem by invoking kgdb_disable_hw_debug()
earlier in kgdb_enter_cpu for each cpu that enters the debug core.

The hw breakpoint dis/enable flow should be:

master_debug_cpu   slave_debug_cpu
         \              /
          kgdb_cpu_enter
                |
        kgdb_disable_hw_debug --&gt; uninstall pre-enabled hw_breakpoint
                |
 do add/rm dis/enable operates to hw_breakpoints on master_debug_cpu..
                |
        correct_hw_break --&gt; correct/install the enabled hw_breakpoint
                |
           leave_kgdb

Signed-off-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
</feed>
