<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/kgdb.c, branch linux-2.6.33.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.33.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-04-14T23:53:09Z</updated>
<entry>
<title>repair gdbstub to match the gdbserial protocol specification</title>
<updated>2011-04-14T23:53:09Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2010-07-22T00:27:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c7c045e442d5b2ac65b4cf20e6e942eaacc7079'/>
<id>urn:sha1:1c7c045e442d5b2ac65b4cf20e6e942eaacc7079</id>
<content type='text'>
commit fb82c0ff27b2c40c6f7a3d1a94cafb154591fa80 upstream.

The gdbserial protocol handler should return an empty packet instead
of an error string when ever it responds to a command it does not
implement.

The problem cases come from a debugger client sending
qTBuffer, qTStatus, qSearch, qSupported.

The incorrect response from the gdbstub leads the debugger clients to
not function correctly.  Recent versions of gdb will not detach correctly as a result of this behavior.

Backport-request-by: Frank Pan &lt;frankpzh@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Dongdong Deng &lt;dongdong.deng@windriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2010-02-05T00:07:41Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2010-02-05T00:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa16cd8d12352ccb5b921995ab3901110779f24a'/>
<id>urn:sha1:aa16cd8d12352ccb5b921995ab3901110779f24a</id>
<content type='text'>
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Handle futex value corruption gracefully
  futex: Handle user space corruption gracefully
  futex_lock_pi() key refcnt fix
  softlockup: Add sched_clock_tick() to avoid kernel warning on kgdb resume
</content>
</entry>
<entry>
<title>softlockup: Add sched_clock_tick() to avoid kernel warning on kgdb resume</title>
<updated>2010-02-01T07:22:32Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2010-01-27T22:25:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d6ad3e286d2c075a60b9f11075a2c55aeeeca2ad'/>
<id>urn:sha1:d6ad3e286d2c075a60b9f11075a2c55aeeeca2ad</id>
<content type='text'>
When CONFIG_HAVE_UNSTABLE_SCHED_CLOCK is set, sched_clock() gets
the time from hardware such as the TSC on x86. In this
configuration kgdb will report a softlock warning message on
resuming or detaching from a debug session.

Sequence of events in the problem case:

 1) "cpu sched clock" and "hardware time" are at 100 sec prior
    to a call to kgdb_handle_exception()

 2) Debugger waits in kgdb_handle_exception() for 80 sec and on
    exit the following is called ...  touch_softlockup_watchdog() --&gt;
    __raw_get_cpu_var(touch_timestamp) = 0;

 3) "cpu sched clock" = 100s (it was not updated, because the
    interrupt was disabled in kgdb) but the "hardware time" = 180 sec

 4) The first timer interrupt after resuming from
    kgdb_handle_exception updates the watchdog from the "cpu sched clock"

update_process_times() { ...  run_local_timers() --&gt;
softlockup_tick() --&gt; check (touch_timestamp == 0) (it is "YES"
here, we have set "touch_timestamp = 0" at kgdb) --&gt;
__touch_softlockup_watchdog() ***(A)--&gt; reset "touch_timestamp"
to "get_timestamp()" (Here, the "touch_timestamp" will still be
set to 100s.)  ...

    scheduler_tick() ***(B)--&gt; sched_clock_tick() (update "cpu sched
    clock" to "hardware time" = 180s) ...  }

 5) The Second timer interrupt handler appears to have a large
    jump and trips the softlockup warning.

update_process_times() { ...  run_local_timers() --&gt;
softlockup_tick() --&gt; "cpu sched clock" - "touch_timestamp" =
180s-100s &gt; 60s --&gt; printk "soft lockup error messages" ...  }

note: ***(A) reset "touch_timestamp" to
"get_timestamp(this_cpu)"

Why is "touch_timestamp" 100 sec, instead of 180 sec?

When CONFIG_HAVE_UNSTABLE_SCHED_CLOCK is set, the call trace of
get_timestamp() is:

get_timestamp(this_cpu)
 --&gt;cpu_clock(this_cpu)
 --&gt;sched_clock_cpu(this_cpu)
 --&gt;__update_sched_clock(sched_clock_data, now)

The __update_sched_clock() function uses the GTOD tick value to
create a window to normalize the "now" values.  So if "now"
value is too big for sched_clock_data, it will be ignored.

The fix is to invoke sched_clock_tick() to update "cpu sched
clock" in order to recover from this state.  This is done by
introducing the function touch_softlockup_watchdog_sync(). This
allows kgdb to request that the sched clock is updated when the
watchdog thread runs the first time after a resume from kgdb.

[yong.zhang0@gmail.com: Use per cpu instead of an array]
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Dongdong Deng &lt;Dongdong.Deng@windriver.com&gt;
Cc: kgdb-bugreport@lists.sourceforge.net
Cc: peterz@infradead.org
LKML-Reference: &lt;1264631124-4837-2-git-send-email-jason.wessel@windriver.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>x86, hw_breakpoints, kgdb: Fix kgdb to use hw_breakpoint API</title>
<updated>2010-01-30T07:42:20Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2010-01-28T23:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cc0967490c1c3824bc5b75718b6ca8a51d9f2617'/>
<id>urn:sha1:cc0967490c1c3824bc5b75718b6ca8a51d9f2617</id>
<content type='text'>
In the 2.6.33 kernel, the hw_breakpoint API is now used for the
performance event counters.  The hw_breakpoint_handler() now
consumes the hw breakpoints that were previously set by kgdb
arch specific code.  In order for kgdb to work in conjunction
with this core API change, kgdb must use some of the low level
functions of the hw_breakpoint API to install, uninstall, and
deal with hw breakpoint reservations.

The kgdb core required a change to call kgdb_disable_hw_debug
anytime a slave cpu enters kgdb_wait() in order to keep all the
hw breakpoints in sync as well as to prevent hitting a hw
breakpoint while kgdb is active.

During the architecture specific initialization of kgdb, it will
pre-allocate 4 disabled (struct perf event **) structures.  Kgdb
will use these to manage the capabilities for the 4 hw
breakpoint registers, per cpu.  Right now the hw_breakpoint API
does not have a way to ask how many breakpoints are available,
on each CPU so it is possible that the install of a breakpoint
might fail when kgdb restores the system to the run state.  The
intent of this patch is to first get the basic functionality of
hw breakpoints working and leave it to the person debugging the
kernel to understand what hw breakpoints are in use and what
restrictions have been imposed as a result.  Breakpoint
constraints will be dealt with in a future patch.

While atomic, the x86 specific kgdb code will call
arch_uninstall_hw_breakpoint() and arch_install_hw_breakpoint()
to manage the cpu specific hw breakpoints.

The net result of these changes allow kgdb to use the same pool
of hw_breakpoints that are used by the perf event API, but
neither knows about future reservations for the available hw
breakpoint slots.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: kgdb-bugreport@lists.sourceforge.net
Cc: K.Prasad &lt;prasad@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: torvalds@linux-foundation.org
LKML-Reference: &lt;1264719883-7285-2-git-send-email-jason.wessel@windriver.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>kgdb: Always process the whole breakpoint list on activate or deactivate</title>
<updated>2009-12-11T14:43:20Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2009-12-11T14:43:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7f8b7ed6f825c729332b8190aca55c6bf95b158e'/>
<id>urn:sha1:7f8b7ed6f825c729332b8190aca55c6bf95b158e</id>
<content type='text'>
This patch fixes 2 edge cases in using kgdb in conjunction with gdb.

1) kgdb_deactivate_sw_breakpoints() should process the entire array of
   breakpoints.  The failure to do so results in breakpoints that you
   cannot remove, because a break point can only be removed if its
   state flag is set to BP_SET.

   The easy way to duplicate this problem is to plant a break point in
   a kernel module and then unload the kernel module.

2) kgdb_activate_sw_breakpoints() should process the entire array of
   breakpoints.  The failure to do so results in missed breakpoints
   when a breakpoint cannot be activated.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>kgdb: continue and warn on signal passing from gdb</title>
<updated>2009-12-11T14:43:19Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2009-04-27T18:20:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d625e9c0d706eb43afbf52634d5cecacae1d57cc'/>
<id>urn:sha1:d625e9c0d706eb43afbf52634d5cecacae1d57cc</id>
<content type='text'>
On some architectures for the segv trap, gdb wants to pass the signal
back on continue.  For kgdb this is not the default behavior, because
it can cause the kernel to crash if you arbitrarily pass back a
exception outside of kgdb.

Instead of causing instability, pass a message back to gdb about the
supported kgdb signal passing and execute a standard kgdb continue
operation.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>kgdb: allow for cpu switch when single stepping</title>
<updated>2009-12-11T14:43:17Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2009-12-11T14:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=028e7b175970be8fca58bfd7d61cc375babe40b7'/>
<id>urn:sha1:028e7b175970be8fca58bfd7d61cc375babe40b7</id>
<content type='text'>
The kgdb core should not assume that a single step operation of a
kernel thread will complete on the same CPU.  The single step flag is
set at the "thread" level and it is possible in a multi cpu system
that a kernel thread can get scheduled on another cpu the next time it
is run.

As a further safety net in case a slave cpu is hung, the debug master
cpu will try 100 times before giving up and assuming control of the
slave cpus is no longer possible.  It is more useful to be able to get
some information out of kgdb instead of spinning forever.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>kgdb: Read buffer overflow</title>
<updated>2009-12-11T14:43:13Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2009-12-11T14:43:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=84667d4849b0e0a939a76f9f62d45fa3b4d59692'/>
<id>urn:sha1:84667d4849b0e0a939a76f9f62d45fa3b4d59692</id>
<content type='text'>
Roel Kluin reported an error found with Parfait.  Where we want to
ensure that that kgdb_info[-1] never gets accessed.

Also check to ensure any negative tid does not exceed the size of the
shadow CPU array, else report critical debug context because it is an
internal kgdb failure.

Reported-by: Roel Kluin &lt;roel.kluin@gmail.com&gt;
Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
</content>
</entry>
<entry>
<title>sched: Remove unused __schedule() declaration</title>
<updated>2009-11-04T10:43:42Z</updated>
<author>
<name>Hiroshi Shimamoto</name>
</author>
<published>2009-11-04T07:14:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1477b6a7edd9ffa7bba4f9779ce9a76ce92761ed'/>
<id>urn:sha1:1477b6a7edd9ffa7bba4f9779ce9a76ce92761ed</id>
<content type='text'>
__schedule() had been removed.

Signed-off-by: Hiroshi Shimamoto &lt;h-shimamoto@ct.jp.nec.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;4AF129C8.3030008@ct.jp.nec.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sysrq, intel_fb: fix sysrq g collision</title>
<updated>2009-05-15T12:56:24Z</updated>
<author>
<name>Jason Wessel</name>
</author>
<published>2009-05-14T02:56:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=364b5b7b1d793a7f98be55b6b154716dcae78dfc'/>
<id>urn:sha1:364b5b7b1d793a7f98be55b6b154716dcae78dfc</id>
<content type='text'>
Commit 79e539453b34e35f39299a899d263b0a1f1670bd introduced a
regression where you cannot use sysrq 'g' to enter kgdb.  The solution
is to move the intel fb sysrq over to V for video instead of G for
graphics.  The SMP VOYAGER code to register for the sysrq-v is not
anywhere to be found in the mainline kernel, so the comments in the
code were cleaned up as well.

This patch also cleans up the sysrq definitions for kgdb to make it
generic for the kernel debugger, such that the sysrq 'g' can be used
in the future to enter a gdbstub or another kernel debugger.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Acked-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
</feed>
