【24h】

Checking System Rules Using System-Specific, Programmer-Written Compiler Extensions

机译:使用系统特定的,程序员编写的编译器扩展来检查系统规则

获取原文
获取原文并翻译 | 示例

摘要

Systems software such as OS kernels, embedded systems, and libraries must obey many rules for both correctness and performance. Common examples include "accesses to variable A must be guarded by lock B," "system calls must check user pointers for validity before using them," and "message handlers should free their buffers as quickly as possible to allow greater parallelism." Unfortunately, adherence to these rules is largely unchecked. This paper attacks this problem by showing how system implementors can use meta-level compilation (MC) to write simple, system-specific compiler extensions that automatically check their code for rule violations. By melding domain-specific knowledge with the automatic machinery of compilers, MC brings the benefits of language-level checking and optimizing to the higher, "meta" level of the systems implemented in these languages. This paper demonstrates the effectiveness of the MC approach by applying it to four complex, real systems: Linux, OpenBSD, the Xok exokernel, and the FLASH machine's embedded software. MC extensions found roughly 500 errors in these systems and led to numerous kernel patches. Most extensions were less than a hundred lines of code and written by implementors who had a limited understanding of the systems checked.
机译:诸如OS内核,嵌入式系统和库之类的系统软件必须遵守正确性和性能的许多规则。常见的示例包括“对变量A的访问必须由锁B保护”,“系统调用必须在使用它们之前检查用户指针的有效性”和“消息处理程序应尽快释放其缓冲区以允许更大的并行度”。不幸的是,对这些规则的遵守在很大程度上不受限制。本文通过展示系统实现者如何使用元级编译(MC)来编写简单的,特定于系统的编译器扩展,从而自动检查其代码是否违反规则,来解决该问题。通过将特定领域的知识与自动编译器融合在一起,MC将语言级别检查和优化的好处带到了使用这些语言实现的系统的更高“元”级别。本文通过将MC方法应用于四个复杂的实际系统来演示MC方法的有效性:Linux,OpenBSD,Xok exokernel和FLASH机器的嵌入式软件。 MC扩展在这些系统中发现了大约500个错误,并导致了许​​多内核补丁。大多数扩展少于一百行代码,并且由对检查的系统了解有限的实现者编写。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号