#
✕ nick:marcan
#asahi · 2021-05-12 12:14
marcanI only have symbols for the core kernel (which is ~95% open source, except the "secret" m1 and gxf/etc bits)
#asahi · 2021-05-12 12:13
marcanyoutube.com/marcan42
#asahi · 2021-05-12 12:13
marcanso I have symbolized backtraces and such now
#asahi · 2021-05-12 12:13
marcanthat was last stream, all the fileset voodoo to get all the addresses fixed up and symbols loaded
#asahi · 2021-05-12 12:13
marcanpython
#asahi · 2021-05-12 12:12
marcan(originally I wasn't getting that far before a crash)
#asahi · 2021-05-12 12:12
marcanso panics hopefully can go there
#asahi · 2021-05-12 12:12
marcanwhich they might already - serial works
#asahi · 2021-05-12 12:12
marcanand then just stop doing that once things get far along enough
#asahi · 2021-05-12 12:12
marcanOTOH, since I have symbols now, it makes a lot more sense to just ditch that and statically patch the exception tables, which are at two well-known symbols
#asahi · 2021-05-12 12:11
marcanrelies on some other trap firing before a crash happens
#asahi · 2021-05-12 12:11
marcanit's ugly
#asahi · 2021-05-12 12:11
marcan:)
#asahi · 2021-05-12 12:11
marcanthen patch
#asahi · 2021-05-12 12:11
marcaninstead I trap other stuff and then just read VBAR and see if it changed
#asahi · 2021-05-12 12:11
marcanI don't (I can't)
#asahi · 2021-05-12 12:10
marcan(which implies making sprr/gxf work, since those cannot be properly trapped from EL2)
#asahi · 2021-05-12 12:10
marcanbut I want to stop doing that
#asahi · 2021-05-12 12:10
marcansince it's the ony way to get any feedback on early problems
#asahi · 2021-05-12 12:10
marcanexcept the exception vectors get dynamically patched into hvcs, just so I can monitor guest exceptions
#asahi · 2021-05-12 12:10
marcannothing is patched in macos right now (I had a patching attempt but gave up, too many false positives to do statically; was considering doing it dynamically but I feel it'll be more work than just doing it right, and more brittle)
#asahi · 2021-05-12 12:09
marcananother approach would be to just patch macos to not use this (there may be some global vars you can just poke to trivially make it bypass it), but I want to avoid any dependencies on such mechanisms
#asahi · 2021-05-12 12:08
marcanthe details aren't clear but I think it should be easier than trying to trap and emulate the whole thing
#asahi · 2021-05-12 12:08
marcanthen gxf is more interesting; it's not clear exactly what it entails, but hopefully it won't be very hard. I'm thinking stuff like pointing the gxf exception base to the regular location; perhaps some registers need to be accessed differently and such
#asahi · 2021-05-12 12:07
marcana priori it just means extending the pagetable code to properly support mapping at 16k granularity (right now we only do block maps in memory.c) so that we can properly map .text as r-x and .data as rw- (W^X which is enforced with SPRR on)
#asahi · 2021-05-12 12:07
marcanread sven's blog :)
#asahi · 2021-05-12 12:07
marcanj`ey: sprr/gxf is an issue; I already knew the gxf instructions cannot be trapped but it seems the sprr registers can not be trapped fine-grained. given that it's not trivial to emulate, so my next approach will be to just do it the "right" way and run m1n1 with SPRR enabled (and possibly partly or wholly in GL2), which allows the guest to do so too
#asahi · 2021-05-12 12:01
marcan(just got back home)
#asahi · 2021-05-12 12:00
marcanhad some errands
#asahi · 2021-05-12 12:00
marcanprobably tomorrow; wanted to do one today but ended up busy this morning
#asahi · 2021-05-10 10:14
marcan(bbiab)
#asahi · 2021-05-10 10:12
marcanso you'll want OIK users on multiple macOS installs
#asahi · 2021-05-10 10:12
marcanthat's kind of by design, I believe
#asahi · 2021-05-10 10:12
marcanit's fine not to mess with that install, but you do need to be machine owner to authorize permissive security on the machine
#asahi · 2021-05-10 10:11
marcanarnd: I think you're going to need OIK access to kmutil
#asahi · 2021-05-10 10:07
marcanbut only in fullsec mode
#asahi · 2021-05-10 10:07
marcanagraf: AIUI there is some exception for clean OS installs
#asahi · 2021-05-09 23:20
marcangood night :)
#asahi · 2021-05-09 23:15
marcanso those drives still need to be treated as external for boot policy purposes
#asahi · 2021-05-09 23:15
marcanobviously iBoot can't boot from TB3, there's no way it initializes that
#asahi · 2021-05-09 23:14
marcannow I'm wondering if it thinks nvme is internal and that's what causes it to be really confused
#asahi · 2021-05-09 23:14
marcanhuh, interesting
#asahi · 2021-05-09 23:12
marcanlet me try to reproduce what you see
#asahi · 2021-05-09 23:12
marcan(just boot picker)
#asahi · 2021-05-09 23:11
marcanso I call that menu 1TR too
#asahi · 2021-05-09 23:11
marcanI think "options" just does a UI/session restart into the desktop
#asahi · 2021-05-09 23:11
marcanfwiw long-press is still 1TR AIUI, the boot picker is just a fullscreen macos app
#asahi · 2021-05-09 23:10
marcanthe basic idea for our installer I have is to make it look like a foreign external drive (just internally), which means credential adoption needs to work
#asahi · 2021-05-09 23:10
marcanbut also, I *want* them to fix this stuff as it overlaps with feature I need for our installer :-)
#asahi · 2021-05-09 23:09
marcan... it's just kind of broken in various ways because they rushed this M1 thing a *lot*

plus ›