Page MenuHomeFreeBSD

linuxkpi: Fix set_memory_*
ClosedPublic

Authored by tijl on May 2 2024, 9:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 20, 4:09 AM
Unknown Object (File)
Mon, Nov 17, 6:22 AM
Unknown Object (File)
Sat, Nov 8, 4:49 AM
Unknown Object (File)
Tue, Nov 4, 11:04 PM
Unknown Object (File)
Sun, Nov 2, 8:46 PM
Unknown Object (File)
Thu, Oct 30, 12:22 PM
Unknown Object (File)
Wed, Oct 29, 10:36 AM
Unknown Object (File)
Wed, Oct 29, 9:32 AM

Details

Summary

set_memory_* is currently implemented using PHYS_TO_DMAP but not all
architectures have a DMAP. Looking at how this function is used the
given address isn't physical, but virtual so the PHYS_TO_DMAP call
can simply be removed.

Also cast numpages before shifting it to avoid overflow.

Diff Detail

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