Welcome to the Linux Foundation Forum!

[Idea] eBPF/Webassembly group programs by processor tasks

I have read the most important problem to solve, when introducing WebAssembly/BPF services into kernel is these programs should be position-dependent. But how achieve this without virtual memory? I do not known, because I am not too good with OS developing (of course, we can use the same way so used or use registers), so I have an idea. Group scripts/programs generated from eBPF or webassembly by task need to communicate with these programs.

For example: we have cat and cat programs connected with pipe. But one loads some program to this pipe, which force to only delivers data to other side, when \n meet in pipe. Why do not compile this program in cat/cat group and load it into memory only if one of this task is loaded?

Another example: we had Firefox and Apache translated to WebAssembly. Each Firefox instance could belongs to the same group as Apache, so we load Apache code only if Firefox need to communicate with it (or Firefox is inside the memory).

I known, that saving eBPF/Webassembly programs to disk could be long, but we can simple move these programs in memory or even compress it and move.

What do you think?

Comments

  • And of course, if Firefox uses Apache module and some other - we compile Apache and other module into Firefox/Apache/Other group, so each module will be in unique address space. No collision, no problem with PE, etc.

Categories

Upcoming Training