论文标题
进行可编程开关的运行时验证
Towards Runtime Verification of Programmable Switches
论文作者
论文摘要
是否可以在不参与的无人参与的情况下修补P4程序中的软件错误?我们证明,由于软件测试和P4程序的结构的进步,在许多情况下,这是可能的。我们的洞察力是,运行时验证可以检测错误,即使是在编译时未检测到的错误,也可以通过机器学习引导的模糊性检测错误。这样可以使用Tarantula等软件测试技术在P4程序中对错误进行更自动化和实时的定位。 P4程序中的错误本地化后,由于P4的可编程性质,可以修补故障代码。另外,可以检测到与平台相关的错误。从P4_14到P4_16(最新版本),我们的观察结果是,随着可编程块的增加,P4程序的修补性会相应增加。为此,我们设计,开发和评估P6(a)(a)检测,(b)本地化和(c)在人类互动最少的P4程序中修补错误。 P6测试P4非侵入性切换,即不需要对检测和本地化错误的P4程序进行修改。我们使用P6原型来检测和修补八个公开可用的P4应用程序程序中的七个现有错误:行为模型(BMV2)和Tofino。我们的评估表明,P6在P4程序(例如switch.p4)中生成较少的数据包和修补错误,而无需触发任何回归。
Is it possible to patch software bugs in P4 programs without human involvement? We show that this is partially possible in many cases due to advances in software testing and the structure of P4 programs. Our insight is that runtime verification can detect bugs, even those that are not detected at compile-time, with machine learning-guided fuzzing. This enables a more automated and real-time localization of bugs in P4 programs using software testing techniques like Tarantula. Once the bug in a P4 program is localized, the faulty code can be patched due to the programmable nature of P4. In addition, platform-dependent bugs can be detected. From P4_14 to P4_16 (latest version), our observation is that as the programmable blocks increase, the patchability of P4 programs increases accordingly. To this end, we design, develop, and evaluate P6 that (a) detects, (b) localizes, and (c) patches bugs in P4 programs with minimal human interaction. P6 tests P4 switch non-intrusively, i.e., requires no modification to the P4 program for detecting and localizing bugs. We used a P6 prototype to detect and patch seven existing bugs in eight publicly available P4 application programs deployed on two different switch platforms: behavioral model (bmv2) and Tofino. Our evaluation shows that P6 significantly outperforms bug detection baselines while generating fewer packets and patches bugs in P4 programs such as switch.p4 without triggering any regressions.