BPF as a safer kernel programming environment
BPF as a safer kernel programming environment
Posted Oct 12, 2022 8:47 UTC (Wed) by sammythesnake (guest, #17693)In reply to: BPF as a safer kernel programming environment by developer122
Parent article: BPF as a safer kernel programming environment
There's still value in assertions at the start of the program regarding its input state (e.g. a range parameter must be under a certain size, perhaps) which might be checked before execution, but that's a fairly small subset of the assertions that might be useful within the eBPF program.
The approach taken by the verifier has been to verify the subset and reject anything it doesn't know how to verify. I guess there could be a mode that understands some subset of assertions (perhaps defined declaratively in metadata alongside the eBPF program) and falls back to executing assertion statements for others but that requires some means to respond to a failed assertion during execution, which might be decidedly nontrivial in some cases...
