Skip to content

Add a new command in kgdb for vmcoreinfo

Amal Raj T linux-debuggers linux-serial 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 6 repliesIn review
  2. v23 patches 5 repliesSuperseded
  3. v13 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Added relevant links for the new query
- Updated tmp+=1 to tmp++
- Added few examples and additional documentation for encoding function Amal Raj T (3):
kgdb: Add kgdb_mem2ebin function for converting memory to binary
format
serial: Move LF -> CRLF replacement from serial console to kdb
kgdb: Add command linux.vmcoreinfo to kgdb

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3kgdb: Add kgdb_mem2ebin function for converting memory to binary formatinclude/linux/kgdb.h kernel/debug/gdbstub.c+77 -431 reply
2/3kgdb: Add command linux.vmcoreinfo to kgdbdrivers/tty/serial/serial_core.c kernel/debug/kdb/kdb_io.c+2 -21 reply
2/3serial: Move LF -> CRLF replacement from serial console to kdbdrivers/tty/serial/serial_core.c kernel/debug/kdb/kdb_io.c+2 -22 replies
3/3kgdb: Add command linux.vmcoreinfo to kgdbkernel/debug/gdbstub.c lib/Kconfig.kgdb+15 -42 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchStephen BrennanDouglas Anderson
1/3
2/3R-b R-b
2/3R-b R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] Add a new command in kgdb for vmcoreinfo

From: Amal Raj T <[email protected]>

This patch set introduces a new custom query packet, qlinux.vmcoreinfo, to kgdb. This packet retrieves kernel's vmcoreinfo text, which contains crucial debugging information such as the KASLR offset, kernel release, phys_base etc.

This implementation includes a new binary-encoder (mem2ebin) instead of the existing hex-encoder (mem2hex) to reduce the amount of data sent over the wire.

These changes also move the LF -> CRLF replacement logic from serial drivers to KDB, since KDB is the only user of this logic, and the existing replacement results in incorrect checksums generated by KGDB.

Link:
- https://github.com/osandov/drgn/wiki/GDB-Remote-Protocol-proposal:-linux.vmcoreinfo-query-packet

v3:
- Added relevant links for the new query
- Updated tmp+=1 to tmp++
- Added few examples and additional documentation for encoding function Amal Raj T (3):
kgdb: Add kgdb_mem2ebin function for converting memory to binary
format
serial: Move LF -> CRLF replacement from serial console to kdb
kgdb: Add command linux.vmcoreinfo to kgdb

 drivers/tty/serial/serial_core.c |   2 -
 include/linux/kgdb.h             |   1 +
 kernel/debug/gdbstub.c           | 131 ++++++++++++++++++++-----------
 kernel/debug/kdb/kdb_io.c        |   2 +
 lib/Kconfig.kgdb                 |   1 +
 5 files changed, 91 insertions(+), 46 deletions(-)
Signature · 1 line
2.43.5