#asahi · 2025-12-17 09:54
pitustmy guess is that during firmware boot it writes logs or something into the buffer#asahi · 2025-12-17 09:53
pitusthttps://paste.sr.ht/~pitust/fdc7bea24b10bd60c568cf308d9c326b1584034c#asahi · 2025-12-17 09:49
pitustso i guess depending on *something*, the device may decide to make an oversized packet in some cases?#asahi · 2025-12-17 09:47
pitust(it takes a length from a received packet from apple_z2, and then passes it with no size checks into spi_read as a length...)#asahi · 2025-12-17 09:46
pitustuuuuuuuuuh. that feels wrong: https://elixir.bootlin.com/linux/v6.17.7/source/drivers/input/touchscreen/apple_z2.c#L145#asahi · 2025-12-17 09:37
pitustso yeah i figure there is a pretty good chance it's the same issue#asahi · 2025-12-17 09:36
pitustchaos_princess: I decided to even build a kernel with KASAN because I was hitting mysterious memory corruption (but not around driver load, which could just be random chance)#asahi · 2025-12-17 09:35
pitustand yeah it has been incredibly helpful at telling me which driver was at fault#asahi · 2025-12-17 09:35
pitustjn: I already *did* compile with KASAN#asahi · 2025-12-17 09:28
pitusti hope i don't have to build a new kernel with more debug prints around the driver to figure out what is going on (because that took *forever*)#asahi · 2025-12-17 09:28
pitustthis bug doesn't seem to be super exploitable, but it's a kernel oob write (with what looks like uncontrolled data), so... yeah#asahi · 2025-12-17 09:21
pitusti see#asahi · 2025-12-17 09:19
pitustHi! I hit a kernel bug (KASAN: slab-out-of-bounds) in spi_apple. Has this been fixed in newer kernels or should I try looking into making a fix?#asahi · 2025-03-07 09:16
pitustyeah no worries#asahi · 2025-03-07 09:15
pitustthanks!#asahi · 2025-03-07 09:15
pitustjannau already fixed it#asahi · 2025-03-07 09:15
pitustah#asahi · 2025-03-07 09:15
pitustthere is a from_err_ptr there which wasnt there in the main branch#asahi · 2025-03-07 09:15
pitustoh wait#asahi · 2025-03-07 09:15
pitustj`ey: yeah#asahi · 2025-03-07 09:13
pitustyeah#asahi · 2025-03-07 09:13
pitusti think#asahi · 2025-03-07 09:13
pitustthe error i triggered is -ENOSPC btw#asahi · 2025-03-07 09:12
pitust(j`ey)#asahi · 2025-03-07 09:12
pitustkernel::drm::gem::shmem::Object::new#asahi · 2025-03-07 08:52
pitustjannau: comparing to other drivers is a way of showing that the function return an error pointer :P#asahi · 2025-03-07 00:35
pitustyou can see that non-rust drm drivers check the ERR_PTR correctly#asahi · 2025-03-07 00:34
pitustthe specific error that it fails with is -ENOSPC#asahi · 2025-03-07 00:34
pitustjannau: yes, i did, by writing broken code using vulkan #asahi · 2025-03-07 00:34
pitustbgtlover[mds]: it oopses, not crashes#asahi · 2025-03-06 19:43
pitustThere seems to be a null deref bug in the implementation of kernel::drm::gem::shmem::Object::new (rust/kernel/drm/drv.rs, seems to be downstream and i have *no idea* which upstream it comes from) due to a missing ERR_PTR check#asahi · 2025-02-23 18:46
pitusti'm having some weird issues with the m1 gpu (vulkan) driver. so i'm writing a bad gpu raytracer in a compute shader, but it seems like whenever i tell it to raytrace, the GPU hangs until the raytracer finishes. is this lack of GPU preemption a known issue?#asahi · 2025-01-17 21:31
pitustThis doesn't seem to match my understanding of the apple M1 PMC? Which appears to support them just fine#asahi · 2025-01-17 21:31
pitustI'm having some trouble with profling a KVM virtual machine; perf kvm record fails with 'apple_firestorm_pmu/cycles/Pu: PMU Hardware doesn't support sampling/overflow-interrupts'#asahi · 2025-01-17 09:29
pitustbmc77: macOS would be better; linux does not have support for ANE at the moment#asahi · 2025-01-17 09:28
pitustnice9cel: DTrace works, so, yes, eBPF is supported#asahi · 2025-01-16 23:24
pituster, virtual timer, not physical#asahi · 2025-01-16 23:23
pitustSetting it to *any* lower value does not#asahi · 2025-01-16 23:22
pitustBackground: i'm debugging an OS, and resetting the physical timer threshold to 0xffff...ffff (which the arm spec says "might never trigger", makes the interrupt trigger constantly#asahi · 2025-01-16 23:21
pitustIs there any known M1/arm non-compliance issues around physical timers/vGIC?#asahi · 2024-03-20 22:46
pitustas in, do they just lock the registers or what#asahi · 2024-03-20 22:46
pitustis the bootrom exploit required?#asahi · 2024-03-20 22:45
pitustthe CPU can't be demoted? iirc that's a thing on iphones#asahi · 2024-03-20 22:45
pitustoh, that's a pity#asahi · 2024-03-20 22:40
pitustit seems that the physical stuff looks quite close?#asahi · 2024-03-20 22:40
pitusti wonder if it would be possible to do SWD with a CS#asahi · 2024-03-20 22:36
pitustyes, it does#asahi · 2024-03-20 22:34
pitustmaz: yeah, m1n1 does output properly. i assumed iBoot would print stuff to uart? but apparantly no, that's not a thing#asahi · 2024-03-20 18:13
pitusti love iboot#asahi · 2024-03-20 18:13
pitustohh nevermind