Page MenuHomeFreeBSD

linux: Unmap the VDSO page when unloading
ClosedPublic

Authored by markj on Feb 15 2021, 11:45 PM.
Tags
None
Referenced Files
F102550394: D28696.diff
Wed, Nov 13, 10:41 PM
F102542512: D28696.id83980.diff
Wed, Nov 13, 8:08 PM
Unknown Object (File)
Sun, Nov 10, 10:31 AM
Unknown Object (File)
Sun, Nov 10, 7:43 AM
Unknown Object (File)
Sun, Nov 10, 6:08 AM
Unknown Object (File)
Sun, Nov 10, 12:03 AM
Unknown Object (File)
Sat, Nov 9, 10:10 PM
Unknown Object (File)
Sat, Nov 9, 1:57 PM

Details

Summary

linux_shared_page_init() creates an object and grabs and maps a single
page to back the VDSO. When destroying the VDSO object, we failed to
destroy the mapping and free KVA.

Test Plan

Load and unload linux.ko and linux64.ko.

Noticed when working on Jeff's vm_object patches.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37042
Build 33931: arc lint + arc unit

Event Timeline

markj added reviewers: trasz, kib.
This revision is now accepted and ready to land.Feb 16 2021, 1:42 AM
This revision was automatically updated to reflect the committed changes.

https://ci.freebsd.org/job/FreeBSD-main-i386-build/19172/console shows:

13:07:49 --- all_subdir_linux ---
13:07:49 /usr/src/sys/i386/linux/linux_sysvec.c:941:54: error: too few arguments to function call, expected 2, have 1
13:07:49 __elfN(linux_shared_page_fini)(linux_shared_page_obj);
13:07:49 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^

https://ci.freebsd.org/job/FreeBSD-main-i386-build/19172/console shows:

13:07:49 --- all_subdir_linux ---
13:07:49 /usr/src/sys/i386/linux/linux_sysvec.c:941:54: error: too few arguments to function call, expected 2, have 1
13:07:49 __elfN(linux_shared_page_fini)(linux_shared_page_obj);
13:07:49 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^

Thanks, fixed.