#asahi-dev · 2022-07-22 17:51
marcanManouchehri: the firstboot script changes them#asahi-dev · 2022-07-22 10:45
marcanmacos VMs are offtopic though#asahi-dev · 2022-07-22 10:44
marcanpretty sure that's by design#asahi-dev · 2022-07-22 10:43
marcanbecause VMs are insecure, no real SEP/etc#asahi-dev · 2022-07-22 10:42
marcanwent through the chain, HV -> usbmon -> cdc-acm driver and now I've arrived at tty as the likely culprit...#asahi-dev · 2022-07-22 10:42
marcanthe annoying thing was tracing it through the stack, because it would just hang and I was at first convinced it was my fault (e.g. something in the HV speculating into bad memory and crashing)#asahi-dev · 2022-07-22 10:42
marcanit was killing most of my hypervisor runs...#asahi-dev · 2022-07-22 10:41
marcanat least this one is easy#asahi-dev · 2022-07-22 10:41
marcanouch, that sounds painful#asahi-dev · 2022-07-22 10:38
marcanouch#asahi-dev · 2022-07-22 10:37
marcanjust need to set up a silly chain of 3 systems when I get home to debug this (host to test, target to run kernels on, second target to run proxyclient against :))#asahi-dev · 2022-07-22 10:37
marcanat least I have an easy reproducer now (repeatedly readmem()ing a certain size in m1n1 triggers it in seconds)#asahi-dev · 2022-07-22 10:36
marcanand it wouldn't at all be surprising if it only hits M1s with their massive reorder buffers#asahi-dev · 2022-07-22 10:35
marcandeep in the tty layer bowels there's a ton of atomics/acquire/release nonsense which smells to me like it probably has a bug somewhere#asahi-dev · 2022-07-22 10:35
marcanthe tty layer does some stuff then queues some work in a workqueue, and doing that twice with a barrier in between seems to fix the bug. but I suspect the problem is the stuff, not the workqueue ordering now.#asahi-dev · 2022-07-22 10:34
marcanyup#asahi-dev · 2022-07-22 10:34
marcanyeah, that rings a bell#asahi-dev · 2022-07-22 10:32
marcanback to suspecting the tty layer then#asahi-dev · 2022-07-22 10:31
marcanso unless I got something subtly wrong there, this isn't the bug#asahi-dev · 2022-07-22 10:31
marcanah, but we do have an atomic release which shold be creating this ordering#asahi-dev · 2022-07-22 10:26
marcanthat sounds like a bug...#asahi-dev · 2022-07-22 10:26
marcanmaz: I don't think we do anything in AIC to ensure memory ordering of regular stores with IPIs, we only do all the fine grained ordering of the AIC driver's internal stuff#asahi-dev · 2022-07-22 10:25
marcan dmb(ishst);#asahi-dev · 2022-07-22 10:25
marcan * other CPUs before they observe us issuing the IPI.#asahi-dev · 2022-07-22 10:25
marcan */#asahi-dev · 2022-07-22 10:25
marcan * Ensure that stores to Normal memory are visible to the#asahi-dev · 2022-07-22 10:25
marcan /*#asahi-dev · 2022-07-22 10:25
marcanthe GIC driver has this#asahi-dev · 2022-07-22 10:25
marcanactually, this might be AIC...#asahi-dev · 2022-07-22 10:16
marcananyway, too busy with random stuff right now, I'll revisit this one later#asahi-dev · 2022-07-22 10:16
marcanI suspect it might have something to do with the workqueue getting scheduled before the buffer kick is visible to the other CPU, but I'm not sure if workqueue scheduling is supposed to implicitly have a memory barrier#asahi-dev · 2022-07-22 10:15
marcancould even be an issue in my AIC driver, but then I'd be surprised it doesn't break something else#asahi-dev · 2022-07-22 10:15
marcanremains to be seen where the real problem lies#asahi-dev · 2022-07-22 10:15
marcanas a workaround I duplicated the tty kick in the ACM driver with a memory barrier in between and that fixed it#asahi-dev · 2022-07-22 10:14
marcanpcc: no, it's not about tty cooking stuff, it just outright buffers/does not deliver some USB packets#asahi-dev · 2022-07-20 16:57
marcanbad idea :)#asahi-dev · 2022-07-20 16:57
marcankettenis: yes, if you map memory that can SError CPU speculation will randomly run into it#asahi-dev · 2022-07-18 09:15
marcanmaybe I can just drop the /boot/efi dependency, make the vendorfw update unit do its own ESP lookup/mounting, and make it run before udev as a whole#asahi-dev · 2022-07-18 09:13
marcanI need either a more reliable way to block those devices from loading automatically until after the vendorfw update, or to move it to the initramfs...#asahi-dev · 2022-07-18 09:13
marcanissue I just noticed: sometimes brcmfmac/hci load before the vendor firmware is loaded on firstboot. I think it might happen because pcie comes up late and triggers a udev event, even though coldplug hasn't asked for non-block devices yet.#asahi-dev · 2022-07-18 09:12
marcanok, going to push a new release#asahi-dev · 2022-07-17 21:19
marcananyway, not critical for tomorrow#asahi-dev · 2022-07-17 21:19
marcanwonder if we can get some boot policy info in the ADT...#asahi-dev · 2022-07-17 21:19
marcan(or maybe this changed?)#asahi-dev · 2022-07-17 21:19
marcanotherwise, I'll have to think of something else#asahi-dev · 2022-07-17 21:18
marcanbut I need to double check that... if it at least filters -v from the boot-args string, I can switch to that#asahi-dev · 2022-07-17 21:18
marcannot that it matters much right now, without proper secure boot#asahi-dev · 2022-07-17 21:18
marcanalso I just realized that the boot-args filtering doesn't actually stop -v from working to change display mode... which does kind of break the security of my little trick there#asahi-dev · 2022-07-17 21:15
marcandev installer live, looks like it works well on M2 (no more first boot touchpad bork)#asahi-dev · 2022-07-17 19:59
marcanuploading images