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-01-19 14:42:52 +00:00
2026-01-29 11:54:47 +00:00
2026-01-29 11:54:47 +00:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:52 +00:00
2025-08-19 13:05:58 +01:00
2025-08-19 13:05:58 +01:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-28 11:22:06 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-09 13:21:55 +00:00
2026-01-09 13:21:55 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-02-05 18:25:28 +00:00
2026-01-27 12:46:29 +00:00
2026-01-28 11:22:06 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2025-11-28 11:48:08 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:51 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:54 +00:00
2026-02-21 01:02:28 -08:00
2025-10-13 11:27:35 +01:00
2026-01-28 11:58:11 +00:00
2025-10-13 11:27:35 +01:00
2025-10-13 11:27:35 +01:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:52 +00:00
2026-02-17 09:11:04 -08:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-28 15:53:10 +00:00
2025-11-06 16:57:36 +00:00
2026-02-21 01:02:28 -08:00
2026-02-04 17:37:36 +00:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-15 14:21:29 +00:00
2025-10-20 16:15:29 +01:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:54 +00:00
2025-08-12 12:06:13 +01:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2025-09-12 00:54:56 +01:00
2026-01-19 14:42:52 +00: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-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2025-08-18 13:13:57 +01:00
2025-10-13 11:27:52 +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-01-19 14:42:52 +00:00
2025-06-30 12:15:45 +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-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-20 17:58:31 +00:00
2025-09-22 09:21:18 +01:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:54 +00:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-28 11:22:06 +00:00
2026-01-19 14:42:52 +00:00
2026-01-06 12:23:36 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:54 +00:00
2026-01-19 14:42:53 +00:00
2026-01-19 14:42:52 +00:00
2026-02-11 09:43:43 -08:00
2026-02-21 01:02:28 -08:00
2026-02-11 09:43:43 -08:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00
2026-01-19 14:42:52 +00:00
2026-02-21 01:02:28 -08:00
2026-02-13 17:08:24 +00:00
2026-01-19 14:42:52 +00:00
2026-02-03 21:06:18 +00:00
2026-01-19 14:42:52 +00:00
2026-01-19 14:42:52 +00:00
2025-07-05 00:50:32 +01:00
2026-02-21 01:02:28 -08:00
2026-02-21 01:02:28 -08:00