#
#asahi-dev · 2026-05-10 08:53
chaos_princesschainload.py ?
#asahi-dev · 2026-05-10 08:53
StanfordAppliedCyber[m]I'm already using it to emulate sptm-- python is way too slow for thousands of calls and i'm obviously not going through 1tr for every iteration loop
#asahi-dev · 2026-05-10 08:53
StanfordAppliedCyber[m]> the LinkedProgram() class already provide the infrastructure to link such blobs
#asahi-dev · 2026-05-10 08:51
StanfordAppliedCyber[m]that said it's 2am in california and I'm going to bed
#asahi-dev · 2026-05-10 08:51
StanfordAppliedCyber[m]but the whole point of this exercise is to figure that out!
#asahi-dev · 2026-05-10 08:50
StanfordAppliedCyber[m]it's like region 3 or soemthing
#asahi-dev · 2026-05-10 08:50
StanfordAppliedCyber[m]yeah there's a whole new sptm range for dart
#asahi-dev · 2026-05-10 08:50
JamesCalligeros[m]Ersatz sptm will not suffice for some changes because some things have been moved out of xnu into sptm (e.g. darts) but its probably fine for most things
#asahi-dev · 2026-05-10 08:49
StanfordAppliedCyber[m]if we need 10,000 lines, well, good thing you can run multiple guests in el1!
#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 08:47
sventhat crap is exactly what we want to avoid
#asahi-dev · 2026-05-10 08:46
svenyeah, no.
#asahi-dev · 2026-05-10 08:42
nickchanerm, where it come from
#asahi-dev · 2026-05-10 08:42
nickchanwhat the opaque blob does and where it comes up need not to be m1n1's concern
#asahi-dev · 2026-05-10 08:41
nickchanthe LinkedProgram() class already provide the infrastructure to link such blobs
#asahi-dev · 2026-05-10 08:41
nickchanthe asm2c doesn't have to be in m1n1, m1n1 can call into an opaque blob that's uploaded with python to handle sptm calls
#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
sven SPTM is the same as any kext wrt to that policy
#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:29
sven*emulate
#asahi-dev · 2026-05-10 06:29
svenyou’ll also run into some other Apple ISA extensions you’ll have to trap and emulator fwiw but that’s true for every other way as well
#asahi-dev · 2026-05-10 06:28
svendon’t get me wrong, the approach will probably work but we really don’t want to enter any legally questionable areas with this project
#asahi-dev · 2026-05-10 06:27
svenI‘m especially not gonna accept any MR like that from a new contributor, see the binary reversing policy for details
#asahi-dev · 2026-05-10 06:26
svenim afraid it’ll just end up as asm2c otherwise
#asahi-dev · 2026-05-10 06:26
svenreversing SPTM and reimplementing that in m1n1 is very legally challenging unless you write a documentation inbetween and have someone else write the emulator
#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:56
chadmeddid you try running apple's own sptm blob in a second vm under the hypervisor and trapping XNU's call to it via m1n1? perhaps more effort but less legall frought than trying to reimplement sptm
#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 05:15
chadmedtbh there is absolutely no point if the approach cannot be integrated into the hypervisor codebase and published
#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:37
chadmedif youre gonna talk about apple's code that youve disassembled go to -re. if youre just talking about the general approach you can do so here
#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 04:20
nickchanah so HLE SPTM
#asahi-dev · 2026-05-10 02:31
Krishy2007[m]How much of the work done for porting Asahi to M3 actually transfers over to M4?
#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

plus ›