summaryrefslogtreecommitdiff
path: root/drivers/gpu/tests/git@radix-linux.su:pub
diff options
context:
space:
mode:
authorMatt Evans <mattev@meta.com>2026-05-11 17:46:42 +0300
committerAlex Williamson <alex@shazbot.org>2026-05-13 23:49:06 +0300
commitdf733ddc263dbe5f471e7c80c8b669532f56bf76 (patch)
tree9e15314c6cbfc4febb8c07f3b7958db7d7e1b73c /drivers/gpu/tests/git@radix-linux.su:pub
parentc64a647c84f30be368404f50f9052ed6c75c0f17 (diff)
downloadlinux-df733ddc263dbe5f471e7c80c8b669532f56bf76.tar.xz
vfio/pci: Make VFIO_PCI_OFFSET_TO_INDEX() return unsigned
VFIO_PCI_OFFSET_TO_INDEX() is used in several places with a signed parameter (e.g. loff_t). Because it makes no sense for a BAR/resource index to be negative, enforce this in the macro. This fixes at least one current issue, where vfio_pci_ioeventfd() uses this macro with an unvalidated signed loff_t returned into a signed type, leading to a possible negative array access. This instance does test against an out-of-bounds positive value, so treating the index as unsigned fixes this issue. Fixes: 89e1f7d4c66d8 ("vfio: Add PCI device driver") Signed-off-by: Matt Evans <mattev@meta.com> Link: https://lore.kernel.org/r/20260511144642.2926799-1-mattev@meta.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'drivers/gpu/tests/git@radix-linux.su:pub')
0 files changed, 0 insertions, 0 deletions