linux/arch/parisc
Mikulas Patocka 642a0b7453 parisc: fix a possible DMA corruption
commit 7ae04ba36b upstream.

ARCH_DMA_MINALIGN was defined as 16 - this is too small - it may be
possible that two unrelated 16-byte allocations share a cache line. If
one of these allocations is written using DMA and the other is written
using cached write, the value that was written with DMA may be
corrupted.

This commit changes ARCH_DMA_MINALIGN to be 128 on PA20 and 32 on PA1.1 -
that's the largest possible cache line size.

As different parisc microarchitectures have different cache line size, we
define arch_slab_minalign(), cache_line_size() and
dma_get_cache_alignment() so that the kernel may tune slab cache
parameters dynamically, based on the detected cache line size.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-14 13:58:57 +02:00
..
boot parisc: boot: Nuke some sparse warnings in decompressor 2023-08-10 22:42:57 +02:00
configs arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
include parisc: fix a possible DMA corruption 2024-08-14 13:58:57 +02:00
kernel parisc: use generic sys_fanotify_mark implementation 2024-07-05 09:33:54 +02:00
lib parisc: ucmpdi2: Fix no previous prototype for '__ucmpdi2' warning 2023-08-10 18:34:05 +02:00
math-emu parisc: math-emu: Avoid compiler warnings with W=1 2023-07-03 18:56:03 +02:00
mm parisc: Fix random data corruption from exception handler 2024-02-23 09:25:18 +01:00
net parisc: fix unaligned accesses in BPF 2024-08-14 13:58:57 +02:00
video fbdev: Include <linux/fb.h> instead of <asm/fb.h> 2023-05-18 11:06:21 +02:00
defpalo.conf
install.sh kbuild: factor out the common installation code into scripts/install.sh 2022-05-11 21:45:53 +09:00
Kbuild parisc: Wire up eBPF JIT compiler 2023-08-22 10:24:47 +02:00
Kconfig parisc: fix a possible DMA corruption 2024-08-14 13:58:57 +02:00
Kconfig.debug parisc: Use page table locks only if DEBUG_KERNEL is enabled 2023-08-20 20:23:46 +02:00
Makefile kbuild: unify vdso_install rules 2024-06-12 11:12:32 +02:00