#
✕ nick:sven
#asahi · 2021-05-05 18:39
sventhough... it's strange that it doesn't hit an undefined MSR
#asahi · 2021-05-05 18:38
sveni confused PXN and UXN
#asahi · 2021-05-05 18:38
sveni think it'll work just fine
#asahi · 2021-05-05 18:38
svenohhh... i messed up with guarded exec stuff actually :D
#asahi · 2021-05-05 18:36
svenbut yeah... let me document the guarded exec stuff for real now
#asahi · 2021-05-05 18:36
svenmarcan: i never tried loading anything in ghidra. so far i've just used objdump to find the entry register for guarded exec and that's it :D
#asahi · 2021-05-05 16:21
svenfor serious reverse engineering i generally stick to ghidra or ida pro. for quick glances objdump works fine though
#asahi · 2021-05-05 16:19
sveni, er, coerced an elf objdump to just disassemble everything
#asahi · 2021-05-05 16:17
svenpipcet[m]: so i'm not sure what you're looking at but the latest mac os kernelcache still contains plain aarch64 instructions
#asahi · 2021-05-05 16:11
svenpretty much. it might need some reverse engineering of undocumented macho headers (or however that format works) but i'm willing to bet it's possible to figure those out by staring at them
#asahi · 2021-05-05 16:10
svenit only implements the minimal requirements
#asahi · 2021-05-05 16:10
sventhat's not enough for a xnu macho though
#asahi · 2021-05-05 16:08
svenit isn't
#asahi · 2021-05-05 16:07
svenyup
#asahi · 2021-05-05 16:06
svenit does
#asahi · 2021-05-05 16:00
svenwell, the code is open source. feel free to start working on that :)
#asahi · 2021-05-05 15:58
sveni'm not sure it would be easy from linux but it's going to be relatively easy from m1n1 when almost no hardware is up and running
#asahi · 2021-05-05 15:56
svenbut if you disagree: feel free to explore that direction :-)
#asahi · 2021-05-05 15:56
sventhat's *much* easier with the hypervisor up and running
#asahi · 2021-05-05 15:55
svenwhy would that give us any additional debugging information?
#asahi · 2021-05-05 15:50
sveni'm not sure what you're doing then but i didn't have any issues
#asahi · 2021-05-05 15:48
svenwhat do you mean with "not plain aarch64 instructions"?
#asahi · 2021-05-05 15:46
sveni don't
#asahi · 2021-05-05 15:39
svenuh, by writing code that loads xnu and jumps to it under the hypervisor?
#asahi · 2021-05-05 11:05
sventhat sounds, er, fun
#asahi · 2021-05-05 11:05
svenlol, grub in userspace :D
#asahi · 2021-04-30 22:37
svendavidrysk[m]: same thing. it's just that xnu (both on iphone and m1) quickly changes that during startup
#asahi · 2021-04-30 07:49
svenI think PPL is also more about protecting user land and enforcing code signing than the kernel itself. for the kernel they already have this thing where they can lock down a range for writes and then disallow running in EL1/2 outside of that range
#asahi · 2021-04-30 07:45
svenmarcan: yeah, and I agree
#asahi · 2021-04-30 07:45
svenor we just don't enable SPRR/GXF and we're done with it
#asahi · 2021-04-29 21:44
svensure
#asahi · 2021-04-29 21:36
svenor, well, they exist but are stuck at 0
#asahi · 2021-04-29 21:36
sventhey're gone
#asahi · 2021-04-29 21:34
svenit feels like a small iteration of APRR
#asahi · 2021-04-29 21:33
svenit's very similar
#asahi · 2021-04-29 21:33
svenand you can essentially flip the permissions of many page at once by calling genter
#asahi · 2021-04-29 21:33
svenand then you have two different tables: one for ELn and one for GLn
#asahi · 2021-04-29 21:33
svenit changes the meaning of AP[1:0],UXN and PXN to a table
#asahi · 2021-04-29 21:32
svenyeah
#asahi · 2021-04-29 21:32
sventhat's how xnu uses it
#asahi · 2021-04-29 21:31
svenit's easy from m1n1 though
#asahi · 2021-04-29 21:31
svenmaximus64: uh... very hard probably
#asahi · 2021-04-29 21:30
svendidn't look into that one yet
#asahi · 2021-04-29 21:30
sventl;dr: lateral exc level to EL1 and EL2 with the same pagetables but different pagetable permissions
#asahi · 2021-04-29 21:30
svenbut i'll do it this weekend
#asahi · 2021-04-29 21:29
svennothing there yet
#asahi · 2021-04-29 21:28
svenjust procrastinating on the documentation right now :D
#asahi · 2021-04-29 21:28
svenmodwizcode: completely figured it out
#asahi · 2021-04-29 06:51
svennice! i was planning to add sprr/gxf registers to regs.json but i like the separate file for apple-regs :)
#asahi · 2021-04-28 13:25
svenkettenis1: that sounds good to me at least

plus ›