The `index` argument to bpf_loop() is threaded as an u64. This lead in a subtle verifier denial where clang cloned the argument in another register[1]. [1] https://github.com/systemd/systemd/pull/34650#issuecomment-2401092895
Showing the changes to tools/include/uapi/linux (1 of 3 files). Show all
Unified · Split
| @@ -5371,7 +5371,7 @@ union bpf_attr { · 5370 unmodified lines | ||
| 5371 | 5371 | * Currently, the **flags** must be 0. Currently, nr_loops is |
| 5372 | 5372 | * limited to 1 << 23 (~8 million) loops. |
| 5373 | 5373 | * |
| 5374 | − * long (\*callback_fn)(u32 index, void \*ctx); | |
| 5374 | + * long (\*callback_fn)(u64 index, void \*ctx); | |
| 5375 | 5375 | * |
| 5376 | 5376 | * where **index** is the current index in the loop. The index |
| 5377 | 5377 | * is zero-indexed. |