diff options
| author | Samuel Moelius <sam.moelius@trailofbits.com> | 2026-06-28 15:23:32 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@nvidia.com> | 2026-07-13 10:51:05 -0300 |
| commit | 4132ba2ae2cf14c289e3fabc1c95ac244d643356 (patch) | |
| tree | 96fdd969e8ca8cb0fb24c1e6a3a32d6b2a84fafe /tools/perf/scripts/python | |
| parent | a13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff) | |
iommufd/selftest: Avoid selftest dirty bitmap size wrap
IOMMU_TEST_OP_DIRTY sizes its temporary dirty bitmap from length /
page_size. Very large selftest ranges can make the DIV_ROUND_UP()
additions wrap before allocation, producing a zero-length allocation while
the later test_bit() loop still walks the original number of bits.
The selftest helper does not need to support unbounded dirty bitmap sizes.
Reject requests that would allocate more than SZ_16M for the temporary
buffer.
Fixes: 79ea4a496ab5 ("iommufd/selftest: Fix buffer read overrrun in the dirty test")
Link: https://patch.msgid.link/r/20260628152331.82122.408afd7b466c.iommufd-test-dirty-bitmap-size-wrap@trailofbits.com
Assisted-by: Codex:gpt-5.5-cyber-preview
Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
