linux-stable/kernel/debug/kdb
Arnd Bergmann 70867efacf kdb: address -Wformat-security warnings
When -Wformat-security is not disabled, using a string pointer
as a format causes a warning:

kernel/debug/kdb/kdb_io.c: In function 'kdb_read':
kernel/debug/kdb/kdb_io.c:365:36: error: format not a string literal and no format arguments [-Werror=format-security]
  365 |                         kdb_printf(kdb_prompt_str);
      |                                    ^~~~~~~~~~~~~~
kernel/debug/kdb/kdb_io.c: In function 'kdb_getstr':
kernel/debug/kdb/kdb_io.c:456:20: error: format not a string literal and no format arguments [-Werror=format-security]
  456 |         kdb_printf(kdb_prompt_str);
      |                    ^~~~~~~~~~~~~~

Use an explcit "%s" format instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5d5314d679 ("kdb: core for kgdb back end (1 of 2)")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240528121154.3662553-1-arnd@kernel.org
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2024-06-21 14:33:17 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kdb_bp.c kdb: Rename members of struct kdbtab_t 2021-07-27 17:05:06 +01:00
kdb_bt.c kdb: Adopt scheduler's task classification 2021-11-03 17:21:37 +00:00
kdb_cmds kdb: cleanup unused variables missed in the original kdb merge 2011-08-01 13:23:58 -05:00
kdb_debugger.c kdb: Get rid of custom debug heap allocator 2021-07-27 14:46:11 +01:00
kdb_io.c kdb: address -Wformat-security warnings 2024-06-21 14:33:17 +01:00
kdb_keyboard.c kdb: include kdb_private.h for function prototypes 2023-06-29 15:10:17 +01:00
kdb_main.c kdb: Use str_plural() to fix Coccinelle warning 2024-04-22 16:53:19 +01:00
kdb_private.h kdb: move kdb_send_sig() declaration to a better header file 2023-07-03 09:27:12 +01:00
kdb_support.c module: Move kdb module related code out of main kdb code 2022-04-05 08:43:04 -07:00
Makefile kdb: Get rid of broken attempt to print CCVERSION in kdb summary 2019-05-12 09:50:43 +01:00