2021-07-22
00:37quarkyalice_ has quit [Ping timeout: 480 seconds]
00:37quarkyalice has joined #asahi
01:09cth451_desktop has quit [Remote host closed the connection]
01:10quarkyalice has quit [Ping timeout: 480 seconds]
01:20jabashque has quit [Quit: Connection closed for inactivity]
01:22riker77_ has joined #asahi
01:27riker77 has quit [Ping timeout: 480 seconds]
01:27riker77_ is now known as riker77
02:18quarkyalice has joined #asahi
02:23PhilippvK has joined #asahi
02:26phiologe has quit [Ping timeout: 480 seconds]
02:27yuyichao has joined #asahi
03:26quarkyalice has quit [Ping timeout: 480 seconds]
04:03Emantor has quit [Quit: ZNC - http://znc.in]
04:04Emantor has joined #asahi
05:02roxfan2 has joined #asahi
05:03roxfan has quit [Ping timeout: 480 seconds]
05:41chadmed has quit [Remote host closed the connection]
05:42chadmed has joined #asahi
05:50chadmed has quit [Remote host closed the connection]
05:50chadmed has joined #asahi
06:04cth451_desktop has joined #asahi
11:49chadmed has quit [Quit: Konversation terminated!]
12:57Scott[m]1 has joined #asahi
13:41jbowen has quit [Quit: leaving]
13:51yuyichao has quit [Ping timeout: 480 seconds]
14:23bps has quit [Ping timeout: 480 seconds]
14:25jbowen has joined #asahi
14:57bps has joined #asahi
15:16jbowen has quit [Quit: leaving]
15:42jbowen has joined #asahi
16:09cth451_desktopsven: thanks for the heads-up. I did not reserve space for root on the SSD as I have already alloc'd a iSCSI LUN for it.
16:40cth451_desktopAre there any gotchas for the initramfs loaded via m1n1? I'm sideloading a valid initrd that worked on other arm64 machines but on M1 it's reporting ENOENT for /bin/init.
16:52marcancth451_desktop: define sideloading? there was code recently added to add the SEPFW to the initrd, maybe that is broken or maybe the initrd you used doesn't work and that's all there is :)
16:55marcanI remember poring over the linux initrd uncompress code until I made sense of this for ps4-kexec
16:57cth451_desktopmarcan: Uncompressed initrd triggers a memory allocation failure in m1n1
16:57cth451_desktop170MiB (an entire recoery environment with iSCSI initator and such), and yes loaded via linux.py
17:00cth451_desktopOne second, sideloading one now as I don't remember the details
17:01marcanthough yeah, m1n1 heap is 128MB and the cpio code started allocating the entire initramfs there again I think
17:05cth451_desktopTTY> dlmalloc: out of memory
17:05cth451_desktopthen the system reboots
17:07cth451_desktopa dirty hack for sure, but is there a way to just make the heap slightly larger?
17:08bps has quit [Ping timeout: 480 seconds]
17:09marcananyway the way the cpio code does the re-malloc of the initrd kind of defeats the purpose of all the careful memory management in payload.c, so I want to redo that
17:10marcanfor payloads we should pre-alloc some space and just memmove; for linux.py, it should just deal with it in python and basically do the same thing
17:18marcanbut I could see this mechanism being part of keeping DCP safe from the AP, with something else constraining it to only its firmware area
17:21quarkyalice has joined #asahi
17:24svensoo.. i don't really know how this DAPF thing works but i believe it's an additional filter behind the DART
17:42cth451_desktopI'm not entirely sure whether bumping the heap to 512M changed anything.
17:43cth451_desktopThe kernel still can't find init
17:46cth451_desktopmarcan: thanks
17:46marcanalso another thing to check is that the kernel is built for the compression method you are using
17:47marcanyou can also test the payload codepath by doing `cat m1n1.macho devtree.dtb initramfs.cpio.gz kernel > m1n1.payload.macho` and doing a chainload.py to that; that should also work
17:49kettenis has joined #asahi
17:50cth451_desktopThe kernel is in fact a general purpose distro kernel
17:50cth451_desktop(plus patches)
17:50cth451_desktop(where we use on SBSA servers)
17:51cth451_desktopdefaults to gzipped initrds, but also configured to work with zstd and xz as well
17:51kettenisInstead of putting the SEPFW in the initrd, can't we just pass its address and size along in the device tree somehow?
17:54kettenisI suspect that modifying initrd isn't going to play nice with distros that sign the initrd
17:59robherIs SEPFW something that could be extracted and put into linux-firmware? I'd assume distros put at least some of linux-firmware into their initrds.
18:01marcanrobher: no, we do not have a license to it and I'm pretty sure it's paired with things, plus encrypted
18:01svenpeter[m]Sepfw itself is encrypted and I believe paired with the machine
18:01marcanwe can't distribute any of the firmwares. so far everything is preloaded by iBoot except SEPFW (which is passed in RAM), things in auxiliary Flash memories (which we don't touch), and the stupid broadcom wifi thing
18:02svenpeter[m]It also needs two more blobs that are essentially hashes of iBoot,etc. which are definitely paired to the machine
18:02marcanfor the latter, we'll have to make our installer pull it out of macos and stuff it in /boot or something, where the OS can then copy it out or directly use it
18:04marcanthe licensing situation is basically that every machine owner has a license to macos by definition, but we don't have a license to redistribute anything
18:04marcanso our installer will take care of downloading the bits we need from Apple's CDN and doing whatever it needs to do
18:04marcanwe won't distribute anything ourselves, and I highly doubt Apple will object to this usage (it's equivalent to installing macOS normally and then erasing most of it)
18:06cth451_desktopkettenis: distros don't usually sign initrds. the initrd images are usually generated on the fly when new kernels or other modification request so.
18:07AlessandroFerrari[m]i think fedora does too right?
18:08cth451_desktopI believe they only sign the kernel and associated modules? I could be wrong though.
18:09cth451_desktopAlso makes life harder for sysadmins
18:11cth451_desktopThe point here is, initrds are per-machine specific and it kind of defeats the purpose to sign initrd locally (since whoever got access to the hardware would presumably have access to private keys on the system)
18:12cth451_desktopSince RH/fedora distributes their kernel and users use the modules and images verbatim, the signatures are actually tamper proof seals since end-users don't have the siging keys
18:13cth451_desktopEmbedded devices are another story though. Vendors who distributes pre-compiled kernel images and initrds may choose to sign them if they are not supposed to be user-modifiable
18:13cth451_desktop(for example most android devices)
18:17kettenisso the node in /reserved-memory basically just needs am appropriate compatible string and a reg property
18:35quarkyalice has quit [Ping timeout: 480 seconds]
18:51quarkyalice has joined #asahi
19:16quarkyalice has quit [Ping timeout: 480 seconds]
19:25quarkyalice has joined #asahi
20:08quarkyalice has quit [Quit: Leaving]
21:22reillyeon4 has joined #asahi
21:22reillyeon has quit [Quit: Ping timeout (120 seconds)]
21:22reillyeon4 is now known as reillyeon
22:07arekm has quit [Remote host closed the connection]
22:07arekm has joined #asahi