media: ipu6: A few defensive fixes for ipu7 buttress, fw-com and mmu paths
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest4 patches 2 repliesIn review
- v14 patches 1 replySuperseded
Changes in v2 from the cover letter
- ipu6_mmu_iova_to_phys(): this was found via code review, not from an observed crash (comparing against l2_map()/l2_unmap(), which already guard the equivalent lookup). Added a Fixes: tag pointing at the commit that introduced the unguarded lookup, but skipped a stable-tree backport since there's no confirmed real-world trigger (Sakari).
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | media: ipu6: Free boot config on queue memory alloc failuredrivers/ | +1 | 1 reply | |
| 2/4 | media: ipu6: Always run cleanup in ipu7 power on/off on timeoutdrivers/ | +15 | 1 reply | |
| 3/4 | media: ipu6: Validate fw-com queue indices before usedrivers/ drivers/ drivers/ | +21 | 0 replies | |
| 4/4 | media: ipu6: Fix NULL deref in ipu6_mmu_iova_to_phys()drivers/ | +10 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/4] media: ipu6: A few defensive fixes for ipu7 buttress, fw-com and mmu paths
This series fixes several bugs found while reviewing the ipu7 buttress power on/off, fw-com and mmu paths: a boot-config leak on a queue memory allocation failure, a skipped cleanup step on a buttress power on/off timeout, unchecked firmware-supplied queue indices used in pointer arithmetic in ipu7_fw_com_get_token(), and a missing "is this iova mapped" check in ipu6_mmu_iova_to_phys() that could dereference an invalid pointer for an unmapped iova.
A related fix for a missing NULL check on the output pin queue in the ipu7 isr was dropped from this series, since an equivalent patch is already on the list:
https://lore.kernel.org/linux-media/[email protected]/
v2:
- ipu6_mmu_iova_to_phys(): this was found via code review, not from an observed crash (comparing against l2_map()/l2_unmap(), which already guard the equivalent lookup). Added a Fixes: tag pointing at the commit that introduced the unguarded lookup, but skipped a stable-tree backport since there's no confirmed real-world trigger (Sakari).
Manik Bajpai (4):
media: ipu6: Free boot config on queue memory alloc failure
media: ipu6: Always run cleanup in ipu7 power on/off on timeout
media: ipu6: Validate fw-com queue indices before use
media: ipu6: Fix NULL deref in ipu6_mmu_iova_to_phys()
drivers/media/pci/intel/ipu6/ipu6-buttress.c | 24 ++++++++++++-------- drivers/media/pci/intel/ipu6/ipu6-mmu.c | 11 ++++++++- drivers/media/pci/intel/ipu6/ipu7-boot.c | 1 + drivers/media/pci/intel/ipu6/ipu7-fw-com.c | 14 +++++++++++- drivers/media/pci/intel/ipu6/ipu7-fw-com.h | 5 +++- drivers/media/pci/intel/ipu6/ipu7-fw-isys.c | 7 +++--- 6 files changed, 47 insertions(+), 15 deletions(-)
Signature · 1 line
2.53.0