Ruddle / Fomos

Experimental OS, built with rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maybe using WASM would address the security issues

wtholliday opened this issue · comments

Cool project!

I was thinking that perhaps using wasm for the executables would address the security disadvantages. Processes couldn't snoop on whatever memory they wanted.

You could start with a wasm interpreter to get something running quickly, and then use a JIT later. Also an interpreter could stop after executing some number of instructions, so a process can't hang the OS (and a JIT could instrument loops to occasionally check for excessive runtime).

Just some thoughts. I also found this project https://github.com/kwast-os/kwast. Good luck!

Thanks,

Using an interpreter is great solution for security. In fact I started to build a small one in app_console for a proof of concept.
It is kind of an easy way out. But it has its disadvantages:

  • Performance is lower, although I believe it could be the same order of magnitude, and a very small price to pay for security.
  • It is one more level of indirection between the app developer and the hardware. Currently in Fomos there is only 1 indirection, the context. It may or may not be enough.

The Wasm format seems like great choice once you accept to ship an interpreter in an OS.

Let's try both approach !