<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-rng/kernel/debug/kdb, branch linus/master</title>
<subtitle>Development tree for the kernel CSPRNG</subtitle>
<id>https://git.zx2c4.com/linux-rng/atom/kernel/debug/kdb?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-rng/atom/kernel/debug/kdb?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/'/>
<updated>2025-04-03T01:17:33Z</updated>
<entry>
<title>Merge tag 'tty-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2025-04-03T01:17:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-04-03T01:17:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=ddd0172f182e3e869a3a960e433578aeedcb37c9'/>
<id>urn:sha1:ddd0172f182e3e869a3a960e433578aeedcb37c9</id>
<content type='text'>
Pull tty/serial driver updates from Greg KH:
 "Here is the big set of serial and tty driver updates for 6.15-rc1.
  Include in here are the following:

   - more great tty layer cleanups from Jiri. Someday this will be done,
     but that's not going to be any year soon...

   - kdb debug driver reverts to fix a reported issue

   - lots of .dts binding updates for different devices with serial
     devices

   - lots of tiny updates and tweaks and a few bugfixes for different
     serial drivers.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'tty-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits)
  tty: serial: fsl_lpuart: Fix unused variable 'sport' build warning
  serial: stm32: do not deassert RS485 RTS GPIO prematurely
  serial: 8250: add driver for NI UARTs
  dt-bindings: serial: snps-dw-apb-uart: document RZ/N1 binding without DMA
  serial: icom: fix code format problems
  serial: sh-sci: Save and restore more registers
  tty: serial: pl011: remove incorrect of_match_ptr annotation
  dt-bindings: serial: snps-dw-apb-uart: Add support for rk3562
  tty: serial: lpuart: only disable CTS instead of overwriting the whole UARTMODIR register
  tty: caif: removed unused function debugfs_tx()
  serial: 8250_dma: terminate correct DMA in tx_dma_flush()
  tty: serial: fsl_lpuart: rename register variables more specifically
  tty: serial: fsl_lpuart: use port struct directly to simply code
  tty: serial: fsl_lpuart: Use u32 and u8 for register variables
  tty: serial: fsl_lpuart: disable transmitter before changing RS485 related registers
  tty: serial: 8250: Add Brainboxes XC devices
  dt-bindings: serial: fsl-lpuart: support i.MX94
  tty: serial: 8250: Add some more device IDs
  dt-bindings: serial: samsung: add exynos7870-uart compatible
  serial: 8250_dw: Comment possible corner cases in serial_out() implementation
  ...
</content>
</entry>
<entry>
<title>kdb: Remove optional size arguments from strscpy() calls</title>
<updated>2025-03-28T21:28:28Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-03-19T16:33:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=afdbe49276accb87a0c7414e75864c78289ece2f'/>
<id>urn:sha1:afdbe49276accb87a0c7414e75864c78289ece2f</id>
<content type='text'>
If the destination buffer has a fixed length, strscpy() automatically
determines the size of the destination buffer using sizeof() if the
argument is omitted. This makes the explicit sizeof() unnecessary.

Furthermore, CMD_BUFLEN is equal to sizeof(kdb_prompt_str) and can also
be removed. Remove them to shorten and simplify the code.

No functional changes intended.

Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Justin Stitt &lt;justinstitt@google.com&gt;
Link: https://lore.kernel.org/r/20250319163341.2123-2-thorsten.blum@linux.dev
Signed-off-by: Daniel Thompson &lt;daniel@riscstar.com&gt;
</content>
</entry>
<entry>
<title>kdb: remove usage of static environment buffer</title>
<updated>2025-03-28T21:10:53Z</updated>
<author>
<name>Nir Lichtman</name>
<email>nir@lichtman.org</email>
</author>
<published>2025-02-04T05:47:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=a30d4ff8193ef768dbb524824c7aa07c5486a63a'/>
<id>urn:sha1:a30d4ff8193ef768dbb524824c7aa07c5486a63a</id>
<content type='text'>
Problem: The set environment variable logic uses a static "heap" like
buffer to store the values of the variables, and they are never freed,
on top of that this is redundant since the kernel supplies allocation
facilities which are even used also in this file.

Solution: Remove the weird static buffer logic and use kmalloc instead,
call kfree when overriding an existing variable.

Signed-off-by: Nir Lichtman &lt;nir@lichtman.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20250204054741.GB1219827@lichtman.org
Signed-off-by: Daniel Thompson &lt;daniel@riscstar.com&gt;
</content>
</entry>
<entry>
<title>Revert "kdb: Implement disable_nmi command"</title>
<updated>2025-02-14T09:05:43Z</updated>
<author>
<name>Douglas Anderson</name>
<email>dianders@chromium.org</email>
</author>
<published>2025-01-29T16:25:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=dbb1f9c03bad116ce771d0b3335ca55b1387cf78'/>
<id>urn:sha1:dbb1f9c03bad116ce771d0b3335ca55b1387cf78</id>
<content type='text'>
This reverts commit ad394f66fa57ae66014cb74f337e2820bac4c417.

No architectures ever implemented `enable_nmi` since the later patches
in the series adding it never landed. It's been a long time. Drop it.

NOTE: this is not a clean revert due to changes in the file in the
meantime.

Signed-off-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20250129082535.2.Ib91bfb95bdcf77591257a84063fdeb5b4dce65b1@changeid
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kdb: Remove unused flags stack</title>
<updated>2025-01-25T08:22:26Z</updated>
<author>
<name>Dr. David Alan Gilbert</name>
<email>linux@treblig.org</email>
</author>
<published>2025-01-12T01:20:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=6beaa75cd24d660e7913c60aff702ec809ff9b28'/>
<id>urn:sha1:6beaa75cd24d660e7913c60aff702ec809ff9b28</id>
<content type='text'>
kdb_restore_flags() and kdb_save_flags() were added in 2010 by
commit 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)")
but have remained unused.

Remove them, and their associated storage.

Signed-off-by: Dr. David Alan Gilbert &lt;linux@treblig.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20250112012049.319515-1-linux@treblig.org
Signed-off-by: Daniel Thompson (RISCstar) &lt;danielt@kernel.org&gt;
</content>
</entry>
<entry>
<title>kdb: use kmap_local_page()</title>
<updated>2025-01-25T08:22:11Z</updated>
<author>
<name>Zhang Heng</name>
<email>zhangheng@kylinos.cn</email>
</author>
<published>2024-12-23T08:54:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=36975ec3a2c15c20f0df312633f4272da649d8fc'/>
<id>urn:sha1:36975ec3a2c15c20f0df312633f4272da649d8fc</id>
<content type='text'>
Use kmap_local_page() instead of kmap_atomic() which has been deprecated.

Signed-off-by: Zhang Heng &lt;zhangheng@kylinos.cn&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20241223085420.1815930-1-zhangheng@kylinos.cn
Signed-off-by: Daniel Thompson (RISCstar) &lt;danielt@kernel.org&gt;
</content>
</entry>
<entry>
<title>kdb: fix ctrl+e/a/f/b/d/p/n broken in keyboard mode</title>
<updated>2024-11-18T15:20:22Z</updated>
<author>
<name>Nir Lichtman</name>
<email>nir@lichtman.org</email>
</author>
<published>2024-11-11T21:56:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=24b2455fe8fce17258fab4bb945d8e6929baeb77'/>
<id>urn:sha1:24b2455fe8fce17258fab4bb945d8e6929baeb77</id>
<content type='text'>
Problem: When using kdb via keyboard it does not react to control
characters which are supported in serial mode.

Example: Chords such as ctrl+a/e/d/p do not work in keyboard mode

Solution: Before disregarding non-printable key characters, check if they
are one of the supported control characters, I have took the control
characters from the switch case upwards in this function that translates
scan codes of arrow keys/backspace/home/.. to the control characters.

Suggested-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Nir Lichtman &lt;nir@lichtman.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20241111215622.GA161253@lichtman.org
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: Fix breakpoint enable to be silent if already enabled</title>
<updated>2024-11-02T08:41:39Z</updated>
<author>
<name>Nir Lichtman</name>
<email>nir@lichtman.org</email>
</author>
<published>2024-10-27T20:47:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=272fad470b6548d8f9fb293a3fc6918c9d053d91'/>
<id>urn:sha1:272fad470b6548d8f9fb293a3fc6918c9d053d91</id>
<content type='text'>
Fix the breakpoint enable command (be) to a logic that is inline with the
breakpoint disable command (bd) in which if the breakpoint is already in
an enabled state, do not print the message of enabled again to the user.

Also a small nit fix of the new line in a separate print.

Signed-off-by: Nir Lichtman &lt;nir@lichtman.org&gt;
Link: https://lore.kernel.org/r/20241027204729.GA907155@lichtman.org
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: Remove fallback interpretation of arbitrary numbers as hex</title>
<updated>2024-11-02T08:33:13Z</updated>
<author>
<name>Nir Lichtman</name>
<email>nir@lichtman.org</email>
</author>
<published>2024-10-28T19:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=9131d6a7a726d7a372bc35d27df9ebe3f011508e'/>
<id>urn:sha1:9131d6a7a726d7a372bc35d27df9ebe3f011508e</id>
<content type='text'>
Remove logic that enables a fallback of interpreting numbers supplied in KDB CLI
to be interpreted as hex without explicit "0x" prefix as this can be confusing
for the end users.

Suggested-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Nir Lichtman &lt;nir@lichtman.org&gt;
Link: https://lore.kernel.org/r/20241028192228.GC918454@lichtman.org
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
<entry>
<title>kdb: Replace the use of simple_strto with safer kstrto in kdb_main</title>
<updated>2024-11-02T08:33:13Z</updated>
<author>
<name>Yuran Pereira</name>
<email>yuran.pereira@hotmail.com</email>
</author>
<published>2024-10-28T19:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-rng/commit/?id=120fb87ced8eb95531ff69ec269fcbcc5be24e9c'/>
<id>urn:sha1:120fb87ced8eb95531ff69ec269fcbcc5be24e9c</id>
<content type='text'>
The simple_str* family of functions perform no error checking in
scenarios where the input value overflows the intended output variable.
This results in these functions successfully returning even when the
output does not match the input string.

Or as it was mentioned [1], "...simple_strtol(), simple_strtoll(),
simple_strtoul(), and simple_strtoull() functions explicitly ignore
overflows, which may lead to unexpected results in callers."
Hence, the use of those functions is discouraged.

This patch replaces all uses of the simple_strto* series of functions
with their safer kstrto* alternatives.

Side effects of this patch:
- Every string to long or long long conversion using kstrto* is now
  checked for failure.
- kstrto* errors are handled with appropriate `KDB_BADINT` wherever
  applicable.
- A good side effect is that we end up saving a few lines of code
  since unlike in simple_strto* functions, kstrto functions do not
  need an additional "end pointer" variable, and the return values
  of the latter can be directly checked in an "if" statement without
  the need to define additional `ret` or `err` variables.
  This, of course, results in cleaner, yet still easy to understand
  code.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull

Signed-off-by: Yuran Pereira &lt;yuran.pereira@hotmail.com&gt;
[nir: addressed review comments by fixing styling, invalid conversion and a missing error return]
Signed-off-by: Nir Lichtman &lt;nir@lichtman.org&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/20241028191916.GA918454@lichtman.org
Signed-off-by: Daniel Thompson &lt;daniel.thompson@linaro.org&gt;
</content>
</entry>
</feed>
