Open xiota opened 10 months ago
prevent sensitive data from being written to disk.
swap
prevent sensitive data from being written to disk.
swap
I wonder if memory.swap.max
cgroups memory controller could be used to disable swap: https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html#memory
memory.swap.max
.--ramfs
or --noswap --tmpfs
.I don't see how Bubblewrap can add --noswap
. It does not setup cgroups. I actually had several ideas on adding the cgroups support for bubblejail.
Well it has already --perms
and --size
. I see no reason why --noswap
should not be possible.
tmpfs blocks may be swapped out, when there is a shortage of memory. tmpfs has a mount option to disable its use of swap:
noswap Disables swap. Remounts must respect the original settings. By default swap is enabled.
src: https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html
I didn't know there was such option. Although it seems to be very new: https://lwn.net/Articles/924251/ https://www.spinics.net/lists/linux-man/msg25288.html
--tmpfs
works with new debug
service.
I don't see any --noswap
option at https://github.com/containers/bubblewrap
Description
Related to #61. Extend root share to mount temporary folders, using
bwrap --tmpfs
. For reference, fromman bwrap
:This is useful to automatically discard temporary data (
~/.cache
) and to prevent sensitive data from being written to disk.