Notes on BPF and eBPF
21–30 of 46 posts
Re: Notes on BPF and eBPF
#22BPF is indeed a pretty interesting technology. As the knowledge about it becomes more widespread, I anticipate that we will unlock some new capabilities both in terms of tracing. Brendan Gregg's book ( https://www.brendangregg.com/bpf-performance-tools-book.html ) serves as a good intro to this, although you probably only need to read a small chunk of it as a lot of it is reference-book-style material. The author's m…
>With the proper BPF tracing scripts, I think we can validate that programs indeed avoids page faults Sorry, I'm a little confused why this would be necessary? Like, sure, it's a nice to have on a CI as a basic sanity check but if you just invoke mlockall you'll end up with everything wired down and you're good to go regardless?
While on that thought experiment, perhaps in general if you can use BPF/USDT to help trace/debug RT programs? I'm thinking of being able to verify/visualize timing for better tracing? Or maybe there are already tools that existing that I don't really know how to use (like ftrace + trace compass, maybe)
Re: Notes on BPF and eBPF
#23Earlier quoted context omitted.
Easier to get started maybe, but there's something to be said for the 'ease' of having to worry a lot less about crashing the kernel you're working on.
I've crashed multiple kernels with eBPF programs. I don't buy this argument at all.
Re: Notes on BPF and eBPF
#24Earlier quoted context omitted.
Easier to get started maybe, but there's something to be said for the 'ease' of having to worry a lot less about crashing the kernel you're working on.
I've crashed multiple kernels with eBPF programs. I don't buy this argument at all.
Re: Notes on BPF and eBPF
#25>eBPF programs can’t access arbitrary kernel memory. Instead the kernel provides functions to get at some restricted subset of things. I must finally becoming a security pessimist when I read those sentences and the first thing I think is: these statements will not age well.
Yes, "can't" should be replace by "shouldn't". If there's a physical possibility, it's just a matter of time before someone finds a way, as was proved by the CPU cache bugs leaking information.
Perhaps "is designed not to" but that's a mouthful.
I think we should accept "can't" and yet know the limitations of certainty.
Re: Notes on BPF and eBPF
#26Re: Notes on BPF and eBPF
#27>eBPF programs can’t access arbitrary kernel memory. Instead the kernel provides functions to get at some restricted subset of things. I must finally becoming a security pessimist when I read those sentences and the first thing I think is: these statements will not age well.
Re: Notes on BPF and eBPF
#28Earlier quoted context omitted.
Easier to get started maybe, but there's something to be said for the 'ease' of having to worry a lot less about crashing the kernel you're working on.
I've crashed multiple kernels with eBPF programs. I don't buy this argument at all.
Re: Notes on BPF and eBPF
#29Earlier quoted context omitted.
I've crashed multiple kernels with eBPF programs. I don't buy this argument at all.
I call bullshit! Ebpf programs cannot crash the kernel since they cannot be run if they contain bugs in the first place.
Re: Notes on BPF and eBPF
#30Earlier quoted context omitted.
The BPF capability should really only be given to root. I don't think it really gives any new attack surface. All I could see is it giving black-hats an easier interface to "kernel-level-fuckery".
It’s not an easier interface. It’s much easier to write kernel modules than to mess around with eBPF.