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
..
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-20 19:44:20 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-30 15:40:05 +01:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2025-10-22 19:28:06 -04:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2025-12-03 16:53:19 +01:00
2026-01-01 16:39:46 +08:00
2025-11-14 10:01:52 +01:00
2026-02-17 09:46:03 -08:00
2025-09-13 17:32:55 -07:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2025-11-12 10:00:15 -08:00
2026-01-06 20:52:57 -05:00
2026-02-08 00:13:32 -08:00
2025-12-06 14:01:20 -08:00
2026-02-21 01:02:28 -08:00
2026-02-12 12:13:01 -08:00
2025-10-30 20:10:27 +01:00
2026-02-21 01:02:28 -08:00
2025-11-20 14:03:43 -08:00
2026-01-22 15:58:22 -07:00
2026-02-21 01:02:28 -08:00
2026-02-12 12:13:01 -08:00
2025-11-27 14:24:33 -08:00
2026-01-08 12:43:57 +01:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-31 16:16:07 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2025-11-27 15:44:53 +01:00
2025-11-27 14:24:42 -08:00
2026-02-21 01:02:28 -08:00
2026-01-05 16:43:34 +01:00
2025-11-11 10:01:31 +01:00
2025-11-14 13:10:38 +01:00
2025-11-14 13:10:38 +01:00
2026-02-21 01:02:28 -08:00
2026-02-03 08:21:26 -08:00
2026-02-21 01:02:28 -08:00
2025-11-11 10:01:32 +01:00
2026-02-10 11:39:30 +01:00
2025-11-04 08:30:50 +01:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-22 11:11:20 +01:00
2026-02-21 01:02:28 -08:00
2025-11-12 10:00:13 -08:00
2026-02-21 01:02:28 -08:00
2026-01-05 16:43:33 +01:00
2025-11-19 18:06:50 +01:00
2025-09-17 16:25:41 +02:00
2026-02-21 01:02:28 -08:00
2026-01-22 11:11:17 +01:00
2026-02-12 19:17:44 -08:00
2026-01-06 11:27:10 +01:00
2025-10-29 10:29:54 +01:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-26 19:07:13 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2025-11-11 10:01:32 +01:00
2025-09-29 11:20:29 -07:00
2026-02-21 01:02:28 -08:00
2026-02-12 12:13:01 -08:00
2026-02-21 01:02:28 -08:00
2026-02-08 00:13:35 -08:00
2026-02-08 00:13:34 -08:00
2026-02-21 01:02:28 -08:00