Closed fshahinfar1 closed 6 months ago
I am trying to use a better algorithm for detecting and generating failure paths (read #11). I also have some idea about treating verifier checks fails as a failure path.
It is now possible to add fallback points in bound-checks and other transformations made to create BPF program.
It is possible to fail in a function (e.g., in access out of range check). Currently, we terminate the function by returning zero (cast to the return type). This is not correct, there are cases that cause invalid behavior. Moreover, these cases result in BPF program not passing the verifier.
What should be done? I am already passing a flag to some function which need fallback. This out-of-range errors also mean fallback to user space, so it seems reasonable from a high level to treat them the same.