Page MenuHomeFreeBSD

linuxkpi: Fix set_memory_*
ClosedPublic

Authored by tijl on May 2 2024, 9:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jul 18, 6:44 AM
Unknown Object (File)
Fri, Jul 17, 2:28 AM
Unknown Object (File)
Sat, Jul 11, 11:31 AM
Unknown Object (File)
Mon, Jun 22, 11:50 PM
Unknown Object (File)
May 4 2026, 6:38 AM
Unknown Object (File)
May 3 2026, 4:18 PM
Unknown Object (File)
Apr 28 2026, 6:49 AM
Unknown Object (File)
Apr 25 2026, 11:24 PM

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