summaryrefslogtreecommitdiff
path: root/include/linux/intel-svm.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2021-12-15 15:24:32 -0800
committerJoerg Roedel <jroedel@suse.de>2021-12-17 09:05:04 +0100
commit4599d78a820eb0a8ce2b3a1bd619620837cf906e (patch)
tree51c276de2596be4c2d43035168cc1c9fe84f6028 /include/linux/intel-svm.h
parent0fcfb00b28c0b7884635dacf38e46d60bf3d4eb1 (diff)
iommu/vt-d: Use correctly sized arguments for bit field
The find.h APIs are designed to be used only on unsigned long arguments. This can technically result in a over-read, but it is harmless in this case. Regardless, fix it to avoid the warning seen under -Warray-bounds, which we'd like to enable globally: In file included from ./include/linux/bitmap.h:9, from drivers/iommu/intel/iommu.c:17: drivers/iommu/intel/iommu.c: In function 'domain_context_mapping_one': ./include/linux/find.h:119:37: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'int[1]' [-Warray-bounds] 119 | unsigned long val = *addr & GENMASK(size - 1, 0); | ^~~~~ drivers/iommu/intel/iommu.c:2115:18: note: while referencing 'max_pde' 2115 | int pds, max_pde; | ^~~~~~~ Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Yury Norov <yury.norov@gmail.com> Link: https://lore.kernel.org/r/20211215232432.2069605-1-keescook@chromium.org Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/intel-svm.h')
0 files changed, 0 insertions, 0 deletions