HN user

mdaverde

176 karma

https://mdaverde.com

Posts26
Comments28
View on HN
news.ycombinator.com 2y ago

Ask HN: Is Hacker News becoming more medical/health related?

mdaverde
3pts4
keithjgrant.com 3y ago

Scoped CSS Is Back

mdaverde
2pts0
www.youtube.com 3y ago

Conway's Law and Division of Labor

mdaverde
1pts0
twitter.com 3y ago

ChatGPT, Write an eBPF Program

mdaverde
3pts0
blogs.oracle.com 3y ago

Taming Tracepoints in the Linux Kernel

mdaverde
1pts0
www.youtube.com 3y ago

eBPF Kernel Scheduling with Ghost [video]

mdaverde
2pts0
mdaverde.com 3y ago

Introduction to eBPF's Cap_bpf

mdaverde
3pts0
mdaverde.com 3y ago

Overview of eBPF procfs kernel parameters

mdaverde
1pts0
lwn.net 3y ago

BPF as a safer kernel programming environment

mdaverde
4pts0
cloudblogs.microsoft.com 3y ago

Towards debuggability and secure deployments of eBPF programs on Windows

mdaverde
1pts0
www.youtube.com 3y ago

Red Hat Next 2022: Enabling Next Generation Networking with eBPF

mdaverde
2pts0
www.youtube.com 3y ago

Aya: Extending the Linux Kernel with eBPF and Rust

mdaverde
1pts0
www.youtube.com 3y ago

The Untold Story of BPF

mdaverde
1pts0
mdaverde.com 4y ago

Build your Golang package docs locally

mdaverde
2pts0
www.mdaverde.com 4y ago

Flavors of enums with Rust bindgen

mdaverde
26pts5
www.mdaverde.com 4y ago

Capable-bpfcc: see Linux capabilities being requested on your system

mdaverde
1pts0
www.mdaverde.com 4y ago

Overview of eBPF procfs kernel parameters

mdaverde
1pts0
layalina.io 4y ago

Intro to BPF CO-RE

mdaverde
13pts0
www.mdaverde.com 4y ago

Hot reloading your Rust cargo docs

mdaverde
1pts0
perfectweek.co 9y ago

Perfect Week: Visualize your routine

mdaverde
2pts0
trickycssquiz.com 11y ago

Tricky CSS Quiz

mdaverde
2pts0
milanlandaverde.com 12y ago

Conceptual Introduction to Web Development

mdaverde
49pts19
arraypop.wordpress.com 12y ago

How I Am Learning Ruby

mdaverde
2pts0
milanlandaverde.com 13y ago

Tricky CSS Selectors Quiz

mdaverde
33pts17
oreillynet.com 13y ago

Think Like a Programmer

mdaverde
2pts0
hub.jazz.net 13y ago

IBM's JazzHub

mdaverde
1pts2
(next Rich) 3 years ago

This was exactly my take. This language just got a whole lot of significant focus behind it

Literally, yes.

As example, the north bridge isn't as explicit today as the document makes it seem. A lot of functionality that used to be reserved for the north bridge is now being tucked away into the CPUs or motherboards themselves.

Still, worth reading.

Question: how do you reliably deploy? And if it's just scp-ing tarballs, how do you handle dependencies? Do you run & upgrade any third-party processes that rely on having their filesystem or deps?

Struggling with this because even in a small app in a Linode box, I don't mind just cp-ing my bins but there's always other things/versions they need. Thinking of bringing in Ansible to help me out here.

Deploying feels easier in the container, Kubernetes world

This is changing! (or technically, has changed!)

eBPF recently added the ability to look through internal data structures through iterators [0] so instead of parsing text we can run a program that traverses through all the task_structs and pushes the exact information we want to userspace in the form the developer wants.

So, alongside other tradeoffs, it's more flexible than syscalls.

[0] https://developers.facebook.com/blog/post/2022/03/31/bpf-ite...

eBPF has changed several of these constraints [0]

- Verifier can explore up to 1million insns now instead of 4096

- 512 bytes of stack but with tail chaining you have up to 8k

- Bounded loops have been added. Unbounded loops are prevented by design to not stall the kernel

[0] https://docs.cilium.io/en/v1.12/bpf/

In the same way out-of-tree kernel modules are enforced to license themselves as GPL if they intend to use a lot (if not most) of the available functionality, eBPF programs fall under the same restrictions.

bpftool[0] allows you to see which programs are currently running in your system, their bpf asm instructions and whether they are GPL-compliant through `bpftool prog show`.

Of course, we still need companies to actually release the source code of their eBPF programs somewhere for the promise to be fulfilled.

[0] https://github.com/libbpf/bpftool

It would be nice to see a comparison of FreeBSD's capsicum vs OpenBSD's pledge vs Linux's landlock features. It seems to me that the general vision of these projects have overlap but the implementations wildly differ.

Another question I have is that we haven't seen popular adoption of "capability-aware" Linux programs prior to the above efforts. While obviously it would be beneficial for users for developers to adopt these patterns, I'm skeptical these will start to take hold now? Possibly the adoption method will be runtimes that do this under the hood before fork/execve the application?

In the near term with a recent-enough BTF-enabled kernel, bpftool should be enough for an "ambitious" user to understand what objects are being run on a system.

Unfortunately, "ambitious" here meaning enough to actually understand more than just what eBPF is but also the significance of each hook, what effect the bpf program has (most eBPF programs are GPL-licensed), and which processes have access to these objects.

This is not easy, especially considering that the shape of eBPF changes with each kernel release.

You can see the interpreter instructions through bpftool:

  bpftool prog dump xlated id 173
To see the JITed instructions:
  bpftool prog dump jited id 173
For the interpreted insns, you can also see the instructions in different forms, which is pretty neat. For example you can get a control flow graph in DOT format with `visual` specified at the end:
  bpftool prog dump xlated id 173 visual
I learned about these commands through this blog post: https://qmonnet.github.io/whirl-offload/2021/09/23/bpftool-f...

While I do agree generally that we're still experimenting with the guardrails around eBPF, it seems like the more fundamental problem of the "ease of privilege escalation" is what we should be focused on?

But I can see how eBPF itself might be considered too powerful to wait for that to be solved.

I'm honestly more worried about Linux desktop/small startups that can't afford expensive commercial guidance and are likely to not understand/care about the implications of eBPF until its too late.

DTrace-on-Windows 4 years ago

eBPF is not Linux only. Windows is investing into integrating it to their OS and some efforts have begun applying it to the BSDs. There's even a recent initiative to standardize the eBPF runtime.

eBPF can work with Dtrace's USDTs as well as dynamic u(ret)probes.

Dtrace on Linux is built on top of eBPF.

Running eBPF programs doesn't necessarily require compilation at runtime nor root privileges. Look into bpftool's skeleton generation as well as CAP_BPF.

With that being said, because eBPF programs can be compiled at runtime, it makes signing eBPF programs trickier. The kernel team doesn't want efforts such as bpftrace to be stifled.

It seems like the conversation on signing eBPF programs is still ongoing with an eye at looking at fsverity to help with the use cases here.