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, Mar 7, 7:06 PM
Unknown Object (File)
Wed, Mar 4, 12:30 AM
Unknown Object (File)
Sun, Mar 1, 4:43 AM
Unknown Object (File)
Tue, Feb 24, 8:55 AM
Unknown Object (File)
Feb 8 2026, 8:40 AM
Unknown Object (File)
Feb 7 2026, 10:17 PM
Unknown Object (File)
Feb 2 2026, 6:12 AM
Unknown Object (File)
Jan 31 2026, 11:33 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