mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-08-08 09:02:14 -04:00
drop_caches
This commit is contained in:
parent
02f44459ad
commit
539156c0da
1 changed files with 10 additions and 2 deletions
|
@ -8,6 +8,14 @@
|
||||||
|
|
||||||
DRACUT_QUIET=no
|
DRACUT_QUIET=no
|
||||||
|
|
||||||
|
drop_caches() {
|
||||||
|
sync
|
||||||
|
## https://gitlab.tails.boum.org/tails/tails/-/blob/master/config/chroot_local-includes/usr/local/lib/initramfs-pre-shutdown-hook
|
||||||
|
### Ensure any remaining disk cache is erased by Linux' memory poisoning
|
||||||
|
echo 3 > /proc/sys/vm/drop_caches
|
||||||
|
sync
|
||||||
|
}
|
||||||
|
|
||||||
ram_wipe_action() {
|
ram_wipe_action() {
|
||||||
local kernel_wiperam_exit
|
local kernel_wiperam_exit
|
||||||
kernel_wiperam_exit=$(getarg wiperamexit)
|
kernel_wiperam_exit=$(getarg wiperamexit)
|
||||||
|
@ -24,9 +32,9 @@ ram_wipe_action() {
|
||||||
|
|
||||||
info "wipe-ram.sh wiperamexit: wiperamexit=yes, therefore running second RAM wipe..."
|
info "wipe-ram.sh wiperamexit: wiperamexit=yes, therefore running second RAM wipe..."
|
||||||
|
|
||||||
## TODO: drop_caches
|
drop_caches
|
||||||
sdmem -l -l -v
|
sdmem -l -l -v
|
||||||
## TODO: drop_caches
|
drop_caches
|
||||||
|
|
||||||
info "wipe-ram.sh wiperamexit: Second RAM wipe completed."
|
info "wipe-ram.sh wiperamexit: Second RAM wipe completed."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue