-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom filesystem #304
Comments
You should look into https://github.com/google/gvisor for virtual filesystem. I think it would be really useful to rebuild a lot of the posix/linux/darwin backend around gvisor + generated code, as they're way further along on linux kernel support than usercorn. #104 is the previous VFS issue Basically VFS requires virtual file descriptors: all file descriptor syscalls need to look the FD up in a map instead of using host FDs. We can cheat and use the syscall argument deserializer with the The map should be You can come hang out in the slack if you want to ask questions directly: https://lunixbochs.herokuapp.com/ |
I can see how running usercorn under gvisor would make it less complicated. Are you thinking about something like this:
or something like that: We look into how gvisor executes the syscalls and just use that interface? What about cross plattform? We might loose windows and osx support... |
What I propose is that we create an interface System: type System interface {
func getgroups(ngid int, gid *_Gid_t) (n int, err error)
func setgroups(ngid int, gid *_Gid_t) (err error)
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
// ....
} And we put that as field of the |
There's no point in running usercorn under gvisor. Both usercorn and gvisor implement a virtual kernel in Go. You can just port parts of the gvisor kernel directly into usercorn. The interface System you propose is exactly like the kernel objects we already have. |
Hi,
I would like to provide a "custom" filesystem to the binary I am executing. I am thinking about something like this:
Create an empty filesystem and then add some files into it, like
One thing I could image is to hook into the syscalls and rewrite the paths there, or do you have a better way? I am willing to implement this on my own, but want some feedback on where to put this.
Btw, how unstable is the branch "unstable"?
The text was updated successfully, but these errors were encountered: