How to Avoid Making a Billion-Dollar Mistake: Type-Safe Data Plane Programming with SafeP4

Matthias Eichholz, E. Campbell, Nate Foster, G. Salvaneschi, M. Mezini
{"title":"How to Avoid Making a Billion-Dollar Mistake: Type-Safe Data Plane Programming with SafeP4","authors":"Matthias Eichholz, E. Campbell, Nate Foster, G. Salvaneschi, M. Mezini","doi":"10.4230/LIPIcs.ECOOP.2019.12","DOIUrl":null,"url":null,"abstract":"The P4 programming language offers high-level, declarative abstractions that bring the flexibility of software to the domain of networking. Unfortunately, the main abstraction used to represent packet data in P4, namely header types, lacks basic safety guarantees. Over the last few years, experience with an increasing number of programs has shown the risks of the unsafe approach, which often leads to subtle software bugs. \nThis paper proposes SafeP4, a domain-specific language for programmable data planes in which all packet data is guaranteed to have a well-defined meaning and satisfy essential safety guarantees. We equip SafeP4 with a formal semantics and a static type system that statically guarantees header validity---a common source of safety bugs according to our analysis of real-world P4 programs. Statically ensuring header validity is challenging because the set of valid headers can be modified at runtime, making it a dynamic program property. Our type system achieves static safety by using a form of path-sensitive reasoning that tracks dynamic information from conditional statements, routing tables, and the control plane. Our evaluation shows that SafeP4's type system can effectively eliminate common failures in many real-world programs.","PeriodicalId":172012,"journal":{"name":"European Conference on Object-Oriented Programming","volume":"19 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"European Conference on Object-Oriented Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/LIPIcs.ECOOP.2019.12","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

Abstract

The P4 programming language offers high-level, declarative abstractions that bring the flexibility of software to the domain of networking. Unfortunately, the main abstraction used to represent packet data in P4, namely header types, lacks basic safety guarantees. Over the last few years, experience with an increasing number of programs has shown the risks of the unsafe approach, which often leads to subtle software bugs. This paper proposes SafeP4, a domain-specific language for programmable data planes in which all packet data is guaranteed to have a well-defined meaning and satisfy essential safety guarantees. We equip SafeP4 with a formal semantics and a static type system that statically guarantees header validity---a common source of safety bugs according to our analysis of real-world P4 programs. Statically ensuring header validity is challenging because the set of valid headers can be modified at runtime, making it a dynamic program property. Our type system achieves static safety by using a form of path-sensitive reasoning that tracks dynamic information from conditional statements, routing tables, and the control plane. Our evaluation shows that SafeP4's type system can effectively eliminate common failures in many real-world programs.
如何避免犯下十亿美元的错误:使用SafeP4进行类型安全数据平面编程
P4编程语言提供了高级的声明性抽象,为网络领域带来了软件的灵活性。不幸的是,P4中用于表示包数据的主要抽象,即报头类型,缺乏基本的安全保证。在过去的几年中,使用越来越多的程序的经验表明了不安全方法的风险,这通常会导致微妙的软件错误。本文提出了一种面向可编程数据平面的领域专用语言SafeP4,该语言保证所有数据包数据具有定义良好的含义并满足基本的安全保证。我们为SafeP4配备了形式化语义和静态类型系统,该系统静态地保证头文件的有效性——根据我们对实际P4程序的分析,这是安全错误的常见来源。静态地确保标头的有效性是具有挑战性的,因为有效的标头集可以在运行时修改,从而使其成为动态的程序属性。我们的类型系统通过使用一种形式的路径敏感推理来实现静态安全,该推理跟踪来自条件语句、路由表和控制平面的动态信息。我们的评估表明,SafeP4的类型系统可以有效地消除许多实际程序中的常见故障。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信