On Fri, 2025-02-28 at 15:34 -0800, Andrii Nakryiko wrote: [...] > > There were two alternatives on the table last time: > > - add support for tags on global functions; > > I was supportive of this, I believe > > > - verify global subprogram call tree in post-order, > > in order to have the flags ready when needed. > > Remind me of the details here? we'd start validating the main prog, > suspend that process when encountering global func, go validate global > func, once done, come back to main prog, right? Yes. The tree can't be built statically if we account for dead code elimination, as post-order might change. > Alternatively, we could mark expected properties (restrictions) of > global subprogs as we encounter them, right? E.g, if we come to global > func call inside rcu_read_{lock,unlock}() region, we'd mark it > internally as "needs to be non-sleepable". For situation like below, suppose verification order is main, foo, bar, buz: - main() sleepable - foo() - bar() - foo(): - buz() - bar(): - foo() while holding lock - buz(): - calls something sleepable I think, to handle this the call-tree needs to be built on the main verification pass, and then checked for sleepable. But that won't work for changes_pkt_data, as verdict has to be known right-away to decide whether to invalidate packet pointers. [...]