[PATCH 0/4] dma: debug: track DMA buffer ownership with KASAN
Sascha Hauer
s.hauer at pengutronix.de
Thu Sep 26 06:16:13 PDT 2024
On Tue, 10 Sep 2024 13:48:28 +0200, Ahmad Fatoum wrote:
> There is litte we can do in software if a DMA master decides to corrupt
> memory that is owned by the CPU. What we could do, however, is to ensure
> that code doesn't access memory while not owned by the CPU.
>
> This is done by recording ownership information into the KASAN shadow memory.
> That way accessing a device mapped buffer before sync'ing it to the CPU is
> detected like KASAN would detect a use-after-free. Below is the output
> after adding a (void)readl(packet) into the network device send routing just
> after mapping it to the device:
>
> [...]
Applied, thanks!
[1/4] Revert "dma: debug: detect repeated DMA sync"
https://git.pengutronix.de/cgit/barebox/commit/?id=77bf74ca6d5d (link may not be stable)
[2/4] KASan: implement non-warning kasan_is_poisoned_shadow
https://git.pengutronix.de/cgit/barebox/commit/?id=f82c8cfcdf31 (link may not be stable)
[3/4] dma: debug: poison DMA buffers with KASAN while owned by device
https://git.pengutronix.de/cgit/barebox/commit/?id=77b1f08efbb0 (link may not be stable)
[4/4] dma: debug: detect repeated DMA sync using KASAN
https://git.pengutronix.de/cgit/barebox/commit/?id=6de8f0188126 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer at pengutronix.de>
More information about the barebox
mailing list