News for hackers. Stuff that matters.
Re:The Beginner's Guide to eBPF by awesomegoat_com on Monday May 08, 2023 @03:47AM (#35859103)
Haven't sandboxed programs in a privileged context been the root cause of me seeing BSOD so often in the late 90ties?
Re:The Beginner's Guide to eBPF by Glemotooo on Monday May 08, 2023 @05:56AM (#35859858)
I'm only aware of drivers, which were not sandboxed due to the nature of drivers (at least in late 90ties there was pobably not much of abstraction on that level, kernel features, hardware features available?)
Re:The Beginner's Guide to eBPF by kqr on Monday May 08, 2023 @08:36AM (#35860876)
There was -- Minix was developed in the 90s and ran drivers in user space. But it was (perceived to be?) slow, so mainstream OSes did not do it.
Re:The Beginner's Guide to eBPF by vilaca on Monday May 08, 2023 @06:21AM (#35859990)
AFAIK the cause of BSOD were, among others, the lack of sandboxing.
Re:The Beginner's Guide to eBPF by tptacek on Monday May 08, 2023 @01:11PM (#35864189)
This is a different kind of sandbox. BPF functions by drastically limiting the shape of the control flow graph that will be accepted for a program; most working C functions will not be accepted in a BPF program. The simplest example (complexified by more recent BPF verifier work that relaxes this... somewhat) is that BPF programs can't have loops, at least in the sense that a normal program can.

You can crash a kernel with a BPF program. But it's overwhelmingly likely that the crash will arise from buggy pre-existing kernel code that just hadn't been seriously exercised before eBPF gave people new tools to push that code with. What's much, much less likely to happen is a segfault or NPE in your own BPF code.