diff options
| author | Andrea Parri <parri.andrea@gmail.com> | 2026-09-25 18:11:37 +0200 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@nvidia.com> | 2026-10-15 13:56:22 -0300 |
| commit | e21952d72b4740f08a272d694cca223b6b0099ca (patch) | |
| tree | 635439b8bf59a2580b4543e97fd29dff4ab590db /scripts/basic/split-include.c | |
| parent | f6b3fd8f573e801066c21b2aec3d2e949e61e48e (diff) | |
| download | linux-next-e21952d72b4740f08a272d694cca223b6b0099ca.tar.gz linux-next-e21952d72b4740f08a272d694cca223b6b0099ca.zip | |
iommufd/iova_bitmap: Ensure that iova_bitmap_set() handles the full IOVA
Generally userspace is going to step the dirty bitmap through the IOVA
space. However if the bitmap ends in the middle of a large PTE this is
problematic. The first step will clear the dirty bit and report dirty to
the end of its bitmap while the second step will see the clear'd dirty and
report clean for the start of the bitmap. If it happens this ends up
losing dirties.
Further this function is missing bounds checking so if this does happen
ther is a good chance it will write memory beyond what the userspace was
expecting.
Return an error code if this illegal condition happens.
Fixes: 58ccf0190d19 ("vfio: Add an IOVA bitmap support")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://patch.msgid.link/20260925161142.189813-2-parri.andrea@gmail.com
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions
