如何在 ebpf 中使用 seccomp 过滤器?

How to use seccomp filter with ebpf?

我正在寻找用于编写 seccomp 过滤器的 eBPF 示例,但找不到 none。有人能告诉我是否可以使用 eBPF 来编写 seccomp 过滤器吗?

Seccomp 目前不适用于 eBPF(仅 cBPF)。

a discussion 不久前 Linux 网络邮件列表中有关于该主题的内容。 eBPF 维护者反对向 seccomp 添加 eBPF 支持。

Kernel Runtime Security Instrumentation (KRSI) was designed for this. It's already been merged into the kernel.