#asahi-re · 2026-01-14 14:23
nnymI don't know how to check the tags but I see "fuos" after "IM4P" near the beginning when I look at it with a text editor; ditto for the custom kext collection's kernelcache.#asahi-re · 2026-01-14 13:34
nnymThere is no Mach-O header.#asahi-re · 2026-01-14 05:43
nickchankclo => Kernel Cache Lowest Virtual Address; kcep => Kernel Cache Entry Point; #asahi-re · 2026-01-14 05:41
nickchanso it's all 4cc#asahi-re · 2026-01-14 05:41
nickchanand it really isn't obfuscated it just need to fit inside a uint32_t#asahi-re · 2026-01-14 05:39
nickchannnym: how about raw m1n1.bin's boot properties?#asahi-re · 2026-01-14 01:48
nnymHow can I get the tags?#asahi-re · 2026-01-14 01:48
nnymproperties are obfuscated so I don't know what most of them mean but here they are anyway. https://paste.sr.ht/~nnym/bcb5f6ae0b5217cdd66ef7a45f6227345c09a385#asahi-re · 2026-01-14 01:48
nnymI made a kext collection with `kmutil create`, configured it as the boot object, and examined it with `kmutil inspect` with various options but none seems to refer to "tags". With `--show-mach-header`, it shows at the top that both the custom kernelcache and Apple's kernelcache have `flags: 0x0`; with `--show-mach-boot-properties`, it shows different boot properties for each. The#asahi-re · 2026-01-13 19:33
svenyeah, if that ends up writing to some msr this disable could be something similar#asahi-re · 2026-01-13 19:30
chaos_princesswould make sense if it was#asahi-re · 2026-01-13 19:30
amarioguymaybe it's something similar?#asahi-re · 2026-01-13 19:30
amarioguychaos_princess: i looked at XNU source, i think on some older platforms (this was define APPLETYPHOON) there was a boot-arg to set something called "defeature" registers#asahi-re · 2026-01-13 19:29
amarioguymachine j616c#asahi-re · 2026-01-13 19:29
amarioguyiBoot-11881.41.5 stage 2 - corresponding to 24B2083#asahi-re · 2026-01-13 19:28
sven*machine#asahi-re · 2026-01-13 19:28
svenhave to check on my other machines, this was a few weeks ago. I think I looked at m4 sptm back then#asahi-re · 2026-01-13 19:28
svenbut dunno, maybe I just didn't see the real SPTM entry point that setups GL2#asahi-re · 2026-01-13 19:28
chaos_princesswhich one are you looking at?#asahi-re · 2026-01-13 19:27
sveni also thought SPTM setup happens there#asahi-re · 2026-01-13 19:27
amarioguyit's locked out by iBoot itself i believe, lemme open the db again today, but i searched for byte sequence d5 instructions (the MSR encoding) in iBoot, as well as "MSR" text here, saw no mention of the SPRR or GXF regs#asahi-re · 2026-01-13 19:27
sveni'm pretty sure the lockout happens in iboot stage 2, maybe stage 1#asahi-re · 2026-01-13 19:23
chaos_princessbut what locks it out if there is no sptm then, as is with raw object?#asahi-re · 2026-01-13 19:23
svenwhen I briefly looked at the SPTM blob a while ago it didn't appear that way, but maybe i missed something#asahi-re · 2026-01-13 19:22
amarioguysven: yea i think SPTM is what sets it up in that case#asahi-re · 2026-01-13 11:33
nickchanokay wrong channel#asahi-re · 2026-01-13 11:33
nickchanon apple a11 ios 16 firmware reading more than 0x80 bytes of BMSN causes SError in SMC SRAM range so i have to modify the driver to check key size before reading#asahi-re · 2026-01-13 07:42
svenno, the macho is essentially deprecated#asahi-re · 2026-01-13 07:08
nickchanI use machos sometimes but I roll my own .ld script#asahi-re · 2026-01-13 07:08
nickchanno one is seriously using the original m1n1 macho these days are there?#asahi-re · 2026-01-13 06:58
nickchanso dummy segments can be added without affecting the file layout#asahi-re · 2026-01-13 06:58
nickchanin any case for segments it seems that apple's parsers will accept filesize=0 vmsize=0 segments#asahi-re · 2026-01-13 06:57
nickchanbut that's probably because macs uses fileset#asahi-re · 2026-01-13 06:56
nickchani tried giving kmutil a m1n1 macho pretending to be a prelink kernelcache with __TEXT, __PRELINK_TEXT and __LAST and kmutil didn't like it either#asahi-re · 2026-01-13 06:55
nickchanthe m1m1 macho problem goes beyond just __TEXT#asahi-re · 2026-01-13 06:18
svenpeter[m]that macho should work, ours would need fixing#asahi-re · 2026-01-13 06:18
svenpeter[m]nnym: I’d just try a xnu kernelcache to check for flags#asahi-re · 2026-01-13 06:14
svenpeter[m]hrm, maybe the SPTM blob itself?#asahi-re · 2026-01-13 06:14
svenpeter[m]amarioguy: huh, that’s weird. What sets up SPTM in GL2 then?#asahi-re · 2026-01-13 01:47
nnymUnless I can use something else?#asahi-re · 2026-01-13 01:47
nnymIf I understand correctly, the conversation above was about checking the tags set by `kmutil configure-boot` for Mach-O boot objects; so in order to do that, I need an m1n1 Mach-O.#asahi-re · 2026-01-13 01:33
JamesCalligeros[m]You need to use the raw m1n1.bin blob and configure it appropriately. Mach-O m1n1 broke some time ago and also wouldnt work as we would be under sptm anyway#asahi-re · 2026-01-13 01:33
nnymAlso, I thought that text sections were supposed to be always executable so why are there 2?#asahi-re · 2026-01-13 01:25
nnym"LC_THREAD.UNKNOWN_ARCHITECTURE.0"; `ipsw macho info build/m1n1.macho` shows several segments including "TEXT" but not "__TEXT". When I renamed "TEXT" to "__TEXT" in `m1n1.ld`, `kmutil` complained next about a missing `__TEXT_EXEC` segment. Is this a new requirement in firmware version 26.0?#asahi-re · 2026-01-13 01:25
nnym`kmutil configure-boot -c m1n1.macho -C -v /Volumes/test` keeps failing and saying "found valid Mach-O binary, deriving Mach-O boot properties...\nFileset Error: Invalid Mach-O boot properties. Fileset Error: Failed to find __TEXT segment" even with a clean build from upstream main. `aarch64-apple-darwin-objdump -x build/m1n1.macho` shows a single section named#asahi-re · 2026-01-13 00:51
amarioguydid a search for the msr instruction, doesn't *seem* to hit any of the SPRR or GXF msrs#asahi-re · 2026-01-13 00:45
amarioguyit doesn't look like iboot touches the GXF msrs at least#asahi-re · 2026-01-12 21:33
amarioguyprobably something *in there* is going to spill the difference#asahi-re · 2026-01-12 21:33
amarioguyi'd actually imagine we want the manifest/object properties more than just the tag#asahi-re · 2026-01-12 21:33
chaos_princesssomeone with a m4 needs to check if this tag is set for mach-o boot objects