On Wed, 24 Apr 2024 08:40:35 +0200, Ahmad Fatoum wrote: > As described in commi b986aad24ab8 ("mci: core: allocate memory used > for DMA with dma_alloc"), the recent fix to ARMv8 cache operations in > commit 65ef5d885263 ("ARM64: let 'end' point after the range in cache > functions") may lead to unearthing some of the alignment bugs we have: > > These bugs were already there: If a DMA buffer is misaligned and you do > cache maintenance on it, you will corrupt memory that's unlucky to share > the cache line. This has been the case for many years though, which I > think is because that corruption was limited to the driver itself: > If a driver invalidates only part of its buffer, then that is its > problem and that of its consumers (e.g. TFTP failing for some file > names, because network driver only invalidated part of the packet). > > [...] Applied, thanks! [01/23] habv4: use DMA-capable memory for getting event from BootROM https://git.pengutronix.de/cgit/barebox/commit/?id=72b50532f7d9 (link may not be stable) [02/23] dma: give inline dma_alloc a single external definition https://git.pengutronix.de/cgit/barebox/commit/?id=f77b139c4d74 (link may not be stable) [03/23] dma: add definition for dma_zalloc https://git.pengutronix.de/cgit/barebox/commit/?id=d2d9eb85597c (link may not be stable) [04/23] include: linux/kernel.h: factor out alignment macros https://git.pengutronix.de/cgit/barebox/commit/?id=04fbbf21e502 (link may not be stable) [05/23] driver: move out struct device definition into its own header https://git.pengutronix.de/cgit/barebox/commit/?id=58e2ba922bea (link may not be stable) [06/23] dma: remove common.h include from asm/dma.h https://git.pengutronix.de/cgit/barebox/commit/?id=d0124e06ab06 (link may not be stable) [07/23] RISC-V: dma: fix dma.h inclusion https://git.pengutronix.de/cgit/barebox/commit/?id=a9e636c1b9d9 (link may not be stable) [08/23] sandbox: dma: drop unused driver.h include https://git.pengutronix.de/cgit/barebox/commit/?id=d256efaaff68 (link may not be stable) [09/23] dma: remove linux/kernel.h dependency from dma.h https://git.pengutronix.de/cgit/barebox/commit/?id=27490e48068c (link may not be stable) [10/23] include: linux/slab: fix possible overflow in kmalloc_array https://git.pengutronix.de/cgit/barebox/commit/?id=f82819fb748a (link may not be stable) [11/23] include: linux/slab: use dma_alloc for kmalloc https://git.pengutronix.de/cgit/barebox/commit/?id=9b12861830e0 (link may not be stable) [12/23] include: linux/slab: retire krealloc https://git.pengutronix.de/cgit/barebox/commit/?id=3afbd2693d2f (link may not be stable) [13/23] commands: mmc_extcsd: use DMA capable memory where needed https://git.pengutronix.de/cgit/barebox/commit/?id=9d320afb3df3 (link may not be stable) [14/23] net: macb: use DMA-capable memory for receive buffer https://git.pengutronix.de/cgit/barebox/commit/?id=9ce5a4a7792b (link may not be stable) [15/23] firmware: qemu_fw_cfg: use bounce buffer for write https://git.pengutronix.de/cgit/barebox/commit/?id=cf6a5d4321c9 (link may not be stable) [16/23] net: usb: asix: use dma_alloc for buffers in USB control messages https://git.pengutronix.de/cgit/barebox/commit/?id=25826dced0d1 (link may not be stable) [17/23] net: usb: smsc95xx: use DMA memory for usb_control_msg https://git.pengutronix.de/cgit/barebox/commit/?id=c7ce7c992ccd (link may not be stable) [18/23] usb: hub: use DMA memory in usb_get_port_status https://git.pengutronix.de/cgit/barebox/commit/?id=3a678386fe77 (link may not be stable) [19/23] usb: hub: use DMA-capable memory in usb_hub_configure https://git.pengutronix.de/cgit/barebox/commit/?id=7cffd374fbc3 (link may not be stable) [20/23] treewide: use new dma_zalloc instead of opencoding https://git.pengutronix.de/cgit/barebox/commit/?id=f607c950a05e (link may not be stable) [21/23] usb: dwc2: host: fix mismatch between dma_map_single and unmap https://git.pengutronix.de/cgit/barebox/commit/?id=a0ae1c2c67d7 (link may not be stable) [22/23] net: bcmgenet: map DMA buffers with dma_map_single https://git.pengutronix.de/cgit/barebox/commit/?id=ecf47be780ce (link may not be stable) [23/23] dma: debug: add alignment check when mapping buffers https://git.pengutronix.de/cgit/barebox/commit/?id=699194dd2a4f (link may not be stable) Best regards, -- Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>