#asahi-re · 2026-01-12 21:25
amarioguythe function that actually consumes this bit's value is full of function callbacks and other lovely things#asahi-re · 2026-01-12 21:24
amarioguythis bitmask is later then checked in the function that prepares xnu load, disables GID keys, etc#asahi-re · 2026-01-12 21:24
amarioguyi'm seeing some check here where if a kernelcache with tag `fuos` (the tag for kmutil configure-boot objects from looking at the one on my m2 pro mbp) succeeds load, if some bool on the stack is 0 then it sets bit 40 of some bitmask#asahi-re · 2026-01-12 21:10
svenpeter[m]*bit#asahi-re · 2026-01-12 21:10
svenpeter[m]I’d expect something similar here#asahi-re · 2026-01-12 21:10
svenpeter[m]when the sprr enable but in m1 e.g. isn’t set most sprr msrs also disappear#asahi-re · 2026-01-12 21:09
svenpeter[m]I’d expect a msr as well somewhere in stage 2#asahi-re · 2026-01-12 20:28
chaos_princessanyway, i _think_ it is a msr#asahi-re · 2026-01-12 20:27
amarioguysince stage 1 doesn't know whether it's custom xnu or raw boot object and shouldn't care about such#asahi-re · 2026-01-12 20:27
amarioguystage 2 mostly, my thought is that stage 2 would have the actual disablement#asahi-re · 2026-01-12 20:27
chaos_princesswhich stage are you looking at?#asahi-re · 2026-01-12 20:26
chaos_princessso, self-built xnu is also non-apple-or-untrusted-code, but has access to sptm and friends#asahi-re · 2026-01-12 20:26
chaos_princessi think non-apple-or-untrusted-code is irrelevant, it is set in all dts in osenvironments, and allows/denies custom boot objects#asahi-re · 2026-01-12 20:25
amarioguysince if it's undefined altogether, i don't think we're gonna be looking for a lock msr here is my thing#asahi-re · 2026-01-12 20:24
amarioguyknowing that answer is gonna help me know what to be looking for#asahi-re · 2026-01-12 20:21
chaos_princessidk, i do have the hw to check#asahi-re · 2026-01-12 20:20
amarioguyor do they become undefined altogether?#asahi-re · 2026-01-12 20:20
amarioguychaos_princess: btw, quick question, when booting m4 with raw boot object mode, do the GXF registers become read-only#asahi-re · 2026-01-12 20:15
amarioguyah er, this is done *right before* the jump to next stage stuff#asahi-re · 2026-01-12 20:14
amarioguythe other properties checked are sep related idk if they matter too much in our case tbf#asahi-re · 2026-01-12 20:13
amarioguybit 30 is only set if protected-data-access = 1#asahi-re · 2026-01-12 20:12
amarioguybit 26 set if security-downgradable = 1#asahi-re · 2026-01-12 20:12
amarioguybit 27 of this register is set if /chosen/non-apple-or-untrusted-code = 1#asahi-re · 2026-01-12 20:11
amarioguyspecifically a check against dt properties#asahi-re · 2026-01-12 20:10
amarioguyok i found a reference to some 0x508340120 register (this is m4 max/t6041 btw for reference) that's checked in the code that prepares to jump to next stage#asahi-re · 2026-01-12 19:54
amarioguydoesn't help i don't exactly have all the apple intrinsic functions (memcpy, etc) committed to memory fully so need to check those against XNU implementations#asahi-re · 2026-01-12 19:53
amarioguyi swear it feels like they turn on *more* compiler optimizations for release partly for obfuscation reasons (partly /s ofc)#asahi-re · 2026-01-12 19:53
amarioguystarted checking a bit ago, right now still trudging through the hell that is release iboot string obfuscation#asahi-re · 2026-01-12 09:43
pitustyeah#asahi-re · 2026-01-12 09:42
svenpeter[m]we can continue speculating but I don’t think we’ll get anywhere. it makes sense to check either way#asahi-re · 2026-01-12 09:42
pitustYeah if their goal is to disable it then sure, but their primary goal is to keep macOS secure and not to keep linux out.#asahi-re · 2026-01-12 09:41
svenpeter[m]or an “enable msr” with the some bit that enables the msr itself which they then just disable#asahi-re · 2026-01-12 09:41
svenpeter[m]Sure, it’s possible and double checking makes sense apple usually knows what they are doing and I very much expect this to be something that’s effectively write once to disable it#asahi-re · 2026-01-12 09:39
pitustI meant the bit that enables all of the extra hw stuff, could be an enable, not a disable, bit#asahi-re · 2026-01-12 09:35
svenpeter[m]*determines#asahi-re · 2026-01-12 09:35
svenpeter[m]or do you mean the bit that determine what iboot does? I expect that to be somewhere in the local policy img4 file#asahi-re · 2026-01-12 09:34
nickchanit might lose state after s2ram but reconfig probably programs the bit again#asahi-re · 2026-01-12 09:33
svenpeter[m]I expect it to be write-once but it’s a good idea to double check#asahi-re · 2026-01-12 09:29
pitustthen i guess it could be a bit to enable it, not disable it as well?#asahi-re · 2026-01-12 09:22
chaos_princessthe second. as to where - most likely custom kernelcache#asahi-re · 2026-01-12 09:20
pitustdo we know which bit does the disabling? or is it just "one of the bits somewhere, we don't know where"?#asahi-re · 2026-01-11 21:33
sventhat would be nice#asahi-re · 2026-01-11 21:33
amarioguyi see, well i had my iboot db left over from that image4 post i did forever ago so i can take a look in a bit at that, i should've labeled most the stuff used in lp-backed loads#asahi-re · 2026-01-11 21:32
sven*would make#asahi-re · 2026-01-11 21:32
svenor if it turns out that the bit that disables gl2 isn't actually write-once :D#asahi-re · 2026-01-11 21:32
svenyeah, custom boot object for sptm would be this much easier#asahi-re · 2026-01-11 21:32
chaos_princessas it would make m4+ much easier#asahi-re · 2026-01-11 21:32
chaos_princessit would be very nice if it somehow turned out that we can control sptm load and apple instruction lockout separately#asahi-re · 2026-01-11 21:31
amarioguywell, gl2 lockout for m4/m5 when on the raw boot object path i mean#asahi-re · 2026-01-11 21:31
amarioguyjust want to confirm if there's actually interest in that or if it was a "just something to do later" kinda thing