|
|
Subscribe / Log in / New account

Exceptions in BPF

Exceptions in BPF

Posted Jul 21, 2023 23:07 UTC (Fri) by randomguy3 (subscriber, #71063)
Parent article: Exceptions in BPF

I'd argue that rust borrow checks and panics are conceptually very similar to bpf verification and exceptions. In both cases, you are attempting to eliminate certain classes of failures before running the program, and providing a mechanism to assert invariants and cleanly handle bugs.

The difference is primarily scope: as a general purpose language, rust's borrow checker is weaker than bpf's verification (with a few escape hatches provided as well), and its use of asserts/panics more extensive.


to post comments

Exceptions in BPF

Posted Jul 22, 2023 9:07 UTC (Sat) by softball (guest, #160655) [Link]

A core aspect they have in common is to err on the side of false-positives. False-negatives would be disastrous, and perfect, 1:1 deduction isn't possible (halting problem), so the only reasonable thing to do is disallow certain known-good (to the developer) scenarios.


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