Let's Embed a Go Program into the Linux Kernel (2023)

sigma-star.at

132 points by st_goliath 14 days ago


st_goliath - 14 days ago

I'm a bit surprised the bulk of the comments here seem to fixate onto Go specifically, seemingly missing the actual point of the article:

The article demonstrates the Usermode Driver API, showing how a Linux driver can offload work into userspace (with or without access to a working filesystem).

I mentioned this yesterday in the context of the in-kernel codec discussion[1], where the questions "can't this be done in userspace" or "why not sandboxing" were dismissed pretty quickly.

[1] https://news.ycombinator.com/item?id=40174516#40184307

panzi - 14 days ago

You can also use objcopy to generate a object file from a resource file.

dwattttt - 14 days ago

I was really hoping it would be executing Go in kernel.

remram - 13 days ago

How does this relate to the initrd? As I understand it, its purpose is also to load programs and modules before the filesystem becomes available, by embedding them in an image loaded with the kernel...

nikolayasdf123 - 14 days ago

reminds me of go unikernel: https://github.com/icexin/eggos

_pdp_ - 14 days ago

As soon as I read the article I thought a security person must write this and what do you know? It is!

az09mugen - 12 days ago

Please don't put Go with telemetry inside linux kernel.

drycabinet - 14 days ago

Might sound surprising until you remember there used to be Lisp Machines.

cookiengineer - 14 days ago

[dead]

ranger_danger - 14 days ago

[flagged]

neonsunset - 14 days ago

[flagged]

slowhadoken - 14 days ago

Is it a good idea to embed a proprietary language into a open source os?