dckc / madmode-blog

my tinkering notebook (blog)
https://www.madmode.com
0 stars 2 forks source link

WASM / WASI on genode? seL4? #66

Open dckc opened 5 years ago

dckc commented 5 years ago
**** BEGIN LOGGING AT Tue Jul 30 06:17:17 2019

Jul 30 06:17:17 *   Now talking on #genode
Jul 30 06:17:17 *   Topic for #genode is: https://genode.org/ · https://github.com/genodelabs/genode · https://genodians.org · cnuke's HCL http://usr.sysret.de/jws/genode/hcl.html · This channel is logged (https://freenode.logbot.info/genode) · Developers are on european time
Jul 30 06:17:17 *   Topic for #genode set by ehmry!~emery@ip15.162-254-117.static.hostduplexdns.net (Fri Mar 29 04:24:00 2019)
Jul 30 06:17:17 *   Channel #genode url: https://genode.org/
Jul 30 08:41:03 <dconnolly> other than https://github.com/genodelabs/genode/blob/master/repos/ports/src/noux/syscall.cc , is there any noux syscall documentation?
Jul 30 08:42:34 <cnuke> dconnolly: no but looking into 'include/noux_session/sysio.h' might be the way to go if you just want to see what's there
Jul 30 08:43:39 <dconnolly> is mem_map available? I don't see it.
Jul 30 08:44:38 <cnuke> mem_map as in mmap?
Jul 30 08:44:42 <dconnolly> yes
Jul 30 08:45:55 *   dconnolly has a vague memory of the noux syscalls on a slide
Jul 30 08:46:08 <dconnolly> sort of a "look: we only need 20 of them vs. 100s for linux"
Jul 30 08:46:23 <cnuke> right, that's implemented in the 'libc_noux' libc plugins (also in the ports repo)
Jul 30 08:47:06 <cnuke> but it is merely a minimal implementaton - that only supports mmapping by copying the data
Jul 30 08:47:29 <dconnolly> ah... https://github.com/genodelabs/genode/blob/master/repos/ports/src/lib/libc_noux/plugin.cc#L1025
Jul 30 08:47:53 <cnuke> so far there is no proper mmap implementation on Genode and it stands to reason if there every will be one
Jul 30 08:48:19 <dconnolly> I'm wondering about feasibility of cloudabi on genode.
Jul 30 08:49:13 <dconnolly> https://github.com/NuxiNL/cloudabi#mem_map
Jul 30 08:51:22 <dconnolly> I'm also curious about any work on WASM on genode
Jul 30 08:52:55 <cnuke> well, cloudabi looks like a subset of your normal system-calls, so that makes it certainly smaller in scope
Jul 30 08:53:22 <cnuke> apart from that it still has fork, mmap and signaling which are the difficult ones to support
Jul 30 08:53:33 <dconnolly> cloudabi is designed to follow capability security
Jul 30 08:54:10 <dconnolly> noux fork looked reasonably straightforward; was I reading that wrong?
Jul 30 08:54:36 *   dconnolly thought cloudabi fork was more like execve ...
Jul 30 08:55:34 <dconnolly> there it is... slide 11 of https://www.slideshare.net/sartakov/genode-compositions
Jul 30 08:56:26 <cnuke> well, it looks simple but actually it is not
Jul 30 08:56:41 <dconnolly> care to elaborate?
Jul 30 08:58:55 <ehmry> dconnolly: I've looked into cloudabi and the immediate problem is that the cloudabi thread local storage is incompatible with some of the genode kernels
Jul 30 09:00:44 <ehmry> so even a simple "hello world" won't work because of stuff like errno
Jul 30 09:01:50 <dconnolly> sigh. global mutable state strikes again
Jul 30 09:02:19 <ehmry> yep
Jul 30 09:03:00 <dconnolly> I got my feet wet with nim the other day... not directly related to genode but motivated by it.
Jul 30 09:03:10 <cnuke> dconnolly: to be honest I am not the best person to talk to about this topic (not my area of expertise) but the short version is that the fork model itself does not match that well to Genode
Jul 30 09:04:09 <dconnolly> 2 things I'd like to get my head around (unfortunately now isn't a great time): (1) building nim apps for genode, and (2) running a debian vm in genode
Jul 30 09:04:54 <dconnolly> both are covered genodians articles, but just a bit too briefly given my lack of mental model
Jul 30 09:05:48 <dconnolly> I'm not usually a fan of videos, but I think I'd like them in this case (screencasts)
Jul 30 09:06:11 <cnuke> dconnolly: if you use Sculpt on a real machine, following those articles should get you up and running without much effort :)
Jul 30 09:06:23 <dconnolly> if somebody could hold my hand for 20 minutes some time, maybe I could contribute a screencast
Jul 30 09:06:47 <dconnolly> yeah, well, until I grok how to do a debian vm inside Sculpt, I can't really use it.
Jul 30 09:07:17 <dconnolly> using sculpt inside a vm worked really well a couple days ago. (a few months ago I think it was really slow)
Jul 30 09:09:40 *   dconnolly wonders what's up with seL4 and genode these days...
Jul 30 09:12:06 <dconnolly> does most of the seL4 work happen in genodelabs/genode ? or is there another repo?
Jul 30 09:22:12 <cnuke> yes, just the public repo - there's not much work with seL4 going on right now

oddly missing from https://freenode.logbot.info/genode/20190630

15:41ehmry
dckc: idk, I thought I heard that WASM uses cloudabi syscalls?
15:42dckc
well, yes, there's a layer atop WASM called WASI. I think it shares a lot with cloudabi

https://freenode.logbot.info/genode/20190928#c2703154

chelmuth commented 1 year ago

https://github.com/trimpim/wasmedge-genode