Page MenuHomeFreeBSD

[ppc64] prevent infinite loop on icache sync
ClosedPublic

Authored by luporl on Feb 11 2019, 6:13 PM.

Details

Summary

At moea64_sync_icache(), when the 'va' argument has page size
alignment, round_page() will return the same value as 'va'.
This would cause 'len' to be 0 and thus an infinite loop.

With this change, 'lim' will always point to the next page boundary.

This issue occurred especially during debugging sessions, when a breakpoint
was placed on an exact page-aligned offset, for instance.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

luporl created this revision.Feb 11 2019, 6:13 PM
luporl edited the summary of this revision. (Show Details)Feb 11 2019, 6:41 PM
luporl added reviewers: jhibbits, nwhitehorn.
luporl edited the summary of this revision. (Show Details)Feb 11 2019, 6:49 PM
jhibbits accepted this revision.Feb 11 2019, 8:00 PM
This revision is now accepted and ready to land.Feb 11 2019, 8:00 PM
This revision was automatically updated to reflect the committed changes.