bpftime:用于Uprobe, sycall和内核用户交互的用户空间eBPF运行时

Yusheng Zheng, Tong Yu, Yiwei Yang, Yanpeng Hu, XiaoZheng Lai, Andrew Quinn
{"title":"bpftime:用于Uprobe, sycall和内核用户交互的用户空间eBPF运行时","authors":"Yusheng Zheng, Tong Yu, Yiwei Yang, Yanpeng Hu, XiaoZheng Lai, Andrew Quinn","doi":"arxiv-2311.07923","DOIUrl":null,"url":null,"abstract":"In kernel-centric operations, the uprobe component of eBPF frequently\nencounters performance bottlenecks, largely attributed to the overheads borne\nby context switches. Transitioning eBPF operations to user space bypasses these\nhindrances, thereby optimizing performance. This also enhances configurability\nand obviates the necessity for root access or privileges for kernel eBPF,\nsubsequently minimizing the kernel attack surface. This paper introduces\nbpftime, a novel user-space eBPF runtime, which leverages binary rewriting to\nimplement uprobe and syscall hook capabilities. Through bpftime, userspace\nuprobes achieve a 10x speed enhancement compared to their kernel counterparts\nwithout requiring dual context switches. Additionally, this runtime facilitates\nthe programmatic hooking of syscalls within a process, both safely and\nefficiently. Bpftime can be seamlessly attached to any running process,\nlimiting the need for either a restart or manual recompilation. Our\nimplementation also extends to interprocess eBPF Maps within shared memory,\ncatering to summary aggregation or control plane communication requirements.\nCompatibility with existing eBPF toolchains such as clang and libbpf is\nmaintained, not only simplifying the development of user-space eBPF without\nnecessitating any modifications but also supporting CO-RE through BTF. Through\nbpftime, we not only enhance uprobe performance but also extend the versatility\nand user-friendliness of eBPF runtime in user space, paving the way for more\nefficient and secure kernel operations.","PeriodicalId":501333,"journal":{"name":"arXiv - CS - Operating Systems","volume":"495 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-11-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"bpftime: userspace eBPF Runtime for Uprobe, Syscall and Kernel-User Interactions\",\"authors\":\"Yusheng Zheng, Tong Yu, Yiwei Yang, Yanpeng Hu, XiaoZheng Lai, Andrew Quinn\",\"doi\":\"arxiv-2311.07923\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In kernel-centric operations, the uprobe component of eBPF frequently\\nencounters performance bottlenecks, largely attributed to the overheads borne\\nby context switches. Transitioning eBPF operations to user space bypasses these\\nhindrances, thereby optimizing performance. This also enhances configurability\\nand obviates the necessity for root access or privileges for kernel eBPF,\\nsubsequently minimizing the kernel attack surface. This paper introduces\\nbpftime, a novel user-space eBPF runtime, which leverages binary rewriting to\\nimplement uprobe and syscall hook capabilities. Through bpftime, userspace\\nuprobes achieve a 10x speed enhancement compared to their kernel counterparts\\nwithout requiring dual context switches. Additionally, this runtime facilitates\\nthe programmatic hooking of syscalls within a process, both safely and\\nefficiently. Bpftime can be seamlessly attached to any running process,\\nlimiting the need for either a restart or manual recompilation. Our\\nimplementation also extends to interprocess eBPF Maps within shared memory,\\ncatering to summary aggregation or control plane communication requirements.\\nCompatibility with existing eBPF toolchains such as clang and libbpf is\\nmaintained, not only simplifying the development of user-space eBPF without\\nnecessitating any modifications but also supporting CO-RE through BTF. Through\\nbpftime, we not only enhance uprobe performance but also extend the versatility\\nand user-friendliness of eBPF runtime in user space, paving the way for more\\nefficient and secure kernel operations.\",\"PeriodicalId\":501333,\"journal\":{\"name\":\"arXiv - CS - Operating Systems\",\"volume\":\"495 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-11-14\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Operating Systems\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2311.07923\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Operating Systems","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2311.07923","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

在以内核为中心的操作中,eBPF的探测组件经常遇到性能瓶颈,这主要归因于上下文切换带来的开销。将eBPF操作转换到用户空间可以绕过这些障碍,从而优化性能。这还增强了可配置性,并消除了对内核eBPF的根访问或特权的必要性,从而最大限度地减少了内核攻击面。本文介绍了一种新的用户空间eBPF运行时bpftime,它利用二进制重写来实现探测和系统调用钩子功能。通过bpftime, userspaceuprobe实现了10倍的速度提升,而不需要双重上下文切换。此外,这个运行时还促进了进程内系统调用的编程挂钩,既安全又有效。Bpftime可以无缝地附加到任何正在运行的进程,从而限制了重新启动或手动重新编译的需要。我们的实现还扩展到共享内存中的进程间eBPF映射,以满足摘要聚合或控制平面通信需求。与现有的eBPF工具链(如clang和libbpf)保持兼容性,不仅简化了用户空间eBPF的开发而无需任何修改,而且还通过BTF支持CO-RE。通过bpftime,我们不仅增强了探针性能,还扩展了eBPF运行时在用户空间中的多功能性和用户友好性,为更高效、更安全的内核操作铺平了道路。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
bpftime: userspace eBPF Runtime for Uprobe, Syscall and Kernel-User Interactions
In kernel-centric operations, the uprobe component of eBPF frequently encounters performance bottlenecks, largely attributed to the overheads borne by context switches. Transitioning eBPF operations to user space bypasses these hindrances, thereby optimizing performance. This also enhances configurability and obviates the necessity for root access or privileges for kernel eBPF, subsequently minimizing the kernel attack surface. This paper introduces bpftime, a novel user-space eBPF runtime, which leverages binary rewriting to implement uprobe and syscall hook capabilities. Through bpftime, userspace uprobes achieve a 10x speed enhancement compared to their kernel counterparts without requiring dual context switches. Additionally, this runtime facilitates the programmatic hooking of syscalls within a process, both safely and efficiently. Bpftime can be seamlessly attached to any running process, limiting the need for either a restart or manual recompilation. Our implementation also extends to interprocess eBPF Maps within shared memory, catering to summary aggregation or control plane communication requirements. Compatibility with existing eBPF toolchains such as clang and libbpf is maintained, not only simplifying the development of user-space eBPF without necessitating any modifications but also supporting CO-RE through BTF. Through bpftime, we not only enhance uprobe performance but also extend the versatility and user-friendliness of eBPF runtime in user space, paving the way for more efficient and secure kernel operations.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Analysis of Synchronization Mechanisms in Operating Systems Skip TLB flushes for reused pages within mmap's eBPF-mm: Userspace-guided memory management in Linux with eBPF BULKHEAD: Secure, Scalable, and Efficient Kernel Compartmentalization with PKS Rethinking Programmed I/O for Fast Devices, Cheap Cores, and Coherent Interconnects
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1