TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

EBPF is turning the Linux kernel into a microkernel

194 pointsby yoquanabout 5 years ago

22 comments

fefe23about 5 years ago
I don&#x27;t think that word means what you think it means.<p>Microkernel = move all the code OUT OF the kernel.<p>These slides are about moving all the code INTO the kernel.<p>Putting your application logic into the kernel would be more like a unikernel I guess?
评论 #22956004 未加载
评论 #22955357 未加载
评论 #22955938 未加载
评论 #22955837 未加载
评论 #22968263 未加载
评论 #22955316 未加载
MaxBarracloughabout 5 years ago
I&#x27;m not seeing how this helps solve the API stability problem faced by ordinary kernel modules. There must be some difference between this project, and a project that simply creates a more stable wrapper&#x2F;subset of the APIs available to kernel modules, but it&#x27;s not clear to me what it is.<p>Also, why use JIT rather than offline verification and ahead-of-time compilation?<p>Aside: the idea that the web delivers on the requirement of <i>Programmability must be provided with minimal overhead</i> is pretty laughable. Think Microsoft Teams (a chat application) would consume 600MB of memory if it were built with C++ rather than Electron? I realise not every JIT-powered technology needs to be as bloated as the web, but it seems a poor example.
评论 #22956857 未加载
评论 #22955916 未加载
dathinababout 5 years ago
While the sites are interesting and Linux gets some functionalities known mostly from micro kennels it&#x27;s not really turning Linux into a micro kennel at all.<p>It just provided a new _additional_ extension mechanism which is sandboxed and much nicer to use.<p>But to make the Linux kennel into a micro kennel eBPF would need to have the capability to replace _all_ existing kernel modules. Including file system drivers, and graphic drivers. Which is not something it&#x27;s cable of sand at least currently it&#x27;s only meant for new kennel functionality in to of the &quot;core&quot; which we have.<p>This maybe could change at some point in the (not very close by) future. But for now it doesn&#x27;t yet turn Linux into a micro kennel.
评论 #22956021 未加载
justinsaccountabout 5 years ago
The link should be changed to<p><a href="https:&#x2F;&#x2F;docs.google.com&#x2F;presentation&#x2F;d&#x2F;1AcB4x7JCWET0ysDr0gsX-EIdQSTyBtmi6OAW7bE0jm0&#x2F;preview" rel="nofollow">https:&#x2F;&#x2F;docs.google.com&#x2F;presentation&#x2F;d&#x2F;1AcB4x7JCWET0ysDr0gsX...</a><p>currently it links to the 2nd to last slide and not the beginning.
jdubabout 5 years ago
eBPF is turning Linux into a microkernel like drinking Gatorade is turning me into a Super Bowl quarterback.<p>(I tried to localise this for a predominantly US audience.)
评论 #22954738 未加载
评论 #22954718 未加载
评论 #22963509 未加载
评论 #22954745 未加载
aeyabout 5 years ago
EBPF is ridiculously awesome. It’s safe enough to jit in ring-0!<p>We built a rust tool chain that can output ebpf elfs :). <a href="https:&#x2F;&#x2F;github.com&#x2F;solana-labs&#x2F;rust-bpf-builder" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;solana-labs&#x2F;rust-bpf-builder</a>
ThePhysicistabout 5 years ago
EBPF is a super interesting technology but it’s so painfully hard to use it for application development. There are some tools based on LLVM to compile EBPF programs using C as a source language (which is much easier to reason in than the low-level code), but there is a lot of room for improving the developer workflow.
评论 #22955352 未加载
brendangreggabout 5 years ago
I don&#x27;t see anyone sharing it, but the video for this talk is here: <a href="https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;facebook-google-bpf-linux-kernel&#x2F;?utm_source=twitter&amp;utm_medium=link&amp;utm_campaign=helpcampaign" rel="nofollow">https:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;facebook-google-bpf-linu...</a>
stefan_about 5 years ago
eBPF are vendor kernel modules on steroids: now instead of getting compile failures trying to build your out-of-tree module, your stuff just blows up at runtime.
评论 #22954757 未加载
评论 #22954729 未加载
评论 #22960809 未加载
评论 #22955153 未加载
jfkebwjsbxabout 5 years ago
Everything would be a microkernel if adding some kind of VM or interpreter is enough to get that name, no?<p>With that logic, could we argue loadable kernel modules (perhaps with proper memory separation) are a sign of a microkernel architecture?
评论 #22954630 未加载
评论 #22954598 未加载
monocasaabout 5 years ago
It&#x27;s turning it into an exokernel.<p>Check out xok, it had three in kernel virtual machines.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;monocasa&#x2F;exopc&#x2F;tree&#x2F;master&#x2F;sys" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;monocasa&#x2F;exopc&#x2F;tree&#x2F;master&#x2F;sys</a>
rjswabout 5 years ago
Sun did some experiments with building a JVM into their kernel so that you could write device drivers in Java.
snvzzabout 5 years ago
Running even more code in supervisor mode != turning into a microkernel.
RMPRabout 5 years ago
I was thinking as EBPF as a way to enter in the Linux kernel development with a modern language, but I&#x27;m kinda confused by I read in the comments, it&#x27;s not quite a thing?
评论 #22955387 未加载
peter_d_shermanabout 5 years ago
&quot;A thorough introduction to eBPF&quot;<p><a href="https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;740157&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lwn.net&#x2F;Articles&#x2F;740157&#x2F;</a><p>Excerpts:<p>&quot;While eBPF was originally used for network packet filtering, it turns out that running user-space code inside a sanity-checking virtual machine is a powerful tool for kernel developers and production engineers.&quot;<p>[...]<p>&quot;The eBPF virtual machine more closely resembles contemporary processors, allowing eBPF instructions to be mapped more closely to the hardware ISA for improved performance.&quot;<p>[...]<p>&quot;Originally, eBPF was only used internally by the kernel and cBPF programs were translated seamlessly under the hood. But with commit daedfb22451d in 2014, the eBPF virtual machine was exposed directly to user space.&quot;<p>[...]<p>&quot;What can you do with eBPF?<p>An eBPF program is &quot;attached&quot; to a designated code path in the kernel. When the code path is traversed, any attached eBPF programs are executed. Given its origin, eBPF is especially suited to writing network programs and it&#x27;s possible to write programs that attach to a network socket to filter traffic, to classify traffic, and to run network classifier actions. It&#x27;s even possible to modify the settings of an established network socket with an eBPF program. The XDP project, in particular, uses eBPF to do high-performance packet processing by running eBPF programs at the lowest level of the network stack, immediately after a packet is received.<p>Another type of filtering performed by the kernel is restricting which system calls a process can use. This is done with seccomp BPF.<p>eBPF is also useful for debugging the kernel and carrying out performance analysis; programs can be attached to tracepoints, kprobes, and perf events. Because eBPF programs can access kernel data structures, developers can write and test new debugging code without having to recompile the kernel. The implications are obvious for busy engineers debugging issues on live, running systems. It&#x27;s even possible to use eBPF to debug user-space programs by using Userland Statically Defined Tracepoints.&quot;<p>There, now you understand eBPF.<p>It is not a Microkernel.<p>It is an in-kernel Virtual Machine, with access to all of the kernel, whose programs can register for, receive, filter, and optionally act upon or act to moderate, kernel events.<p>Quite the powerful tool indeed -- but not a Microkernel...
smitty1eabout 5 years ago
Tanenbaum lives!
评论 #22954740 未加载
musicaleabout 5 years ago
More like an exokernel.
评论 #22962142 未加载
perlgeekabout 5 years ago
Can device drivers be written in EBPF?
exabrialabout 5 years ago
I saw a link on HN a few months back that was going to do the same thing with WASM.
dingo_batabout 5 years ago
&gt; Rebooting 20,000 servers takes a very long time without risking extensive downtime.<p>With eBPF, hot-patching servers will take a very short time to start the extensive downtime, plus the consequent reboot of 20,000 servers.
gazspabout 5 years ago
It&#x27;s not.
layoutIfNeededabout 5 years ago
As always, worse is better™!