Page MenuHomeFreeBSD

pmap: prefer memcpy over bcopy
ClosedPublic

Authored by brooks on Jun 19 2026, 9:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 15, 7:27 AM
Unknown Object (File)
Wed, Jul 15, 7:27 AM
Unknown Object (File)
Sat, Jul 4, 2:56 AM
Unknown Object (File)
Thu, Jul 2, 7:49 AM
Unknown Object (File)
Thu, Jun 25, 7:33 PM
Unknown Object (File)
Thu, Jun 25, 7:30 PM
Unknown Object (File)
Thu, Jun 25, 1:10 PM
Unknown Object (File)
Wed, Jun 24, 6:20 PM
Subscribers

Details

Summary

Alter pmap_copy_page(s) to use memcpy rather than the deprecated bcopy.
We'll be adding non-provenance preserving versions for CHERI support and
wouod like to avoid introducing variants of deprecated APIs.

Suggested by: emaste
Sponsored by: Innovate UK

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 74033
Build 70916: arc lint + arc unit

Event Timeline

amd64 is fine, but there are tons of bcopy use in amd64/amd64/*.c. Why is it fine for them to stay with bcopy? Or put it differently, why amd64 is affected at all?

This revision is now accepted and ready to land.Jun 20 2026, 11:01 AM
In D57687#1322718, @kib wrote:

amd64 is fine, but there are tons of bcopy use in amd64/amd64/*.c. Why is it fine for them to stay with bcopy? Or put it differently, why amd64 is affected at all?

My aim was to eliminate bcopy in pmap_copy_page(s) in a consistent way. It seemed appropriate to replace the small number of remaining bcopies in the same file.

For some reason this failed to auto close. I've manually linked rG2ee2ef607f60.