LoongArch: Increase ARCH_DMA_MINALIGN up to 16
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fa96b57c149061f71a70bd6582d995f6424fbbf4 · < 4103cfe9dcb88010ae4911d3ff417457d1b6a720| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
LoongArch: Increase ARCH_DMA_MINALIGN up to 16
ARCH_DMA_MINALIGN is 1 by default, but some LoongArch-specific devices (such as APBDMA) require 16 bytes alignment. When the data buffer length is too small, the hardware may make an error writing cacheline. Thus, it is dangerous to allocate a small memory buffer for DMA. It's always safe to define ARCH_DMA_MINALIGN as L1_CACHE_BYTES but unnecessary (kmalloc() need small memory objects). Therefore, just increase it to 16.
From the CVE record · Linux
The Linux kernel’s LoongArch DMA minimum alignment is too small for some devices that require 16-byte alignment. When a DMA buffer is too small, the hardware may write a cacheline incorrectly. The input does not establish an attacker path or specify authentication or user-interaction requirements.
Engineers running Linux kernels on LoongArch systems should check whether their kernel includes the fix; affected versions are not specified.