Module Name: src Committed By: riastradh Date: Sat May 9 21:50:39 UTC 2020
Modified Files: src/sys/uvm: uvm_swap.c Log Message: Implement swap encryption. Enabled by sysctl -w vm.swap_encrypt=1. Key is generated lazily when we first need to swap a page. Key is chosen independently for each swap device. The ith swap page is encrypted with AES256-CBC using AES256_k(le32enc(i) || 0^96) as the initialization vector. Can be changed at any time; no need for compatibility with on-disk formats. Costs one bit of memory per page in each swapdev, plus a few hundred bytes per swapdev to store the expanded AES key. Shoulda done this decades ago! Plan to enable this by default; performance impact is unlikely to matter because it only happens when you're already swapping anyway. Much easier to set up than cgd, so we can rip out all the documentation about carefully setting up random-keyed cgd at the right time. To generate a diff of this commit: cvs rdiff -u -r1.186 -r1.187 src/sys/uvm/uvm_swap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.