Skip to content

dma-mapping: Add vmap checks to dma_map_single()

Kees Cook linux-iommu lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 8 repliesIn review
  2. v32 patches 2 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dma-mapping: Add vmap checks to dma_map_single()include/linux/dma-mapping.h+6 -06 replies
2/2usb: core: Remove redundant vmap checksdrivers/usb/core/hcd.c+1 -72 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchGreg Kroah-Hartman
1/2
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] dma-mapping: Add vmap checks to dma_map_single()

v4: use dev_WARN_ONCE() and improve report string (gregkh, robin)
v3: https://lore.kernel.org/lkml/[email protected]
v2: https://lore.kernel.org/lkml/201910041420.F6E55D29A@keescook
v1: https://lore.kernel.org/lkml/201910021341.7819A660@keescook

Duplicating patch 1 commit log:

As we've seen from USB and other areas[1], we need to always do runtime checks for DMA operating on memory regions that might be remapped. This adds vmap checks (similar to those already in USB but missing in other places) into dma_map_single() so all callers benefit from the checking.

[1] https://git.kernel.org/linus/3840c5b78803b2b6cc1ff820100a74a092c40cbb

-Kees

Kees Cook (2):
dma-mapping: Add vmap checks to dma_map_single()
usb: core: Remove redundant vmap checks

 drivers/usb/core/hcd.c      | 8 +-------
 include/linux/dma-mapping.h | 6 ++++++
 2 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.17.1