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
F172648756: D58195.diff
Sat, Sep 19, 11:11 PM
Unknown Object (File)
Sat, Sep 19, 3:56 AM
Unknown Object (File)
Thu, Sep 17, 4:57 PM
Unknown Object (File)
Wed, Sep 16, 7:00 AM
Unknown Object (File)
Tue, Sep 15, 2:58 AM
Unknown Object (File)
Mon, Sep 14, 2:43 PM
Unknown Object (File)
Sun, Sep 13, 9:09 PM
Unknown Object (File)
Sun, Sep 13, 12:39 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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable