On Linux, is it possible that memory pages that contain the process stack get swapped to disk? If so, is there a way to prevent that, either at compile time or at runtime.
I'm asking because of a discussion on GitHub about potentially leaking secrets from local variables on the stack
In case an answer to that question not only depends on the kernel, but also depends on the userspace toolchain in use (libc, dynamic linker etc.), my question is about GNU/Linux and Android in particular.