On Thu, Feb 21, 2019 at 2:14 PM Kees Cook <keesc...@chromium.org> wrote: > > On Thu, Feb 21, 2019 at 12:36 PM Alexei Starovoitov > <alexei.starovoi...@gmail.com> wrote: > > I also would like to touch on your comment: > > "A lot of changes will be needed for seccomp ebpf" > > There were two attempts to add it in the past and the patches were > > small and straightforward. > > Yeah, agreed: doing it is technically easy. My concerns have mainly > revolved around avoiding increased complexity and attack surface. > There have been, for example, a lot of verifier bugs that were not > reachable through seccomp's BPF usage, given it enforcing only using a > subset of cBPF. i.e. seccomp filters couldn't be used as Spectre > gadgets, etc. > > > If I recall correctly both times you nacked them because performance gains > > and ease of use arguments were not convincing enough, right? > > Right. There wasn't, in my opinion enough of a performance benefit vs > just having efficient BPF to start with. > > > Are you still not convinced ? > > For now, yeah. I'm sure there will be some future time when a use-case > appears where gaining some special eBPF hook/feature will outweigh the > increased attack surface. I haven't seen it yet, but I'm not crazy > enough to think it'll never happen. (In fact, recently I even had > Tycho see if he could implement the recent seccomp user notification > stuff via eBPF.) >
I consider the potential for much improved performance to be a maybe-good-enough argument. The down side is that there are programs that load cBPF seccomp filters from inside a sandbox, and being able to load eBPF from inside a sandbox is potentially undesirable.