On 7/4/25 8:28 PM, Robin H. Johnson wrote:
If an entire device is formatted as LUKS, there is a small chance it
maybe be detected as an Atari/AHDI disk - causing the kernel to create
partitions, and confusing other systems.
Detect the LUKS header before the Atari partition table to prevent this
from creating partitions on top of the LUKS volume.
Please, no. This is a horrible hack.
LUKS is not a partition. It is a completely userspace concept, detection should
not be in the kernel at all.
Moreover, the detection below is oversimplified; the second header can be on
multiple offsets.
The same problem can happen with Veracrypt or other systems that randomize data.
The Atari partition is known to use very weak detection, but I think blkid
added some more hints to check validity in userspace - why is it not enough?
Is anything from this logic missing in the kernel?
If it is not solvable, you should turn off Atari partition detection as it is
unreliable.
Milan
Link:
https://unix.stackexchange.com/questions/561745/what-are-the-md-partitions-under-a-mdadm-array
Link: https://github.com/rook/rook/issues/7940
Link: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1531404
Signed-off-by: Robin H. Johnson <robb...@gentoo.org>