Page MenuHomeFreeBSD

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

Authored by dumbbell on Sun, Jul 12, 4:35 PM.
Tags
None
Referenced Files
F162724895: D58195.id181843.diff
Thu, Jul 16, 4:37 AM
Unknown Object (File)
Wed, Jul 15, 11:16 AM
Unknown Object (File)
Tue, Jul 14, 9:37 PM
Unknown Object (File)
Mon, Jul 13, 8:58 PM
Unknown Object (File)
Mon, Jul 13, 8:31 AM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
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