hannes changed the topic of #mirage to: MirageOS are OCaml unikernels - https://mirage.io - this channel is logged at http://irclog.whitequark.org/mirage/ - MirageOS 3.7.1 is released - happy hacking!
yomimono has quit [Ping timeout: 265 seconds]
Haudegen has quit [Ping timeout: 255 seconds]
boke has joined #mirage
anji has quit [Ping timeout: 258 seconds]
<ehmry> I wrote an Nix package for mirage, I will try to wrap it to build unikernels later today https://github.com/ehmry/mirage-nix
_whitelogger has joined #mirage
_whitelogger has joined #mirage
_whitelogger has joined #mirage
<samoht[m]> rgrinberg: I've created https://gist.github.com/samoht/6c96e2a73c45c90e3fda3a23e249a582 to show an example of a dune workflow with the mirage tool
<samoht[m]> https://gist.github.com/samoht/6c96e2a73c45c90e3fda3a23e249a582#file-dune-L7-L27 can be auto-generated by interpretating config.ml (so it needs to compile it first). In the currnet patches, `mirage configure` generates the first stanza and fork-exec to `./config.exe configure` which is not terrible.
<samoht[m]> There is also now a `mirage query` command which allows to query the dynamic parameters (just the list of libraries atm, but I'm adding the list of files for the configure and build steps today)
<samoht[m]> (it also fork-exec to `./config.exe query <...>` so it needs to compile config.ml)
engil1 is now known as engil
engil has quit [Changing host]
engil has joined #mirage
jnavila has joined #mirage
talex5 has joined #mirage
hannes_qubes has joined #mirage
<hannes_qubes> so pv with minios-master and a hello-world unikernel (in debug mode): https://paste.x25519.net/DWT#G8bqsNZ6NJdVdj7zYu0NMNmkoNZd+OOE2SrwxrAKlSI=
<hannes_qubes> marmarek: ^^
<mato[m]> hannes_qubes: Test
<hannes_qubes> mato[m]: yes, i can see your test.
<mato[m]> hannes_qubes: Working on the jackline packaging again (have now figured out how to make it work on Ubuntu)
<mato[m]> hannes_qubes: However, due to mirage-crypto releases master does not build for me anymore. Do you have a "cheat sheet" of what I need to change in jackline to get it to work?
<hannes_qubes> ...and somehow the entire get_console/xenstore_start_page C code in mirage-xen is never executed, but it fails before
<hannes_qubes> mato[m]: no cheat sheet, I intended to work on this later today (porting applications / figuring out what to do). reynir intended to work on some cheat sheet yesterday (not sure whether he did)
<mato[m]> hannes_qubes: in the interim, is there something i can do in the jackline opam file to force it to depend on the old crypto?
<hannes_qubes> mato[m]: i guess otr < 0.3.7 should do the trick (maybe x509 < 0.10.0 and tls < 0.11.0 is needed as well)
<mato[m]> thanks, i'll try that
<hannes_qubes> base is 0x65676172696d looks a bit suspicious (that's even ascii ;), and page fault at 0 looks like a null pointer.. but hannes doesn't know much C.
hannes_qubes has quit [Remote host closed the connection]
<mato[m]> hannes: actually, adding a "conflicts:" for "mirage-crypto" does the trick (at least in terms of "opam install --deps-only ." doing the right thing)
talex5_ has joined #mirage
talex5 has quit [Quit: Saliendo]
<marmarek> hannes: yes, this address is definitely suspicious
<marmarek> hannes: do you have quick copy&paste instruction how to build this binary from your branches?
<marmarek> the good think you have anything on the console, otherwise it would be much harder :)
<hannes> I have not tested that, if you run into compilation issues, please complain
<hannes> marmarek: and thanks to printk I figured the code in mirage-xen start_info_stubs is never executed.. I manually checked the initialisation sequence (from mini-os/kernel.c and mirage-xen/bindings/main.c -- this looks fine to me)
_whitelogger has joined #mirage
jnavila has quit [Read error: No route to host]
jnavila has joined #mirage
jnavila has quit [Ping timeout: 256 seconds]
<marmarek> hannes: [WARNING] Failed checks on minios-xen package definition from source at git+https://github.com/mirage/mini-os.git#minios-master-with-pvh:
<marmarek> error 57: Synopsis and description must not be both empty
<marmarek> is it an issue?
<talex5_> No, that's just a warning.
<talex5_> I have Hannes's branches building and running (up to the page fault) on my Qubes machine now too.
<tg> o/
<tg> greets to all in marrakech and not marrakech
<marmarek> $ opam install mirage-xen
<marmarek> [mirage-xen.3.2.0] no changes from git+https://github.com/mirage/mirage-xen.git#pvh
<marmarek> <><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
<marmarek> No solution found, exiting
<marmarek> Sorry, no solution found: there seems to be a problem with your request.
<marmarek> --debug output don't mean much to me
<tg> what's the status of the wireguard implementation?
<tg> seen this repo by janestreet
<tg> hannes ?
<tg> and also, anyone knows about this kv store if it's usable yet and if works with mirage? https://github.com/tomjridge/tjr_kv http://www.tom-ridge.com/2019-08-21_ml_workshop_kv_store_for_ocaml.html
<talex5_> I'm a bit surprised it picked 3.2.0 as the default version. Maybe you need to `opam update` first?
<marmarek> maybe ocaml version? `opam switch list-available` doesn't list 4.08 for me
<talex5_> Yeah, sounds like you need to "opam update".
Haudegen has joined #mirage
jnavila has joined #mirage
<marmarek> better
talex5_ has quit [Ping timeout: 255 seconds]
<marmarek> got the page fault
<tg> and is anyone working on a QUIC impl in ocaml?
<tg> mato: any idea about unikernels in rust?
<tg> mato: have you looked into running that on solo5?
<hannes> marmarek / talex5: my current suspicion is that nobody calls the get_xenbus () -- when the mirage-bootvar-xen still contained the xenstore lookup, it sometimes just halted without a page fault... but yeah, happy if any of you take it from here :) it is indeed very convenient to have printk around... it may as well be that some mirageos-minios patches are missing (but I went throug that list multiple times
<hannes> (and didn't pick the arm related patches))
<hannes> tg: i do not know. you could investigate by trying it out and reporting back whether it works.
<marmarek> hannes: the PF seems to be on caml_start_program() _returning_
<marmarek> so the actual error is somewhere earlier
<tg> ok i'll check, thought you might know more since you committed something in there.. otherwise the repo looks not really active
<tg> mato: so far found libhermit-rs with uhyve but dont really know details.. https://github.com/hermitcore/libhermit-rs
olle has joined #mirage
* olle waves
<hannes> marmarek: hmmmmmm
<marmarek> caml_program is NULL
<marmarek> in caml_start_program
<marmarek> some linking failure?
<marmarek> $ objdump -t hello.xen|grep caml_program
<marmarek> 0000000000000000 g F .text0000000000000670 caml_program
<marmarek> do you have PV binary handy? can you check that objdump on it?
olle has quit [Quit: olle]
<hannes> i don't, i have lunch (and bootet my other operating system)
<hannes> but uh-oh, thanks for looking into this :)
jnavila has quit [Ping timeout: 272 seconds]
olle has joined #mirage
<marmarek> built PV one
<marmarek> $ objdump -t hello.xen|grep caml_program
<marmarek> 0000000000003000 g F .text0000000000000670 caml_program
olle has quit [Quit: olle]
mahmudov has quit [Ping timeout: 255 seconds]
olle has joined #mirage
talex5_ has joined #mirage
<marmarek> where caml_program come from?
<talex5_> I think that might be the actual OCaml program that you compile, rather than a C function.
<talex5_> `objdump -d hello.xen` shows that `caml_program` is indeed at address 0.
<marmarek> hmm, gdb says nothing is mapped at 0
<marmarek> maybe some restriction about mapping initial pages?
<marmarek> is there some linker script I can modify to place it somewhere else?
<talex5_> mini-os's `x86/minios-x86_64.lds` maybe?
<hannes> marmarek: i think the linker script is in mini-os arch/x86/minios-x86.lds.S
<marmarek> interesting, output should start with .bootcode and only then .text - so if caml_program is at 0x0, it means .bootcode is empty?
<marmarek> ".section .bootcode" is under #ifdef CONFIG_PARAVIRT
<h01ger> morroco has now imposed a departure and arrival ban for plans coming and going abroad. a bit sooner than i expected/feared 4 days ago :/
<hannes> h01ger: thanks, but tbh yes, we're reading the news as well. no, i don't see any reason to discuss this (at length) in this channel. yes, we're ok and we'll be ok.
<hannes> marmarek: i remember we had a bootcode patch in our mini-os patch series, but upstream already had some .bootcode in their linker script (those under the ifdef CONFIG_PARAVIRT) -> i thought pvh may not need them
<marmarek> hannes: interestingly, at the very beginning 0x0 is properly mapped and I see caml_program there
<marmarek> but at the time caml_start_program() is called, it is unmapped
<talex5_> Is it just zeroes there?
<h01ger> hannes: fully agreed. i'm glad this channel is mostly technical and fun to watch!
mahmudov has joined #mirage
<marmarek> no, nothing - looks like present=0 in respective page table entry
<marmarek> (trying to access page tables through gdb now)
<talex5_> I guess I'd expect something to map out page zero to detect null-pointer errors.
<marmarek> that would be my guess too
<talex5_> Hmm, mini-os doesn't compile with MM_DEBUG defined.
olle has quit [Quit: olle]
<hannes> can we just start with some other address, not 0x0 somehow in the linker script, then?
<talex5_> Hmm: /* Use first page as the CoW zero page */
<marmarek> I've moved it at 0x1000
olle has joined #mirage
<marmarek> and now got #GP
olle has quit [Client Quit]
<marmarek> ok, instead of starting everything at 0x1000, I've added 0-filled page at 0x0
<marmarek> and not it is much better
<talex5_> That looks much better to me :-)
<talex5_> What is your linker script now?
<marmarek> added patch there
<marmarek> that isn't nice method of doing it, because it adds all those zero-es literally to resulting binary
<marmarek> I've reused the fact that .bootcode is placed at the beginning
<talex5_> mini-os's gettimeofday was called and returned 1584285707 s + 662831 us, which looks sensible.
<talex5_> But: Fatal error: exception Failure("unix_gettimeofday returned number of days outside int range")
* marmarek will be away for some hours
<hannes> i think we can handle 4k 0s ;)
<hannes> good work, thanks
jnavila has joined #mirage
<mato[m]> If you figure out what the problem(s) are, I can help massage the ldscript into a "better" version, BTDT
<mato[m]> See e.g. Solo5 ldscripts which I have extensively commented (so as not to forget what I was doing and why)
adhux0x0f0x3f-- has quit [Remote host closed the connection]
<mato[m]> hannes: By the way, you may have missed my earlier comment -- adding a "conflicts: [ mirage-crypto ]" is sufficient to get jackline to build in the presence of the new crypto releases. This may be useful for other packages in the interim.
<hannes> mato[m]: cool, thanks. i also ported jackline to mirage-crypto, found an issue in otr, and re-released otr.
<hannes> ^ is merged to master now, so if you rebase you should not need any conflict anymore :)
<mato[m]> hannes: will do in a bit. just cleaning up the work in progress commits I did earlier today.
fhpedro has joined #mirage
<fhpedro> what's the meaning of "Mirage" name
<fhpedro> ?
<reynir> hannes, mato, here's what I've been writing so far regarding nocrypto -> mirage-crypto migration: https://gist.github.com/reynir/f68eee2de94fbebf0701bef7a99b9140
Haudegen has quit [Ping timeout: 268 seconds]
talex5_ has quit [Ping timeout: 265 seconds]
fhpedro has quit [Quit: fhpedro]
zkms has quit [*.net *.split]
Khady has quit [*.net *.split]
Khady has joined #mirage
Khady has quit [Changing host]
Khady has joined #mirage
zkms has joined #mirage
Haudegen has joined #mirage
Haudegen has quit [Read error: Connection reset by peer]
Haudegen has joined #mirage
Haudegen has quit [Ping timeout: 256 seconds]
Haudegen has joined #mirage
yomimono has joined #mirage
kit_ty_kate has quit [*.net *.split]
h01ger has quit [*.net *.split]
laudecay has quit [*.net *.split]
h01ger has joined #mirage
kit_ty_kate has joined #mirage
laudecay has joined #mirage
Haudegen has quit [Ping timeout: 256 seconds]
jnavila has quit [Ping timeout: 256 seconds]
jnavila has joined #mirage
jnavila has quit [Ping timeout: 256 seconds]
Haudegen has joined #mirage
samoht_[m] has joined #mirage