
























> You're not defending against a malicious actor here, it's (IMHO) to prevent people writing stupid BPF programs by accident.
Then termination detection doesn't need to be in the kernel verifier, it can just be a lint that the compiler applies to warn you if your program might run too long.
> What you are basically suggesting is adding support for exceptions which would allow a BPF program to be aborted at any point. And every caller has to decide what to do with an OutOfInstructions exception. Given the opinion of exceptions in the rest of the kernel and the complexity isn't adds to e.g. C++, I can understand why they don't want to go that route.
One problem with that argument is that BPF programs already support aborts/exceptions: https://lpc.events/event/17/contributions/1578/attachment...
So the additional work that would be required would just be to define, for each context in which a BPF program can be called, where the BPF function's return value is not void, a default return value.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。