Page MenuHomeFreeBSD

linuxkpi: Fix set_memory_*
ClosedPublic

Authored by tijl on May 2 2024, 9:01 AM.
Tags
None
Referenced Files
F163533925: D45057.diff
Fri, Jul 24, 5:33 AM
F163485982: D45057.id138010.diff
Thu, Jul 23, 4:39 PM
Unknown Object (File)
Thu, Jul 23, 5:06 AM
Unknown Object (File)
Tue, Jul 21, 6:30 AM
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)
Jun 22 2026, 11:50 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