[$] Better linked-list traversal in BPF

Post Syndicated from corbet original https://lwn.net/Articles/964381/

Before loading a BPF program, the kernel must verify that the program is
safe to run; among other things, that verification includes ensuring that
the program will terminate within a bounded time. That requirement has
long made writing loops in BPF a challenging task. The situation has
improved over the years for some types of loops, but others — including
linked-list traversal — are still awkward in BPF programs. A new set of
BPF primitives aims to make life easier for this use case through the
installation of what can be seen as a sort of circuit breaker.