From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org, Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: lst@pengutronix.de
Subject: Re: [PATCH 0/4] dma: debug: track DMA buffer ownership with KASAN
Date: Thu, 26 Sep 2024 15:16:13 +0200 [thread overview]
Message-ID: <172735657332.3953088.17407106050155705134.b4-ty@pengutronix.de> (raw)
In-Reply-To: <20240910114832.2984195-1-a.fatoum@pengutronix.de>
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@pengutronix.de>
prev parent reply other threads:[~2024-09-26 13:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-10 11:48 Ahmad Fatoum
2024-09-10 11:48 ` [PATCH 1/4] Revert "dma: debug: detect repeated DMA sync" Ahmad Fatoum
2024-09-10 11:48 ` [PATCH 2/4] KASan: implement non-warning kasan_is_poisoned_shadow Ahmad Fatoum
2024-09-10 11:48 ` [PATCH 3/4] dma: debug: poison DMA buffers with KASAN while owned by device Ahmad Fatoum
2024-09-10 11:48 ` [PATCH 4/4] dma: debug: detect repeated DMA sync using KASAN Ahmad Fatoum
2024-09-26 13:16 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=172735657332.3953088.17407106050155705134.b4-ty@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=lst@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox