History

bpf: fix argument type in bpf_loop documentation

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

Matteo Croce committed 2 years ago

Commit 5bd48a31 parent 40732133 files · +3 −3Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/bpf.h+1−1
@@ -5371,7 +5371,7 @@ union bpf_attr { · 5370 unmodified lines
5371 * Currently, the **flags** must be 0. Currently, nr_loops is5371 * Currently, the **flags** must be 0. Currently, nr_loops is
5372 * limited to 1 << 23 (~8 million) loops.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 * where **index** is the current index in the loop. The index5376 * where **index** is the current index in the loop. The index
5377 * is zero-indexed.5377 * is zero-indexed.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t