2019-05-29 16:57:35 -07:00
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-16 13:44:20 +01:00
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-30 20:51:11 +10:00
|
|
|
|
|
|
|
|
|
2014-06-30 20:51:10 +10:00
|
|
|
|
2014-06-30 20:51:11 +10:00
|
|
|
|
2014-06-30 20:51:10 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-30 20:51:11 +10:00
|
|
|
|
|
|
|
|
|
2016-06-01 14:09:21 +02:00
|
|
|
|
2014-06-30 20:51:10 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-30 20:51:11 +10:00
|
|
|
|
2014-06-30 20:51:10 +10:00
|
|
|
|
2014-06-30 20:51:11 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-30 20:51:10 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-03 10:44:10 -04:00
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-22 16:20:39 +00:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-30 20:51:10 +10:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-16 13:44:20 +01:00
|
|
|
|
2014-06-30 20:51:11 +10:00
|
|
|
|
2014-01-16 13:44:20 +01:00
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
2015-02-20 08:21:37 -05:00
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-08 14:31:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-08 14:31:44 +02:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:04:10 +02:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2016-07-12 22:09:26 +02:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-07 10:50:35 +02:00
|
|
|
|
2019-04-11 11:16:47 +02:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-16 10:07:48 +03:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2019-04-11 11:16:47 +02:00
|
|
|
|
2015-10-16 10:07:48 +03:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2017-04-07 10:50:35 +02:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2019-04-11 11:16:47 +02:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2016-07-12 22:09:26 +02:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2017-04-07 10:50:35 +02:00
|
|
|
|
2014-06-30 20:51:10 +10:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
2017-04-07 10:50:35 +02:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
2015-11-10 15:36:31 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-28 17:06:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-22 16:20:42 +00:00
|
|
|
|
2013-04-15 23:23:21 +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
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-08 14:31:44 +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
|
|
|
|
2015-05-08 14:31:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2016-07-22 16:20:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-02 12:33:53 +05:30
|
|
|
|
2016-07-12 22:09:26 +02:00
|
|
|
|
2016-07-22 16:20:42 +00:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-06 20:31:11 +02:00
|
|
|
|
2014-06-30 20:51:11 +10:00
|
|
|
|
|
|
|
|
|
2015-11-10 15:36:31 +03:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
2014-01-16 13:44:20 +01:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-22 16:20:42 +00:00
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2016-07-22 16:20:42 +00:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
2015-05-08 14:31:44 +02:00
|
|
|
|
|
|
|
|
|
2013-04-15 23:23:21 +02:00
|
|
|
|
|
|
|
|
|
2024-05-06 18:17:49 +08: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-05-06 18:17:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|