#asahi-dev · 2021-08-28 06:36
marcanleaking kernel VAs breaks kASLR if a copro is compromised, and apple are big on kASLR, so that is definitely not intended#asahi-dev · 2021-08-28 06:35
marcanremember this is an API that used to be local that has been shoved across a CPU boundary#asahi-dev · 2021-08-28 06:35
marcanit's probably completely ignored#asahi-dev · 2021-08-28 06:35
marcanI only had that in because copypasta :p#asahi-dev · 2021-08-28 06:35
marcanyes, I fully expected the swap_start pointer to be total BS#asahi-dev · 2021-08-28 06:34
marcanso evidently they don't *intend* to leak kernel pointers#asahi-dev · 2021-08-28 06:34
marcanthe marshaling code turns them into a bool to signify non-nullness and then on the other side puts back the pointer to the preceding structure#asahi-dev · 2021-08-28 06:33
marcanif you look at IOSurface - those 64-bit bools are hidden pointers to the previous embedded fields#asahi-dev · 2021-08-28 06:32
marcan... whether they managed to stick to that is another story#asahi-dev · 2021-08-28 06:32
marcanthe threat model is obviously that copros shouldn't ever see kernel VAs and the kernel shouldn't ever trust copros#asahi-dev · 2021-08-28 06:32
marcanthe answer is always "it was rushed"#asahi-dev · 2021-08-28 06:32
marcandon't try to find rational reasons for the design choices#asahi-dev · 2021-08-28 06:32
marcanalyssa: remember all of this is deadline-driven development#asahi-dev · 2021-08-26 06:44
marcanI agree it smells like a size given where it is, but then all messages have the same type...#asahi-dev · 2021-08-26 06:44
marcan0x103 for crash, 0x104 for translatedva, and apparently 0x108 for allocate?#asahi-dev · 2021-08-26 06:44
marcanI have it as part of the message type#asahi-dev · 2021-08-26 06:44
marcanis that really a size?#asahi-dev · 2021-08-26 06:43
marcanok, so it's a different flow for DCP then#asahi-dev · 2021-08-26 06:20
marcanand already mapped#asahi-dev · 2021-08-26 06:20
marcanthat dva is in an area already allocated by iBoot#asahi-dev · 2021-08-26 06:20
marcanbut that is what happens with osx#asahi-dev · 2021-08-26 06:20
marcanI have no idea why it wants that#asahi-dev · 2021-08-26 06:20
marcanthe request is "TranslateDva", DCP sends you the dva and then (for some reason?) you give it the physaddr#asahi-dev · 2021-08-26 06:20
marcansee m1n1.fw.asc.crash#asahi-dev · 2021-08-26 06:19
marcanthat's not what DCP does :)#asahi-dev · 2021-08-26 06:19
marcanthen where does the dva come from?#asahi-dev · 2021-08-26 06:19
marcanas it already knows it apparently#asahi-dev · 2021-08-26 06:19
marcanfor DCP IIRC it *gives* you the dva when initializing the crashdump endpoint#asahi-dev · 2021-08-26 06:19
marcansven: does the init sequence change?#asahi-dev · 2021-08-26 05:47
marcanthough ANS is special, what with the SART and all#asahi-dev · 2021-08-26 05:47
marcansven: you might know?#asahi-dev · 2021-08-26 05:46
marcanactually I need to see what ANS does for the panic buffer. I know for DCP it *gives* you a DVA that is already mapped, you just translate it (no idea why it needs that)#asahi-dev · 2021-08-26 05:46
marcannot sure if that's just DCP or there are more, but DCP for sure#asahi-dev · 2021-08-26 05:45
marcanthis consequence follows from ASCs that are already running when we boot. those mappings *need* to stay because they could be written to at any time#asahi-dev · 2021-08-26 05:44
marcanwe absolutely need seamless DART mapping takeover; I do not believe DCP initialization can even be done reliably without that, it's not just about the screen flickering#asahi-dev · 2021-08-26 05:44
marcanDART inits first, takes over the mappings race-free, then the DCP driver does whatever whenever#asahi-dev · 2021-08-26 05:44
marcanalyssa: there should be no races involved; it is not a valid solution to try to race setting up a new FB#asahi-dev · 2021-08-26 05:43
marcan(this is documented in the manuals for the similar TI parts)#asahi-dev · 2021-08-26 05:42
marcanonce the system is alive it takes over#asahi-dev · 2021-08-26 05:42
marcanalyssa: there is a specific dead battery flow in the PD controllers; this is a chicken and egg problem in ~all devices#asahi-dev · 2021-08-08 18:39
marcanwe should have feature branches and then a merge branch with the useful ones#asahi-dev · 2021-08-08 18:38
marcanI changed it to rebases only there, though tbh I want to basically obsolete that branch (see what I said on #asahi#asahi-dev · 2021-08-08 18:37
marcansven: oh, asahilinux/linux?#asahi-dev · 2021-08-08 18:33
marcanalyssa: yeah, I can block them, but if this is sven's fork he has the settings#asahi-dev · 2021-07-19 18:50
marcanbasically the hv removes a bunch of nodes for e.g. the USB port it's using, and it has to remove a lot of downstream nodes that depend on them; if the MBP has something the mac mini does not (unsure if it would, I haven't looked) then that could cause a panic if they are left behind#asahi-dev · 2021-07-19 18:49
marcanI really should add a consistency checker for that#asahi-dev · 2021-07-19 18:49
marcanoh yeah, another possibility is that the MBP has extra devtree nodes that need to be removed. broken phandle links in the ADT will make the kernel panic early too#asahi-dev · 2021-07-19 18:48
marcananyway, I need to get some sleep, but hope that helps get you somewhere :)#asahi-dev · 2021-07-19 18:48
marcanIIRC#asahi-dev · 2021-07-19 18:47
marcando note that csrutil will re-enable some of those if you run it after bputil