On Thu, Nov 26, 2026 at 11:11:10AM +0000, Tvrtko Ursulin wrote: > Syncobj IGT pass, light gaming and light desktop as well, and there are no > kmemleak reports. Nevertheless this version is a bit more invasive so if the > approach is looking good a careful review will be required.
Tested patches 1-6 plus v2 of 7/7 on v7.4-rc4 (x86_64, KASAN + KASAN_STACK, lockdep, kmemleak, failslab/fail_page_alloc/fail_usercopy, virtio-gpu in QEMU), base and patched with the same config: - IGT syncobj_basic, syncobj_wait, syncobj_timeline: 202/202 on both, identical per subtest, dmesg clean. - The targeted test from the previous version, 1..8 handles on all six array ioctls (success, -ENOENT at every position, -EFAULT for bad / partially unmapped handle and point arrays, sw_sync and WAIT_FOR_SUBMIT wake-ups, -ETIME / -EINTR followed by late signalling, 20 s stress), and 1M handles OK / 1M + 1 -EINVAL: all pass on both, no splats, kmemleak clean. - Since the error paths are what changed most, I also ran every ioctl with n = 1, 2, 4, 5, 8 under fail-nth, failing each allocation / user copy in turn (~340 injected faults on the patched kernel, among them partial dma_fence_chain_alloc() in timeline_signal and the kvzalloc / vmemdup fallbacks above 4 entries), plus blocking WAIT_FOR_SUBMIT waits the same way. Every call returns -ENOMEM / -EFAULT or succeeds, each syncobj can be destroyed exactly once afterwards, no KASAN report, kmemleak clean. Same on base. A NULL handles pointer still gives -EFAULT, and a NULL points pointer behaves the same as before for n = 1..8. - Every patch builds with W=1 and sparse clean, i386 too. So whatever the outcome of the discussion on 2-5, the scoped conversion did not introduce any error path bug in my testing. On points when user_points is NULL (2/7 and 4/7): with 7/7 that is a memset of at most 32 bytes on the stack for n <= 4, so skipping it only matters for the slow path. Stack (KASAN build, so inflated): the wait path goes from 640 to 1160 bytes (wait_ioctl 184 -> 296, array_wait_timeout 280 -> 688), timeline_signal_ioctl 224 -> 472, the other ioctls +104..+112, array_find 88 -> 224. Tested-by: Fei Yu <[email protected]> Thanks, Fei
