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
F173367181: D58195.diff
Fri, Sep 25, 12:00 PM
Unknown Object (File)
Fri, Sep 25, 12:18 AM
Unknown Object (File)
Thu, Sep 24, 6:41 AM
Unknown Object (File)
Wed, Sep 23, 7:23 PM
Unknown Object (File)
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
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