~/talk

Taming DMA: Tales Wrestling Memory Corruption

Talkat Open Source Summit Europe 2024 · 2024-09-16..09-18· [security]
slides:none on file

DMA misconfiguration repeatedly turns into subtle memory corruption: a 40‑bit PCIe/SD host limitation truncates addresses and crashes unless the driver sets a dma mask; missed cache maintenance (use dma_map_single / dma_sync_single_for_device|cpu) lets stale dirty lines hide device writes and corrupt the first TFTP packet; incorrectly claiming dma coherent in DT breaks A/B boot unless runtime device tree patches match bootloader snoop setup. Fixes include enabling CONFIG_DMA_API_DEBUG, porting that to barebox, using DMA‑engine memcpy or KASAN poisoning of DMA buffers for catches.

AI-written summary · about

  1. 0:00DMA and embedded Linux
  2. 1:29DMA offloads CPU work
  3. 3:19Cache coherence challenges
  4. 8:23DMA API misuse patterns
  5. 9:07ADMA errors on new RAM
  6. 10:55TFTP transfer failures
  7. 13:47DMA buffer ownership issues
  8. 15:32DMA memory requirements
  9. 18:26Crypto DMA corruption
  10. 21:12DMA coherence pitfalls
  11. 23:21DesignWare USB3 coherence issue
  12. 24:24RockChip DWC3 driver crashes
  13. 27:14Barriers and memory ordering
  14. 29:03Securing DMA masters
  15. 30:50Neopixel DMA corruption
  16. 32:55Summary and future
  17. 36:48Q&A on DMA restrictions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.