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
F176393661: D58195.id181843.diff
Sun, Oct 18, 12:50 PM
Unknown Object (File)
Sat, Oct 17, 2:50 PM
Unknown Object (File)
Tue, Oct 13, 7:32 PM
Unknown Object (File)
Fri, Oct 9, 3:11 AM
Unknown Object (File)
Thu, Oct 8, 9:19 PM
Unknown Object (File)
Thu, Oct 8, 7:06 PM
Unknown Object (File)
Wed, Oct 7, 8:12 PM
Unknown Object (File)
Mon, Oct 5, 9:12 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