bpf: fix argument type in bpf_loop documentation
authorMatteo Croce <teknoraver@meta.com>
Thu, 10 Oct 2024 03:56:52 +0000 (04:56 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 10 Oct 2024 15:52:36 +0000 (08:52 -0700)
commit5bd48a3a14df4b3ee1be0757efcc0f40d4f57b35
tree65e2ea6fdecffdfec494ec9b8ee4cd985d136d42
parent4073213488be542f563eb4b2457ab4cbcfc2b738
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

Signed-off-by: Matteo Croce <teknoraver@meta.com>
Link: https://lore.kernel.org/r/20241010035652.17830-1-technoboy85@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/bpf.h
kernel/bpf/verifier.c
tools/include/uapi/linux/bpf.h