Page MenuHomeFreeBSD

nvme: Use memcpy instead of memmove in nvme_cdata_get_disk_ident
ClosedPublic

Authored by jhb on Nov 20 2025, 2:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 14, 11:46 AM
Unknown Object (File)
Tue, Jan 13, 7:55 AM
Unknown Object (File)
Dec 27 2025, 2:04 AM
Unknown Object (File)
Dec 22 2025, 11:51 PM
Unknown Object (File)
Dec 11 2025, 8:02 AM
Unknown Object (File)
Dec 2 2025, 1:16 PM
Unknown Object (File)
Nov 30 2025, 1:57 AM
Unknown Object (File)
Nov 27 2025, 6:19 PM
Subscribers

Details

Summary

These buffers should not overlap.

Diff Detail

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

Event Timeline

jhb requested review of this revision.Nov 20 2025, 2:52 PM

memmove -> memcpy is the right thing because sn and cddata->sn can't possibly overlap.

sys/dev/nvme/nvme.h
31–32

This is OBE. I committed, without review, this change earlier today. I had missed this review until I was doing a deep-dive into my unread email. mea culpa.

This revision is now accepted and ready to land.Nov 26 2025, 3:02 AM
sys/dev/nvme/nvme.h
31–32

No worries.

jhb retitled this revision from nvme: Small cleanups to <dev/nvme/nvme.h> to nvme: Use memcpy instead of memmove in nvme_cdata_get_disk_ident.Dec 2 2025, 3:56 PM
jhb edited the summary of this revision. (Show Details)