|
|
Log in / Subscribe / Register

Bounded loops in BPF programs

Bounded loops in BPF programs

Posted Dec 4, 2018 9:37 UTC (Tue) by roc (subscriber, #30627)
In reply to: Bounded loops in BPF programs by dezgeg
Parent article: Bounded loops in BPF programs

So does x86 (LOOP)! That's not really helpful here though because those instructions don't guarantee nothing jumps into the middle of the loop.


to post comments

Bounded loops in BPF programs

Posted Dec 5, 2018 19:55 UTC (Wed) by matthias (subscriber, #94967) [Link]

If the compiler would generate loop instructions for loops, there would be no need to reconstruct loops from jump instructions. There is no problem with jumps in the middle of the loop. The verifier can easily detect those and forbid them. The hard part is not not forbidding illegal jumps the hard part is to detect legal jumps and proof that they do no harm. This part would be much easier if loops would be explicitly marked instead of created by general purpose jump instructions.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds