<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/debug, branch v5.6.2</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.6.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.6.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-02-06T11:40:09Z</updated>
<entry>
<title>Revert "kdb: Get rid of confusing diag msg from "rd" if current task has no regs"</title>
<updated>2020-02-06T11:40:09Z</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2020-02-06T11:40:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fcf2736c82ca1908e3a0e74730c404baebd8ccdf'/>
<id>urn:sha1:fcf2736c82ca1908e3a0e74730c404baebd8ccdf</id>
<content type='text'>
This reverts commit bbfceba15f8d1260c328a254efc2b3f2deae4904.

When DBG_MAX_REG_NUM is zero then a number of symbols are conditionally
defined. It is therefore not possible to check it using C expressions.

Reported-by: Anatoly Pugachev &lt;matorola@gmail.com&gt;
Acked-by: Doug Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: Use for_each_console() helper</title>
<updated>2020-01-31T17:34:54Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2020-01-24T16:14:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dc2c733e65848b1df8d55c83eea79fc4a868c800'/>
<id>urn:sha1:dc2c733e65848b1df8d55c83eea79fc4a868c800</id>
<content type='text'>
Replace open coded single-linked list iteration loop with for_each_console()
helper in use.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: remove redundant assignment to pointer bp</title>
<updated>2020-01-31T17:34:06Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-11-28T13:07:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a4f8a7fb1963bc02fbd40a0a28e128bb56d2fcc9'/>
<id>urn:sha1:a4f8a7fb1963bc02fbd40a0a28e128bb56d2fcc9</id>
<content type='text'>
The point bp is assigned a value that is never read, it is being
re-assigned later to bp = &amp;kdb_breakpoints[lowbp] in a for-loop.
Remove the redundant assignment.

Addresses-Coverity ("Unused value")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Link: https://lore.kernel.org/r/20191128130753.181246-1-colin.king@canonical.com
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: Get rid of confusing diag msg from "rd" if current task has no regs</title>
<updated>2020-01-31T17:34:03Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2019-11-09T19:16:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bbfceba15f8d1260c328a254efc2b3f2deae4904'/>
<id>urn:sha1:bbfceba15f8d1260c328a254efc2b3f2deae4904</id>
<content type='text'>
If you switch to a sleeping task with the "pid" command and then type
"rd", kdb tells you this:

  No current kdb registers.  You may need to select another task
  diag: -17: Invalid register name

The first message makes sense, but not the second.  Fix it by just
returning 0 after commands accessing the current registers finish if
we've already printed the "No current kdb registers" error.

While fixing kdb_rd(), change the function to use "if" rather than
"ifdef".  It cleans the function up a bit and any modern compiler will
have no trouble handling still producing good code.

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20191109111624.5.I121f4c6f0c19266200bf6ef003de78841e5bfc3d@changeid
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: Gid rid of implicit setting of the current task / regs</title>
<updated>2020-01-31T17:34:00Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2019-11-09T19:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9441d5f6b77770ee388884f04b14a99b028a15e6'/>
<id>urn:sha1:9441d5f6b77770ee388884f04b14a99b028a15e6</id>
<content type='text'>
Some (but not all?) of the kdb backtrace paths would cause the
kdb_current_task and kdb_current_regs to remain changed.  As discussed
in a review of a previous patch [1], this doesn't seem intuitive, so
let's fix that.

...but, it turns out that there's actually no longer any reason to set
the current task / current regs while backtracing anymore anyway.  As
of commit 2277b492582d ("kdb: Fix stack crawling on 'running' CPUs
that aren't the master") if we're backtracing on a task running on a
CPU we ask that CPU to do the backtrace itself.  Linux can do that
without anything fancy.  If we're doing backtrace on a sleeping task
we can also do that fine without updating globals.  So this patch
mostly just turns into deleting a bunch of code.

[1] https://lore.kernel.org/r/20191010150735.dhrj3pbjgmjrdpwr@holly.lan

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20191109111624.4.Ibc3d982bbeb9e46872d43973ba808cd4c79537c7@changeid
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: kdb_current_task shouldn't be exported</title>
<updated>2020-01-31T17:33:57Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2019-11-09T19:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a8649fb0a8c1de9c842c9c492f189cabbc468272'/>
<id>urn:sha1:a8649fb0a8c1de9c842c9c492f189cabbc468272</id>
<content type='text'>
The kdb_current_task variable has been declared in
"kernel/debug/kdb/kdb_private.h" since 2010 when kdb was added to the
mainline kernel.  This is not a public header.  There should be no
reason that kdb_current_task should be exported and there are no
in-kernel users that need it.  Remove the export.

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20191109111623.3.I14b22b5eb15ca8f3812ab33e96621231304dc1f7@changeid
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: kdb_current_regs should be private</title>
<updated>2020-01-31T17:33:54Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2019-11-09T19:16:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c67c10a67f6b2edcc7804317947cbfdeab71048c'/>
<id>urn:sha1:c67c10a67f6b2edcc7804317947cbfdeab71048c</id>
<content type='text'>
As of the patch ("MIPS: kdb: Remove old workaround for backtracing on
other CPUs") there is no reason for kdb_current_regs to be in the
public "kdb.h".  Let's move it next to kdb_current_task.

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20191109111623.2.Iadbfb484e90b557cc4b5ac9890bfca732cd99d77@changeid
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: Tweak escape handling for vi users</title>
<updated>2019-10-28T12:08:29Z</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2019-10-25T07:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c58ff643763c78bef12874ee39995c9f7f987bc2'/>
<id>urn:sha1:c58ff643763c78bef12874ee39995c9f7f987bc2</id>
<content type='text'>
Currently if sequences such as "\ehelp\r" are delivered to the console then
the h gets eaten by the escape handling code. Since pressing escape
becomes something of a nervous twitch for vi users (and that escape doesn't
have much effect at a shell prompt) it is more helpful to emit the 'h' than
the '\e'.

We don't simply choose to emit the final character for all escape sequences
since that will do odd things for unsupported escape sequences (in
other words we retain the existing behaviour once we see '\e[').

Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20191025073328.643-6-daniel.thompson@linaro.org
</content>
</entry>
<entry>
<title>kdb: Improve handling of characters from different input sources</title>
<updated>2019-10-28T12:08:10Z</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2019-10-25T07:33:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdca8d8900dd33ce6b8b526e247d2a6009d05de0'/>
<id>urn:sha1:cdca8d8900dd33ce6b8b526e247d2a6009d05de0</id>
<content type='text'>
Currently if an escape timer is interrupted by a character from a
different input source then the new character is discarded and the
function returns '\e' (which will be discarded by the level above).
It is hard to see why this would ever be the desired behaviour.
Fix this to return the new character rather than the '\e'.

This is a bigger refactor than might be expected because the new
character needs to go through escape sequence detection.

Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20191025073328.643-5-daniel.thompson@linaro.org
</content>
</entry>
<entry>
<title>kdb: Remove special case logic from kdb_read()</title>
<updated>2019-10-28T12:07:57Z</updated>
<author>
<name>Daniel Thompson</name>
<email>daniel.thompson@linaro.org</email>
</author>
<published>2019-10-25T07:33:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4f27e824bf83dfc2f6dc1a54fae419be7cd335af'/>
<id>urn:sha1:4f27e824bf83dfc2f6dc1a54fae419be7cd335af</id>
<content type='text'>
kdb_read() contains special case logic to force it exit after reading
a single character. We can remove all the special case logic by directly
calling the function to read a single character instead. This also
allows us to tidy up the function prototype which, because it now matches
getchar(), we can also rename in order to make its role clearer.

This does involve some extra code to handle btaprompt properly but we
don't mind the new lines of code here because the old code had some
interesting problems (bad newline handling, treating unexpected
characters like &lt;cr&gt;).

Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20191025073328.643-4-daniel.thompson@linaro.org
</content>
</entry>
</feed>
