kdb: Refactor and fix bugs in kdb_read()
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected] change-id 20240415-kgdb_read_refactor-2ea2dfc15dbbVersions newest first
- v3 Latest7 patches 1 replyApplied
- v27 patches 13 repliesSuperseded
- v17 patches 0 repliesSuperseded
Changes in v3 from the cover letter
- Collected tags from v2
- Added comment to describe the hidden depths of kdb_position_cursor()
(thanks Doug)
- Fixed a couple of typos in the patch descriptions (thanks Doug)
- Link to v2: https://lore.kernel.org/r/[email protected]
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | kdb: Fix buffer overflow during tab-completekernel/ | +13 | 0 replies | |
| 2/7 | kdb: Use format-strings rather than '\0' injection in kdb_read()kernel/ | +34 | 0 replies | |
| 3/7 | kdb: Fix console handling when editing and tab-completing commandskernel/ | +5 | 0 replies | |
| 4/7 | kdb: Merge identical case statements in kdb_read()kernel/ | +1 | 0 replies | |
| 5/7 | kdb: Use format-specifiers rather than memset() for padding in kdb_read()kernel/ | +3 | 0 replies | |
| 6/7 | kdb: Replace double memcpy() with memmove() in kdb_read()kernel/ | +7 | 0 replies | |
| 7/7 | kdb: Simplify management of tmpbuffer in kdb_read()kernel/ | +18 | 0 replies |
Reviews trailers per patch
All 7 patches have a Reviewed-by or Acked-by.
| Patch | Douglas Anderson | Justin Stitt |
|---|---|---|
| 1/7 | R-b | R-b T-b |
| 2/7 | R-b | T-b |
| 3/7 | R-b | T-b |
| 4/7 | R-b | T-b |
| 5/7 | R-b | T-b |
| 6/7 | R-b | T-b |
| 7/7 | R-b | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/7] kdb: Refactor and fix bugs in kdb_read()
Inspired by a patch from [Justin][1] I took a closer look at kdb_read().
Despite Justin's patch being a (correct) one-line manipulation it was a tough patch to review because the surrounding code was hard to read and it looked like there were unfixed problems.
This series isn't enough to make kdb_read() beautiful but it does make it shorter, easier to reason about and fixes two buffer overflows and a screen redraw problem!
[1]: https://lore.kernel.org/all/20240403-strncpy-kernel-debug-kdb-kdb_io-c-v1-1-7f78a08e9ff4@google.com/
---
Changes in v3:
- Collected tags from v2
- Added comment to describe the hidden depths of kdb_position_cursor()
(thanks Doug)
- Fixed a couple of typos in the patch descriptions (thanks Doug)
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- No code changes!
- I belatedly realized that one of the cleanups actually fixed a buffer
overflow so there are changes to Cc: (to add stable@...) and to one
of the patch descriptions.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Daniel Thompson (7):
kdb: Fix buffer overflow during tab-complete
kdb: Use format-strings rather than '\0' injection in kdb_read()
kdb: Fix console handling when editing and tab-completing commands
kdb: Merge identical case statements in kdb_read()
kdb: Use format-specifiers rather than memset() for padding in kdb_read()
kdb: Replace double memcpy() with memmove() in kdb_read()
kdb: Simplify management of tmpbuffer in kdb_read()
kernel/debug/kdb/kdb_io.c | 153 +++++++++++++++++++++++----------------------- 1 file changed, 78 insertions(+), 75 deletions(-)
---
base-commit: dccce9b8780618986962ba37c373668bcf426866
change-id: 20240415-kgdb_read_refactor-2ea2dfc15dbb
Best regards,
Signature · 1 line
Daniel Thompson <[email protected]>