Re: [PATCH v5 0/3] mtd: rawnand: protect DMA engines from vmalloc'd buffers

From: Miquel Raynal

Date: Fri Dec 04 2026 - 16:34:14 EST


On Wed, 25 Nov 2026 20:21:32 +0800, Ping Li wrote:
> While discussing a proposal to also allocate the mtdchar read/write
> bounce buffers with kvmalloc() [1], an audit showed that raw NAND
> controllers may DMA the buffers handed by the NAND core without
> declaring NAND_USES_DMA, so nand_base never bounces non-linear-map
> buffers for them (see the use_bounce_buf logic in
> nand_do_read_ops()/nand_do_write_ops()).
>
> [...]

Applied to nand/next, thanks!

[1/3] mtd: rawnand: intel: declare NAND_USES_DMA
commit: 9c6cf2bb11ca99bdbf789d17d59f5cc3044c0459
[2/3] mtd: rawnand: intel: unmap the DMA buffer in ebu_dma_start()
commit: c408988a803b0bc2ebbc9402210d7a1f5a35cb48
[3/3] mtd: rawnand: r852: declare NAND_USES_DMA
commit: bb29c651f8ecb8aa005630d7739859bbc2760714

Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).

Kind regards,
Miquèl