Skip to main content
7 events
when toggle format what by license comment
May 9, 2022 at 13:41 answer added Stephen Kitt timeline score: 6
May 8, 2022 at 19:31 comment added ilkkachu Right, if it's ext4 on a LUKS device, then I seriously doubt the swap driver could bypass the encryption. And well, file-level encryption might well be incompatible with swap files, but I can't be sure. (There's stuff like eCryptfs and fscrypt, of which I know very little.) Also I can't actually_prove_ having LUKS there would encrypt the swapped-out data.
May 8, 2022 at 19:28 comment added Philip Couling So the way I read that quote, the Kernel bypasses the filesystem. Using a swapfile instead of a swap partition cannot offer any features of the filesytem.
May 8, 2022 at 19:25 comment added Philip Couling I don't see any good that would ever come from bypassing the block device driver. usually the block device driver is responsible for understanding how to talk to a physical device [sata hd/nvme hd/usb stick/floppy disk]. There's no way the code for swapping memory reimplemented this. Then knowing that virtual block devices exist [zram,lvm,luks], there would still be no reason to try to bypass them especially where there may be no physical device backing it [zram].
May 8, 2022 at 19:24 comment added Kolodez How to find out what is used for encryption? Probably luks? But I am not an expert on that. lsblk -f only says crypto 2.
May 8, 2022 at 19:00 comment added ilkkachu How exactly is it encrypted? The way I've always read that is that swap files bypass the filesystem (by asking the filesystem for the block locations of the swap file), but not other underlying layers. (Like LVM, or mdadm RAID, or network block devices, encryption, or whatever. It'd need support from those layers to be able to bypass them anyway.) Though if you want to be sure, you may need to test it.
May 8, 2022 at 18:55 history asked Kolodez CC BY-SA 4.0