Page MenuHomeFreeBSD

budsma: fix boundary alignment test
ClosedPublic

Authored by dougm on Jan 1 2022, 11:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 13, 5:33 AM
Unknown Object (File)
Mon, Sep 29, 8:29 PM
Unknown Object (File)
Tue, Sep 16, 12:10 AM
Unknown Object (File)
Sep 14 2025, 12:42 PM
Unknown Object (File)
Sep 13 2025, 2:50 AM
Unknown Object (File)
Aug 31 2025, 3:13 AM
Unknown Object (File)
Aug 3 2025, 4:00 AM
Unknown Object (File)
Jul 27 2025, 1:45 AM

Details

Summary

c606ab59e7f9 vm_extern: use standard address checkers everywhere

broke a check in _bus_dmamap_addseg on many architectures. This change makes it clear that it is not a particular range that is being boundary-checked, but the proposed union of the two adjacent ranges.

Diff Detail

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

Event Timeline

dougm requested review of this revision.Jan 1 2022, 11:48 PM

Looks good to me:

increase current segment by sgsize bytes if

  • curraddr is contiguous to the end of the segment,
  • adding sgsize will not cause maxsegsz to be exceeded, and
  • start address plus increased segment length will still pass the boundary check.
This revision is now accepted and ready to land.Jan 2 2022, 1:23 PM
This revision was automatically updated to reflect the committed changes.