[$] Generic iterators for BPF

Post Syndicated from original https://lwn.net/Articles/926041/

BPF programs destined to be loaded into the kernel are generally written in
C but, increasingly, the environment in which those programs run differs
significantly from the C environment. The BPF virtual machine and
associated verifier make a growing set of checks in an attempt to make BPF
code safe to run. The proposed addition of an iterator mechanism to BPF
highlights the kind of features that are being added — as well as the
constraints placed on programmers by BPF.