#
✕ nick:davidrysk[m]
#asahi-re · 2021-01-21 13:26
davidrysk[m]I’m really curious what’s really up with nGnRE. Does Apple just never use it in their drivers? They do provide a way to map that memory
#asahi-re · 2021-01-20 02:50
davidrysk[m]is it possible that nothing in macOS uses that? I guess
#asahi-re · 2021-01-20 02:49
davidrysk[m]for IOMemory mapping
#asahi-re · 2021-01-20 02:49
davidrysk[m]IOKit exposes a kIOPostedWrite type which maps to nGnRE
#asahi-re · 2021-01-20 02:16
davidrysk[m]that's normal memory though
#asahi-re · 2021-01-20 02:15
davidrysk[m]configures*
#asahi-re · 2021-01-20 02:15
davidrysk[m]but xnu also declares two more memory types (CACHE_ATTRINDX_POSTED_REORDERED and CACHE_ATTRINDX_POSTED_COMBINED_REORDERED) and configured them accordingly
#asahi-re · 2021-01-20 02:14
davidrysk[m]xnu maps MT_DEVICE_nGnRE memory as nGnRE
#asahi-re · 2021-01-20 02:09
davidrysk[m]they do set more things in the MAIR1 register though
#asahi-re · 2021-01-20 02:08
davidrysk[m]Apple doesn't have any workaround in their t8101 xnu for this, that I can tell
#asahi-re · 2021-01-20 02:03
davidrysk[m]What did marcan end up doing to work around the nGnRE issue?
#asahi-re · 2021-01-20 01:30
davidrysk[m]ah, just have to disassemble all the .text sections
#asahi-re · 2021-01-20 01:28
davidrysk[m]which isn't an img4
#asahi-re · 2021-01-20 01:28
davidrysk[m]I'm looking at /System/Library/Kernels/kernel.release.t8101
#asahi-re · 2021-01-20 01:28
davidrysk[m]from where?
#asahi-re · 2021-01-20 01:25
davidrysk[m]https://github.com/vampirecat35/decompkernelcache
#asahi-re · 2021-01-20 01:24
davidrysk[m]how does one disassemble the kernel? otool -tV doesn't like it
#asahi-re · 2021-01-18 05:07
davidrysk[m]ahh hi again :)
#asahi-re · 2021-01-15 04:39
davidrysk[m]one could argue that listing exported symbols and linking against the userspace graphics driver binaries is not disassembling or decompiling them
#asahi-re · 2021-01-15 04:39
davidrysk[m]and, for marcan, the policy says "contributors must not disassemble or decompile userspace graphics driver binaries", but does this fall under that prohibition
#asahi-re · 2021-01-15 04:37
davidrysk[m]is linking and calling exported functions that follow the same effective API as LLVM in an Apple private framework in order to assemble LLVM IR into GPU-architecture code in violation of EULA
#asahi-re · 2021-01-15 04:36
davidrysk[m]I expect this to be more a EULA/RE problem than a copyright problem
#asahi-re · 2021-01-15 03:25
davidrysk[m]thanks!
#asahi-re · 2021-01-15 03:25
davidrysk[m]cool :)
#asahi-re · 2021-01-15 03:03
davidrysk[m]it might be totally ok
#asahi-re · 2021-01-15 03:03
davidrysk[m]yeah just run it by marcan if he doesn't see this
#asahi-re · 2021-01-15 03:00
davidrysk[m]the only reason you'd need the symbol list is to figure out which symbols to call, but if they're plain llvm symbols and you can use llvm headers...
#asahi-re · 2021-01-15 02:47
davidrysk[m]whether listing exported symbols counts as decompiling/disassembliong
#asahi-re · 2021-01-15 02:46
davidrysk[m]Yeah, marcan will have to comment on that
#asahi-re · 2021-01-15 02:45
davidrysk[m]Hm well you're not decompiling or disassembling their llvm
#asahi-re · 2021-01-15 02:41
davidrysk[m]TellowKrinkle: I see you're here ^^ see above :)
#asahi-re · 2021-01-15 02:37
davidrysk[m]https://github.com/AsahiLinux/docs/issues/2 -- isn't this explicitly forbidden by policy?
#asahi-re · 2021-01-14 16:34
davidrysk[m]there's one new export in libbootpolicy.dylib, related to mdm
#asahi-re · 2021-01-14 16:34
davidrysk[m]-k has always been there
#asahi-re · 2021-01-11 17:42
davidrysk[m]well, will iBoot boot a simpler Mach-O that doesn't have all this crap?
#asahi-re · 2021-01-11 17:24
davidrysk[m]hm
#asahi-re · 2021-01-11 17:24
davidrysk[m]https://www.hex-rays.com/wp-content/static/tutorials/xnu_debugger_primer/xnu_debugger_primer.html
#asahi-re · 2021-01-11 17:22
davidrysk[m](latest Xcode works with macOS 10.15.x fwiw)
#asahi-re · 2021-01-11 17:21
davidrysk[m]probably is that your local macOS (or your Xcode) is outdated
#asahi-re · 2021-01-11 17:21
davidrysk[m]my otool is fine with that
#asahi-re · 2021-01-11 17:15
davidrysk[m](usually are **)
#asahi-re · 2021-01-11 17:15
davidrysk[m]that looks handy (just note that his tools are proprietary licensed)
#asahi-re · 2021-01-11 17:13
davidrysk[m](which file?)
#asahi-re · 2021-01-11 17:13
davidrysk[m]Shiz: the img4?
#asahi-re · 2021-01-11 17:11
davidrysk[m]mach-o support in objdump is incomplete, otool (from apple's cctools) is more complete
#asahi-re · 2021-01-11 17:02
davidrysk[m]Shiz: yes, but does it use kernelcache for configure-boot --custom-boot-object? the documentation for that specifically states that you use that to load a mach-o
#asahi-re · 2021-01-11 17:01
davidrysk[m]without the configure-boot option in kmutil we can't test :)
#asahi-re · 2021-01-11 17:01
davidrysk[m]question I have: will iBoot load a mach-o that has an LC_MAIN pointing to the entry point?
#asahi-re · 2021-01-11 16:59
davidrysk[m]the mach-of file for the kernel is at /System/Library/Kernels and doesn't look wrapped in an asn.1 to me
#asahi-re · 2021-01-11 16:59
davidrysk[m]my point though: kmutil is probably what wraps it into an asn.1

plus ›