linux/kernel/debug/kdb
Kees Cook 69050f8d6d treewide: Replace kmalloc with kmalloc_obj for non-scalar types
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 <kees@kernel.org>
2026-02-21 01:02:28 -08:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kdb_bp.c kernel: debug: Add SPDX license ids to kdb files 2026-01-27 15:57:20 +01:00
kdb_bt.c kernel: debug: Add SPDX license ids to kdb files 2026-01-27 15:57:20 +01:00
kdb_cmds kdb: cleanup unused variables missed in the original kdb merge 2011-08-01 13:23:58 -05:00
kdb_debugger.c kernel: debug: Add SPDX license ids to kdb files 2026-01-27 15:57:20 +01:00
kdb_io.c kernel: debug: Add SPDX license ids to kdb files 2026-01-27 15:57:20 +01:00
kdb_keyboard.c kernel: debug: Add SPDX license ids to kdb files 2026-01-27 15:57:20 +01:00
kdb_main.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
kdb_private.h kernel: debug: Add SPDX license ids to kdb files 2026-01-27 15:57:20 +01:00
kdb_support.c kernel: debug: Add SPDX license ids to kdb files 2026-01-27 15:57:20 +01:00
Makefile kdb: Get rid of broken attempt to print CCVERSION in kdb summary 2019-05-12 09:50:43 +01:00