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