lkl / linux

Linux kernel source tree

Home Page:https://lkl.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for multiple processes

LHLaurini opened this issue · comments

/* TODO(pscollins): We don't support fork() for now, but maybe one day
* we will? */

#define sys_clone sys_ni_syscall
#define sys_vfork sys_ni_syscall

Right now, the fork, vfork and clone syscalls are not implemented. Is it possible to add support for multiple processes?

Answering my own question, I believe that could be possible. We'd need to actually fork the process, which means we'd lose direct access to lkl. So we'd have to use some form of IPC, possibly shared memory and semaphores.

Any use-case you have in mind? Fully implementing fork/clone would require MMU support, which we don't currently have.

Many programs use fork, like sh, make, some compilers, etc... So not supporting it could limit possible applications.

More specifically, I had intended to use lkl for compiling stuff that needs chroot and mount (like Linux from Scratch) without requiring root or even being able to compile it on Windows.

This is not a use-case that we plan to suport with LKL. UML or VMs are better suited for these kind of uses-cases.

Indeed, UML fits my use case better.