Let’s Embed a Go Program into the Linux Kernel
Trainings Customized Trainings About Blog DE linux | 21.07.2023 Let’s Embed a Go Program into the Linux Kernel Today, we would like to present a lesser-known feature of the Linux kernel. Instead of launching a program from a file system, regardless of whether it’s virtual or not, it is also possible to embed a user-space program directly into the kernel image itself and start it from there. Introduction At first glance, this might sound outlandish and of little use, but there are cases where the kernel needs to execute helper programs. Prominent examples include the module loader helper, /sbin/modprobe, or the Spanning Tree Protocol (STP) helper for Linux’s 802.1d Ethernet bridge subsystem, /sbin/bridge-stp. On Linux, programs are typically…