#asahi-dev · 2026-05-10 08:48
StanfordAppliedCyber[m]if we need 1000 lines, that's still doable, though far harder#asahi-dev · 2026-05-10 08:48
StanfordAppliedCyber[m]say we actually need <100 lines of C to get macos booting to userspace, we can find a way to clean room that#asahi-dev · 2026-05-10 08:48
StanfordAppliedCyber[m]re: the actual sptm, i want to get this working to figure out exactly how much of sptm we need#asahi-dev · 2026-05-10 08:47
StanfordAppliedCyber[m]I think the goal would be a few fold: if we need full txm emulation, we do it by running it some userspace somewhere with its own emulated sptm. it lives in its own world after all#asahi-dev · 2026-05-10 06:30
StanfordAppliedCyber[m]will move over to the tainted channel for some technical details#asahi-dev · 2026-05-10 06:30
StanfordAppliedCyber[m]because i do want to get those working at some point and would rather not be documentation writer#asahi-dev · 2026-05-10 06:29
StanfordAppliedCyber[m]understood, and yes i did see the policy-- made a point of absolutely never touching any of the kexts in the kernelcache#asahi-dev · 2026-05-10 06:16
StanfordAppliedCyber[m]you could just patch the standard genter handler with a hypercall and then use that to route xnu genter calls to sptm#asahi-dev · 2026-05-10 06:11
StanfordAppliedCyber[m]actually i'll look into that a bit more, because obviously getting the emulation right is most of my problems now, and using real sptm removes that particular failure case#asahi-dev · 2026-05-10 06:04
StanfordAppliedCyber[m]if I can get this to work in its current form (ie, the method works), and after deeper discussion with the maintainers we find that the current approach is too risky from a copyright standpoint, then yes that is the approach I'd pivot to, and i'd imagine that carries very little legal risk (obligatory: IANAL)#asahi-dev · 2026-05-10 06:02
StanfordAppliedCyber[m]the answer is i did but sptm is a snowflake-- iirc it hardcodes a bunch of virtual addresses and we'd have to make all those happy#asahi-dev · 2026-05-10 06:01
StanfordAppliedCyber[m]i agree from a copyright perspective that is significantly less risky#asahi-dev · 2026-05-10 06:01
StanfordAppliedCyber[m]i'd rather make this work first and then see if we can clean up the method, also because i could push the code without the sptm bits and others could fire that up#asahi-dev · 2026-05-10 05:48
StanfordAppliedCyber[m]the goal is to be upstreamed#asahi-dev · 2026-05-10 05:45
StanfordAppliedCyber[m]i think i'd want to talk to more experienced reverse engineers about that ofc, and generally i'd imagine the answer depends on how the emulation is done#asahi-dev · 2026-05-10 04:48
StanfordAppliedCyber[m]obviously this code could never be shipped to end users, given the whole "massive disasm of sptm", but that's not the point, it'll get us mmio traces#asahi-dev · 2026-05-10 04:47
StanfordAppliedCyber[m]do we know if anyone else is working on this particular approach? it strikes me as the obvious one and I don't see any blockers that make it nonviable#asahi-dev · 2026-05-10 04:44
StanfordAppliedCyber[m]ack#asahi-dev · 2026-05-10 04:29
StanfordAppliedCyber[m]if I should head to the RE channel or not*#asahi-dev · 2026-05-10 04:29
StanfordAppliedCyber[m]will wait for a core dev to tell me to head to the re channel before i discuss any more details#asahi-dev · 2026-05-10 04:28
StanfordAppliedCyber[m]yeah basically, and it definitely works#asahi-dev · 2026-05-10 01:45
StanfordAppliedCyber[m]I have NOT done any disasm of the kexts in the kernelcache, which is ultiamtely what we want to RE with the mmio traces#asahi-dev · 2026-05-10 01:44
StanfordAppliedCyber[m]question: should I talk about it here or in the tainted RE channel? this involved extensive disasm of SPTM#asahi-dev · 2026-05-10 01:43
StanfordAppliedCyber[m]i've made good progress and am debugging a hang somewhere in comppage init right now and am optimistic this approach will work#asahi-dev · 2026-05-10 01:43
StanfordAppliedCyber[m]I'm working on porting the m1n1 hypervisor to the macbook neo (tl;dr, boot in raw mode, run m1n1 in el2, use a python script to patch all the genter calls in xnu to hypercalls mechanically, load xnu into el1 and emulate sptm (both the handoff and the runtime endpoints))