#asahi · 2021-05-05 18:40
marcanI think there's a good chance just hooking all undefined instruction exceptions will let me do what I want#asahi · 2021-05-05 18:40
marcan(I *can* hook VBAR writes)#asahi · 2021-05-05 18:40
marcanand then I can fix things up in EL2 that way#asahi · 2021-05-05 18:40
marcanprobably the next thing I'll do is hook VBAR and add my own exception vector hooks that just hypercall on anything "interesting" like undefined instruction syndromes#asahi · 2021-05-05 18:39
marcan(because ARM)#asahi · 2021-05-05 18:39
marcanthose are *EL1* exceptions#asahi · 2021-05-05 18:39
marcanwhich suggests an EL1 exception#asahi · 2021-05-05 18:39
marcanwell, running it under the hv right now just hangs, no output or anything#asahi · 2021-05-05 18:38
marcanoh heh#asahi · 2021-05-05 18:38
marcanwill try tomorrow with the right kernel :)#asahi · 2021-05-05 18:37
marcanthen it panics on pcie#asahi · 2021-05-05 18:37
marcanthen more delays on the USB stuff#asahi · 2021-05-05 18:37
marcanlong delay after the SEP stuff; I did push a bit that was missing but it didn't help#asahi · 2021-05-05 18:37
marcanfwiw, this is a far as darwin gets when chainloaded: https://mrcn.st/p/jNkTDWj6 (again this may or may not even be the right kernel for the current iboot2/sfr...)#asahi · 2021-05-05 18:27
marcananyway, good night :-)#asahi · 2021-05-05 18:27
marcanwhich isn't entirely surprising. related to guarded exec I bet (hi sven)#asahi · 2021-05-05 18:27
marcanok, HV does not work :-)#asahi · 2021-05-05 18:24
marcanwonder if *that* works#asahi · 2021-05-05 18:24
marcanactually that isn't even setting up the devicetree and trustcache properly; the version in hv.py does.#asahi · 2021-05-05 18:23
marcanI was wrong, because I just chainload.py'ed darwin and it worked, framebuffer and serial output and all (didn't get to the desktop, might not even be the right kernel, but whatever)#asahi · 2021-05-05 18:22
marcanalso, um, I *thought* booting darwin required more mach-o loading stuff#asahi · 2021-05-05 18:17
marcan*caught (damn, I can't english these days)#asahi · 2021-05-05 18:12
marcanI'll do a catch-up march post on the upstreaming stuff, then april-may will probably be a combined update about hypervisor goodies since this month is going to be fun#asahi · 2021-05-05 18:11
marcanflying_sausages: soon, sorry, I have an update pending but got too caughed up in hypervisor development :)#asahi · 2021-05-05 18:10
marcanjust not where I told you to look for the file :P#asahi · 2021-05-05 18:10
marcanthe x64 kernelcache is somewhere on disk on M1 macs#asahi · 2021-05-05 18:10
marcanthe OS is universal#asahi · 2021-05-05 18:09
marcanI did ask if he was looking at the right file :p#asahi · 2021-05-05 18:08
marcanlol#asahi · 2021-05-05 18:08
marcanoff to sleep now#asahi · 2021-05-05 18:06
marcanso yeah, I don't know what's wrong with your kernelcache :)#asahi · 2021-05-05 18:05
marcanunless I got confused this should be 11.3.1 which I think is the latest public version#asahi · 2021-05-05 18:05
marcanimg4 has sha1 221763401520819850b4a71ff00ab0dab9b55108; mach-o has sha1 5a652f986f3fa29c69c94a046a9a7122cc115a41#asahi · 2021-05-05 18:04
marcanfor reference: Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:41 PDT 2021; root:xnu-7195.101.2~1/RELEASE_ARM64_T8101#asahi · 2021-05-05 18:04
marcanstill disassembles fine#asahi · 2021-05-05 18:04
marcanpipcet[m]: upgrade isn't done yet but I lifted the staged kernelcache from the upgrade volume#asahi · 2021-05-05 17:58
marcanif that goes wrong I could see ending up with a good-looking but very borked kernel image#asahi · 2021-05-05 17:58
marcanthere is decompression involved#asahi · 2021-05-05 17:57
marcanor buggy img4 tooling#asahi · 2021-05-05 17:56
marcandoes that hit? :p#asahi · 2021-05-05 17:56
marcan$ hexdump -vC kernelcache | grep "28 e2 1b d5"#asahi · 2021-05-05 17:55
marcanare you sure you're disassembling in little-endian aarch64?#asahi · 2021-05-05 17:55
marcanI mean they don't even encrypt iOS last I checked, haven't for a long time#asahi · 2021-05-05 17:54
marcanonly reason I can think of why they'd encrypt XNU is to further obfuscate the M1-isms, though that cat is thoroughly out of the bag and if they do so I'm pointing squarely at ARM's lawyers being idiots#asahi · 2021-05-05 17:53
marcanwhich is good for us#asahi · 2021-05-05 17:53
marcanand either way, they *are* releasing XNU source dumps; it might even be *easier* to do this with such a FOSS build, as those lack hypervisor support#asahi · 2021-05-05 17:52
marcanthough I'm at a loss as to why they would do anything like this#asahi · 2021-05-05 17:52
marcanyes, that shouldn't be a problem#asahi · 2021-05-05 17:52
marcanmake sure you're looking at the right file (/System/Volumes/Preboot/*/boot/*/System/Library/Caches/com.apple.kernelcaches/kernelcache)#asahi · 2021-05-05 17:51
marcangoing to sleep now but I can confirm this tomorrow