Page MenuHomeFreeBSD

linuxkpi: Update `struct vm_area_struct` when an existing mapping is extended
ClosedPublic

Authored by dumbbell on Jul 12 2026, 4:35 PM.
Referenced Files
F173201969: D58195.id186157.diff
Thu, Sep 24, 6:41 AM
F173127456: D58195.diff
Wed, Sep 23, 7:23 PM
F173114664: D58195.diff
Wed, Sep 23, 5:28 PM
Unknown Object (File)
Mon, Sep 21, 2:07 PM
Unknown Object (File)
Mon, Sep 21, 2:05 PM
Unknown Object (File)
Sat, Sep 19, 11:11 PM
Unknown Object (File)
Sat, Sep 19, 3:56 AM
Unknown Object (File)
Thu, Sep 17, 4:57 PM
Subscribers

Details

Summary

With Mesa 26 and DRM drivers in Linux 6.13, userspace will try to extend an existing mmap, at last push the end address further.

Before this change, the mapping was not updated, but userspace would try to access a page after the initial end address, leading to a panic triggered by the following assertion in vm_fault_populate():

MPASS(fs->first_pindex <= pager_last);

Sponsored by: The FreeBSD Foundation

Test Plan

Without this patch, I get a panic when I start sway with the Vulkan renderer (WLR_RENDERER=vulkan).

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped