<feed xmlns='http://www.w3.org/2005/Atom'>
<title>g/linux.git/kernel/debug/kdb, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>https://bastion.nosebs.vip/g/linux.git/atom/kernel/debug/kdb?h=master</id>
<link rel='self' href='https://bastion.nosebs.vip/g/linux.git/atom/kernel/debug/kdb?h=master'/>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/'/>
<updated>2026-10-28T16:55:39Z</updated>
<entry>
<title>kdb: unify CMD_BUFLEN definition into kdb_private.h</title>
<updated>2026-10-28T16:55:39Z</updated>
<author>
<name>Naveen Kumar Chaudhary</name>
<email>naveen.osdev@gmail.com</email>
</author>
<published>2026-06-17T02:28:20Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=2a052074582d976bfa81e41a0337d8ae6dd1dc65'/>
<id>urn:sha1:2a052074582d976bfa81e41a0337d8ae6dd1dc65</id>
<content type='text'>
CMD_BUFLEN was defined separately in kdb_io.c (256) and kdb_main.c
(200), causing kdb_main.c to use the wrong size when formatting the
prompt string into kdb_prompt_str (which is 256 bytes).

Move CMD_BUFLEN (256) into kdb_private.h so all users share a single
consistent definition, and remove the local definitions from both
files.

Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)")
Signed-off-by: Naveen Kumar Chaudhary &lt;naveen.osdev@gmail.com&gt;
Link: https://lore.kernel.org/r/l6b6bomrw3bvkehlv73fyghk6loz6jpdwqk5c4nthnhl7j7kzk@4jjhfpzv5zon
Signed-off-by: Daniel Thompson &lt;daniel@riscstar.com&gt;
</content>
</entry>
<entry>
<title>kdb: fix memory leak in kdb_setenv() when environment is full</title>
<updated>2026-10-28T16:55:39Z</updated>
<author>
<name>Naveen Kumar Chaudhary</name>
<email>naveen.osdev@gmail.com</email>
</author>
<published>2026-06-17T01:49:32Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=22d59ccad2935b7dea7f818793b739343de433a8'/>
<id>urn:sha1:22d59ccad2935b7dea7f818793b739343de433a8</id>
<content type='text'>
When kdb_setenv() fails to find a free slot in __env[], the function
returns KDB_ENVFULL without freeing the previously allocated string
buffer 'ep', leaking memory on every failed call.

Add the missing kfree(ep) before returning KDB_ENVFULL.

Fixes: a30d4ff8193e ("kdb: remove usage of static environment buffer")
Signed-off-by: Naveen Kumar Chaudhary &lt;naveen.osdev@gmail.com&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Link: https://lore.kernel.org/r/mbwhul34esbxkdbmlbjaquv5lgyzznn6pdapohry3lsiidbz6n@zucvm5os363q
Signed-off-by: Daniel Thompson &lt;daniel@riscstar.com&gt;
</content>
</entry>
<entry>
<title>treewide: Replace kmalloc with kmalloc_obj for non-scalar types</title>
<updated>2026-02-21T09:02:28Z</updated>
<author>
<name>Kees Cook</name>
<email>kees@kernel.org</email>
</author>
<published>2026-02-21T07:49:23Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=69050f8d6d075dc01af7a5f2f550a8067510366f'/>
<id>urn:sha1:69050f8d6d075dc01af7a5f2f550a8067510366f</id>
<content type='text'>
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:

Single allocations:	kmalloc(sizeof(TYPE), ...)
are replaced with:	kmalloc_obj(TYPE, ...)

Array allocations:	kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with:	kmalloc_objs(TYPE, COUNT, ...)

Flex array allocations:	kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with:	kmalloc_flex(*PTR, FAM, COUNT, ...)

(where TYPE may also be *VAR)

The resulting allocations no longer return "void *", instead returning
"TYPE *".

Signed-off-by: Kees Cook &lt;kees@kernel.org&gt;
</content>
</entry>
<entry>
<title>kernel: debug: Add SPDX license ids to kdb files</title>
<updated>2026-01-27T14:57:20Z</updated>
<author>
<name>Tim Bird</name>
<email>tim.bird@sony.com</email>
</author>
<published>2026-01-17T20:00:38Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=c86d39d6805474ab879c00ca6b938c6dd7e4d33f'/>
<id>urn:sha1:c86d39d6805474ab879c00ca6b938c6dd7e4d33f</id>
<content type='text'>
Add GPL-2.0 license id to some files related to kdb and kgdb,
replacing references to GPL or COPYING.

These files were introduced into the kernel in 2008 and 2010.

Signed-off-by: Tim Bird &lt;tim.bird@sony.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kdb: Adapt kdb_msg_write to work with NBCON consoles</title>
<updated>2025-10-24T10:56:20Z</updated>
<author>
<name>Marcos Paulo de Souza</name>
<email>mpdesouza@suse.com</email>
</author>
<published>2025-10-16T14:47:58Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=62627bf0cadf6eae87d92fecf604c42160fe16ef'/>
<id>urn:sha1:62627bf0cadf6eae87d92fecf604c42160fe16ef</id>
<content type='text'>
Function kdb_msg_write was calling con-&gt;write for any found console,
but it won't work on NBCON consoles. In this case we should acquire the
ownership of the console using NBCON_PRIO_EMERGENCY, since printing
kdb messages should only be interrupted by a panic.

At this point, the console is required to use the atomic callback. The
console is skipped if the write_atomic callback is not set or if the
context could not be acquired. The validation of NBCON is done by the
console_is_usable helper. The context is released right after
write_atomic finishes.

The oops_in_progress handling is only needed in the legacy consoles,
so it was moved around the con-&gt;write callback.

Suggested-by: Petr Mladek &lt;pmladek@suse.com&gt;
Reviewed-by: Petr Mladek &lt;pmladek@suse.com&gt;
Reviewed-by: John Ogness &lt;john.ogness@linutronix.de&gt;
Signed-off-by: Marcos Paulo de Souza &lt;mpdesouza@suse.com&gt;
Link: https://patch.msgid.link/20251016-nbcon-kgdboc-v6-5-866aac60a80e@suse.com
[pmladek@suse.com: Fixed compilation with !CONFIG_PRINTK.]
Signed-off-by: Petr Mladek &lt;pmladek@suse.com&gt;
</content>
</entry>
<entry>
<title>kdb: remove redundant check for scancode 0xe0</title>
<updated>2025-09-20T20:19:09Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2025-05-07T10:43:37Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=fdbdd0ccb30af18d3b29e714ac8d5ab6163279e0'/>
<id>urn:sha1:fdbdd0ccb30af18d3b29e714ac8d5ab6163279e0</id>
<content type='text'>
The check for scancode 0xe0 is always false because earlier on
the scan code is masked with 0x7f so there are never going to
be values greater than 0x7f. Remove the redundant check.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Daniel Thompson (RISCstar) &lt;danielt@kernel.org&gt;
</content>
</entry>
<entry>
<title>kdb: Replace deprecated strcpy() with helper function in kdb_defcmd()</title>
<updated>2025-09-20T18:56:28Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-19T09:59:06Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=0c28a23722e03695ae1cbbadde3dd32d75c1cb7f'/>
<id>urn:sha1:0c28a23722e03695ae1cbbadde3dd32d75c1cb7f</id>
<content type='text'>
strcpy() is deprecated; use the new helper function kdb_strdup_dequote()
instead. In addition to string duplication similar to kdb_strdup(), it
also trims surrounding quotes from the input string if present.

kdb_strdup_dequote() also checks for a trailing quote in the input
string which was previously not checked.

Link: https://github.com/KSPP/linux/issues/88
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Daniel Thompson (RISCstar) &lt;danielt@kernel.org&gt;
</content>
</entry>
<entry>
<title>kdb: Replace deprecated strcpy() with memcpy() in parse_grep()</title>
<updated>2025-09-20T18:56:28Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-19T09:59:05Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=5b26f1a3146454a24dbcb8b1cdae5d507f7432e6'/>
<id>urn:sha1:5b26f1a3146454a24dbcb8b1cdae5d507f7432e6</id>
<content type='text'>
strcpy() is deprecated; use memcpy() instead.

We can safely use memcpy() because we already know the length of the
source string 'cp' and that it is guaranteed to be NUL-terminated within
the first KDB_GREP_STRLEN bytes.

Link: https://github.com/KSPP/linux/issues/88
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Daniel Thompson (RISCstar) &lt;danielt@kernel.org&gt;
</content>
</entry>
<entry>
<title>kdb: Replace deprecated strcpy() with memmove() in vkdb_printf()</title>
<updated>2025-09-20T18:56:28Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-19T09:59:04Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=8790cc2940bf9f5ec4d7458b0ea7f94a8acb094f'/>
<id>urn:sha1:8790cc2940bf9f5ec4d7458b0ea7f94a8acb094f</id>
<content type='text'>
strcpy() is deprecated and its behavior is undefined when the source and
destination buffers overlap. Use memmove() instead to avoid any
undefined behavior.

Adjust comments for clarity.

Link: https://github.com/KSPP/linux/issues/88
Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)")
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Daniel Thompson (RISCstar) &lt;danielt@kernel.org&gt;
</content>
</entry>
<entry>
<title>kdb: Replace deprecated strcpy() with memcpy() in kdb_strdup()</title>
<updated>2025-09-20T18:56:28Z</updated>
<author>
<name>Thorsten Blum</name>
<email>thorsten.blum@linux.dev</email>
</author>
<published>2025-08-19T09:59:03Z</published>
<link rel='alternate' type='text/html' href='https://bastion.nosebs.vip/g/linux.git/commit/?id=d4be3238d9e5f4841e5385cba3d81268c00d9e7d'/>
<id>urn:sha1:d4be3238d9e5f4841e5385cba3d81268c00d9e7d</id>
<content type='text'>
strcpy() is deprecated; use memcpy() instead.

Link: https://github.com/KSPP/linux/issues/88
Reviewed-by: Douglas Anderson &lt;dianders@chromium.org&gt;
Signed-off-by: Thorsten Blum &lt;thorsten.blum@linux.dev&gt;
Signed-off-by: Daniel Thompson (RISCstar) &lt;danielt@kernel.org&gt;
</content>
</entry>
</feed>
