On Tue, Oct 3, 2017 at 9:26 PM, zhiting zhu via iovisor-dev <[email protected]> wrote: > Hi, > > What's the use case for backward jump of ebpf? The verifier will reject the > backward edge which makes the backward jump not useful. Am I missing > something? > > Also, from what I read online, some slides said ebpf allows backward jump > and some said doesn't. From the bytecode, it seems it allows it. I want some > classification here. Thanks!
There is no such thing as 'backward edge'. In graph theory there is 'back edge' which is the same as saying there is a loop in control flow graph. The kernel verifier has logic to detect back edges and reject such programs. Backwards jumps are allowed, since backward jump != loop. _______________________________________________ iovisor-dev mailing list [email protected] https://lists.iovisor.org/mailman/listinfo/iovisor-dev
