2018-04-03 19:23:33 +02:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-19 10:50:49 -04:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-22 14:56:50 +02:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2012-05-22 14:56:50 +02:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-19 21:18:45 -04:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-27 14:21:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
2024-06-20 10:33:10 -07:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
2022-10-27 14:21:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-15 16:47:36 +01:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-20 10:33:10 -07:00
|
|
|
|
|
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
2022-10-27 14:21:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-15 16:47:36 +01:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-27 14:21:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-04-26 00:37:14 +08:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
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-20 23:49:23 -08:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-20 10:33:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-20 23:49:23 -08:00
|
|
|
|
2024-06-20 10:33:10 -07:00
|
|
|
|
|
|
|
|
|
2022-10-27 14:21:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
2017-02-15 16:47:36 +01:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-15 16:47:36 +01:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-16 11:03:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
|
|
|
|
|
2025-05-16 11:03:21 +08:00
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
2025-05-16 11:03:21 +08:00
|
|
|
|
|
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
|
|
|
|
|
2015-04-20 09:26:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-16 11:03:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
|
|
|
|
|
2025-05-16 11:03:22 +08:00
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
2025-05-16 11:03:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-27 14:21:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-28 16:18:58 +02:00
|
|
|
|
2012-05-30 18:05:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-28 16:18:58 +02:00
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-12 12:12:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2024-06-20 10:33:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-20 23:49:23 -08:00
|
|
|
|
2024-06-20 10:33:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
|
|
|
|
|
2013-06-28 12:37:45 +08:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-20 09:26:02 +08:00
|
|
|
|
2023-09-08 01:09:25 +02:00
|
|
|
|
|
|
|
|
|
2015-04-20 09:26:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-27 14:21:42 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2012-05-22 14:56:50 +02:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-22 14:56:50 +02:00
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-01 16:15:49 +00:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|
2014-01-29 00:25:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-13 12:29:12 +02:00
|
|
|
|