2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-20 15:19:44 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2023-06-08 09:38:36 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-13 07:07:23 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-16 10:22:02 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-06-23 14:24:47 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-20 16:57:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:44 +01:00
|
|
|
|
|
|
|
|
|
2023-02-27 09:41:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-20 16:57:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-12 16:38:20 +08:00
|
|
|
|
2022-11-20 16:57:42 +00:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:10 +01:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
2022-11-11 16:51:30 +00:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-27 09:41:20 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-27 09:41:20 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2025-12-05 10:20:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-05 10:20:47 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:24 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:25 -07:00
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
2024-01-29 11:57:11 -07:00
|
|
|
|
2022-06-30 02:12:24 -07:00
|
|
|
|
|
|
|
|
|
2024-01-29 11:52:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2025-02-16 19:25:04 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2025-09-23 04:25:22 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-30 15:21:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-30 15:21:54 +00:00
|
|
|
|
2022-11-30 15:21:52 +00:00
|
|
|
|
|
|
|
|
|
2022-11-20 16:57:42 +00:00
|
|
|
|
2022-11-30 15:21:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-20 16:57:42 +00:00
|
|
|
|
2022-11-30 15:21:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-15 09:03:03 -06:00
|
|
|
|
2022-11-20 16:57:42 +00:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-30 02:12:24 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2026-03-17 14:10:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-20 15:08:21 -07:00
|
|
|
|
|
|
|
|
|
2026-03-17 14:10:19 -06:00
|
|
|
|
2023-01-20 15:08:21 -07:00
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
2023-01-20 15:08:21 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2022-06-30 02:12:24 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-18 22:00:31 +00:00
|
|
|
|
2022-06-30 02:12:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-17 09:48:00 +01:00
|
|
|
|
2026-03-15 09:03:03 -06:00
|
|
|
|
2025-03-08 17:19:32 +00:00
|
|
|
|
2026-03-15 09:03:03 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-08 17:19:33 +00:00
|
|
|
|
2022-06-30 02:12:25 -07:00
|
|
|
|
2024-01-29 11:57:11 -07:00
|
|
|
|
|
|
|
|
|
2025-03-08 17:19:32 +00:00
|
|
|
|
2022-06-17 09:48:00 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2022-11-17 18:40:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-01 12:49:37 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2024-07-29 19:03:33 -04:00
|
|
|
|
2022-06-30 02:12:24 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2025-02-16 19:25:04 -07:00
|
|
|
|
2024-01-29 11:57:11 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2024-01-29 11:57:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2024-09-30 14:35:52 -06:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
2022-11-30 15:21:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-11-30 15:21:55 +00:00
|
|
|
|
|
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
2022-11-30 15:21:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-11-30 15:21:55 +00:00
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2022-11-30 15:21:55 +00:00
|
|
|
|
2025-02-16 19:25:04 -07:00
|
|
|
|
2022-11-30 15:21:55 +00:00
|
|
|
|
|
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2023-01-10 10:44:37 -07:00
|
|
|
|
2025-10-31 14:34:29 -06:00
|
|
|
|
2022-11-30 15:21:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:45 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-21 14:34:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-05 10:20:47 -07:00
|
|
|
|
2022-06-21 14:34:15 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-21 14:34:15 -06:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-20 10:18:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-21 13:24:33 -06:00
|
|
|
|
2022-11-20 10:18:45 -07:00
|
|
|
|
2026-04-21 13:24:33 -06:00
|
|
|
|
|
|
|
|
|
2022-11-20 10:18:45 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2025-12-05 10:20:47 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:45 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-11 16:51:29 +00:00
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 15:13:14 +01:00
|
|
|
|
2022-11-11 16:51:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-07 15:13:14 +01:00
|
|
|
|
2022-11-11 16:51:29 +00:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-11-11 16:51:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-11-11 16:51:29 +00:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-11-11 16:51:29 +00:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06: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
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:44 +01:00
|
|
|
|
2023-02-27 09:41:20 -07:00
|
|
|
|
2022-11-11 16:51:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-13 08:58:15 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2023-12-13 08:58:15 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2023-12-13 08:58:15 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2023-01-09 14:46:10 -07:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-09 14:46:10 -07:00
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2023-02-27 09:41:20 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
2022-07-07 15:13:17 +01:00
|
|
|
|
2024-03-07 18:06:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-06-23 14:24:48 +01:00
|
|
|
|
|
|
|
|
|
2022-05-27 10:55:07 -06:00
|
|
|
|
|
|
|
|
|
2023-01-09 14:46:10 -07:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2023-01-09 14:46:10 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:47 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:47 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-05-27 10:55:07 -06:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:45 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2023-06-08 09:38:36 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
2022-11-20 16:57:41 +00:00
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-11-20 16:57:41 +00:00
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/poll: allow some retries for poll triggering spuriously
If we get woken spuriously when polling and fail the operation with
-EAGAIN again, then we generally only allow polling again if data
had been transferred at some point. This is indicated with
REQ_F_PARTIAL_IO. However, if the spurious poll triggers when the socket
was originally empty, then we haven't transferred data yet and we will
fail the poll re-arm. This either punts the socket to io-wq if it's
blocking, or it fails the request with -EAGAIN if not. Neither condition
is desirable, as the former will slow things down, while the latter
will make the application confused.
We want to ensure that a repeated poll trigger doesn't lead to infinite
work making no progress, that's what the REQ_F_PARTIAL_IO check was
for. But it doesn't protect against a loop post the first receive, and
it's unnecessarily strict if we started out with an empty socket.
Add a somewhat random retry count, just to put an upper limit on the
potential number of retries that will be done. This should be high enough
that we won't really hit it in practice, unless something needs to be
aborted anyway.
Cc: stable@vger.kernel.org # v5.10+
Link: https://github.com/axboe/liburing/issues/364
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-02-25 12:53:53 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-16 15:46:10 -05:00
|
|
|
|
2025-01-22 20:00:57 -07:00
|
|
|
|
2024-12-16 15:46:10 -05: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-12-16 15:46:10 -05:00
|
|
|
|
2022-06-23 14:24:46 +01:00
|
|
|
|
io_uring/poll: allow some retries for poll triggering spuriously
If we get woken spuriously when polling and fail the operation with
-EAGAIN again, then we generally only allow polling again if data
had been transferred at some point. This is indicated with
REQ_F_PARTIAL_IO. However, if the spurious poll triggers when the socket
was originally empty, then we haven't transferred data yet and we will
fail the poll re-arm. This either punts the socket to io-wq if it's
blocking, or it fails the request with -EAGAIN if not. Neither condition
is desirable, as the former will slow things down, while the latter
will make the application confused.
We want to ensure that a repeated poll trigger doesn't lead to infinite
work making no progress, that's what the REQ_F_PARTIAL_IO check was
for. But it doesn't protect against a loop post the first receive, and
it's unnecessarily strict if we started out with an empty socket.
Add a somewhat random retry count, just to put an upper limit on the
potential number of retries that will be done. This should be high enough
that we won't really hit it in practice, unless something needs to be
aborted anyway.
Cc: stable@vger.kernel.org # v5.10+
Link: https://github.com/axboe/liburing/issues/364
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-02-25 12:53:53 -07:00
|
|
|
|
2022-06-23 14:24:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
io_uring/poll: allow some retries for poll triggering spuriously
If we get woken spuriously when polling and fail the operation with
-EAGAIN again, then we generally only allow polling again if data
had been transferred at some point. This is indicated with
REQ_F_PARTIAL_IO. However, if the spurious poll triggers when the socket
was originally empty, then we haven't transferred data yet and we will
fail the poll re-arm. This either punts the socket to io-wq if it's
blocking, or it fails the request with -EAGAIN if not. Neither condition
is desirable, as the former will slow things down, while the latter
will make the application confused.
We want to ensure that a repeated poll trigger doesn't lead to infinite
work making no progress, that's what the REQ_F_PARTIAL_IO check was
for. But it doesn't protect against a loop post the first receive, and
it's unnecessarily strict if we started out with an empty socket.
Add a somewhat random retry count, just to put an upper limit on the
potential number of retries that will be done. This should be high enough
that we won't really hit it in practice, unless something needs to be
aborted anyway.
Cc: stable@vger.kernel.org # v5.10+
Link: https://github.com/axboe/liburing/issues/364
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-02-25 12:53:53 -07:00
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-16 10:46:26 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-16 10:46:26 +01:00
|
|
|
|
2024-01-28 20:08:24 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:46 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-27 19:56:18 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-06-23 14:24:48 +01:00
|
|
|
|
|
|
|
|
|
2022-06-16 13:57:20 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-16 10:46:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-03 10:22:43 -07:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:10 +01:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-16 10:22:02 +01:00
|
|
|
|
2024-11-03 10:22:43 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-16 10:22:02 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-28 20:11:55 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:10 +01:00
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-16 10:22:02 +01:00
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
2023-06-23 09:04:35 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-23 10:36:43 -06:00
|
|
|
|
|
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
2022-06-16 10:22:03 +01:00
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
2022-06-16 10:22:03 +01:00
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:11 +01:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:09 +01:00
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-30 14:22:36 -06:00
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
|
|
|
|
|
2022-06-16 10:22:09 +01:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-27 10:55:07 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-28 09:49:28 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 14:24:49 +01:00
|
|
|
|
2022-06-23 14:24:48 +01:00
|
|
|
|
2022-06-23 14:24:47 +01:00
|
|
|
|
2025-05-08 14:48:33 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2022-06-23 14:24:48 +01:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2023-06-23 09:54:56 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-17 19:50:24 -06:00
|
|
|
|
2024-09-30 14:29:06 -06:00
|
|
|
|
2022-06-16 10:22:12 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-20 01:26:01 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-11 09:11:15 +02:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-17 19:50:24 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2025-12-01 13:25:22 -07:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2025-12-01 13:25:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-01 13:25:22 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-15 15:29:51 +00:00
|
|
|
|
|
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
2023-06-17 19:50:24 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-08 14:48:33 -06:00
|
|
|
|
2022-05-25 20:31:09 -06:00
|
|
|
|