aya-rs/book

Guide on code complexity and register spill

Opened this issue · 0 comments

When developing eBPF programs with Aya developers may reach a level of code complexity that causes spills from registers to the stack, and sometimes even end up failing verification due to related issues. These kinds of errors can be very subtle and difficult to understand, particularly for newcomers.

The purpose of this task is to create documentation in the book which thoroughly dives into complexity and how to structure programs to explain the kinds of issues that can arise, and demonstrate how to avoid OR recover from them. This documentation should include an explanation of compilation with examples that demonstrate a failure case, and examples of how to fix those programs to counteract the issue.

(originally discussed in aya-rs/aya#505)