Skip to content

Commit

Permalink
update 18-further-reading
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwei37 committed Aug 7, 2024
1 parent 5007868 commit fbfbc09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/18-further-reading/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ SIGCOMM 23: <https://dl.acm.org/doi/abs/10.1145/3594255.3594256>

<https://dl.acm.org/doi/10.1145/3544216.3544259>

## Kgent: Kernel Extensions Large Language Model Agent

修改和扩展操作系统的能力是提高系统安全性、可靠性和性能的重要功能。扩展的伯克利数据包过滤器(eBPF)生态系统已经成为扩展Linux内核的标准机制,并且最近已被移植到Windows。eBPF程序将新逻辑注入内核,使系统在现有逻辑之前或之后执行这些逻辑。虽然eBPF生态系统提供了一种灵活的内核扩展机制,但目前开发人员编写eBPF程序仍然困难。eBPF开发人员必须深入了解操作系统的内部结构,以确定在何处放置逻辑,并应对eBPF验证器对其eBPF程序的控制流和数据访问施加的编程限制。本文介绍了KEN,一种通过允许使用自然语言编写内核扩展来缓解编写eBPF程序难度的替代框架。KEN利用大语言模型(LLMs)的最新进展,根据用户的英文提示生成eBPF程序。为了确保LLM的输出在语义上等同于用户的提示,KEN结合了LLM增强的程序理解、符号执行和一系列反馈循环。KEN的关键创新在于这些技术的结合。特别是,该系统以一种新颖的结构使用符号执行,使其能够结合程序综合和程序理解的结果,并建立在LLMs在每个任务中单独展示的成功基础上。为了评估KEN,我们开发了一个新的自然语言提示eBPF程序的语料库。我们显示,KEN在80%的情况下生成了正确的eBPF程序,这比LLM增强的程序综合基线提高了2.67倍。

eBPF'24: <https://dl.acm.org/doi/10.1145/3672197.3673434> 和arxiv <https://arxiv.org/abs/2312.05531>

## Programmable System Call Security with eBPF

利用 eBPF 进行可编程的系统调用安全
Expand All @@ -120,9 +126,7 @@ SIGCOMM 23: <https://dl.acm.org/doi/abs/10.1145/3594255.3594256>

比较 eBPF 和 WebAssembly 中的安全性

本文研究了 eBPF 和 WebAssembly(Wasm)的安全性,这两种技术近年来得到了广泛的采用,尽管它们是为非常不同的用途和环境而设计的。当 eBPF 主要用于 Linux 等操作系统内核时,Wasm 是一个为基于堆栈的虚拟机设计的二进制指令格式,其用途超出了 web。鉴于 eBPF 的增长和不断扩大的雄心,Wasm 可能提供有启发性的见解,因为它围绕在如 web 浏览器和云等复杂和敌对环境中安全执行任意不受信任的程序进行设计。我们分析了两种技术的安全目标

、社区发展、内存模型和执行模型,并进行了比较安全性评估,探讨了内存安全性、控制流完整性、API 访问和旁路通道。我们的结果表明,eBPF 有一个首先关注性能、其次关注安全的历史,而 Wasm 更强调安全,尽管要支付一些运行时开销。考虑 eBPF 的基于语言的限制和一个用于 API 访问的安全模型是未来工作的有益方向。
本文研究了 eBPF 和 WebAssembly(Wasm)的安全性,这两种技术近年来得到了广泛的采用,尽管它们是为非常不同的用途和环境而设计的。当 eBPF 主要用于 Linux 等操作系统内核时,Wasm 是一个为基于堆栈的虚拟机设计的二进制指令格式,其用途超出了 web。鉴于 eBPF 的增长和不断扩大的雄心,Wasm 可能提供有启发性的见解,因为它围绕在如 web 浏览器和云等复杂和敌对环境中安全执行任意不受信任的程序进行设计。我们分析了两种技术的安全目标、社区发展、内存模型和执行模型,并进行了比较安全性评估,探讨了内存安全性、控制流完整性、API 访问和旁路通道。我们的结果表明,eBPF 有一个首先关注性能、其次关注安全的历史,而 Wasm 更强调安全,尽管要支付一些运行时开销。考虑 eBPF 的基于语言的限制和一个用于 API 访问的安全模型是未来工作的有益方向。

<https://dl.acm.org/doi/abs/10.1145/3609021.3609306>

Expand Down
6 changes: 6 additions & 0 deletions src/18-further-reading/README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ Our preliminary experimental results show that SPRIGHT achieves an order of magn

<https://dl.acm.org/doi/10.1145/3544216.3544259>

## KEN: Kernel Extensions using Natural Language

The ability to modify and extend an operating system is an important feature for improving a system's security, reliability, and performance. The extended Berkeley Packet Filters (eBPF) ecosystem has emerged as the standard mechanism for extending the Linux kernel and has recently been ported to Windows. eBPF programs inject new logic into the kernel that the system will execute before or after existing logic. While the eBPF ecosystem provides a flexible mechanism for kernel extension, it is difficult for developers to write eBPF programs today. An eBPF developer must have deep knowledge of the internals of the operating system to determine where to place logic and cope with programming limitations on the control flow and data accesses of their eBPF program enforced by the eBPF verifier. This paper presents KEN, an alternative framework that alleviates the difficulty of writing an eBPF program by allowing Kernel Extensions to be written in Natural language. KEN uses recent advances in large language models (LLMs) to synthesize an eBPF program given a user's English language prompt. To ensure that LLM's output is semantically equivalent to the user's prompt, KEN employs a combination of LLM-empowered program comprehension, symbolic execution, and a series of feedback loops. KEN's key novelty is the combination of these techniques. In particular, the system uses symbolic execution in a novel structure that allows it to combine the results of program synthesis and program comprehension and build on the recent success that LLMs have shown for each of these tasks individually. To evaluate KEN, we developed a new corpus of natural language prompts for eBPF programs. We show that KEN produces correct eBPF programs on 80% which is an improvement of a factor of 2.67 compared to an LLM-empowered program synthesis baseline.

eBPF'24: <https://dl.acm.org/doi/10.1145/3672197.3673434> and arxiv <https://arxiv.org/abs/2312.05531>

## Programmable System Call Security with eBPF

System call filtering is a widely used security mechanism for protecting a shared OS kernel against untrusted user applications. However, existing system call filtering techniques either are too expensive due to the context switch overhead imposed by userspace agents, or lack sufficient programmability to express advanced policies. Seccomp, Linux's system call filtering module, is widely used by modern container technologies, mobile apps, and system management services. Despite the adoption of the classic BPF language (cBPF), security policies in Seccomp are mostly limited to static allow lists, primarily because cBPF does not support stateful policies. Consequently, many essential security features cannot be expressed precisely and/or require kernel modifications.
Expand Down

0 comments on commit fbfbc09

Please sign in to comment.