mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-23 01:13:40 +07:00
protect against wipe RAM reboot loop
This commit is contained in:
parent
c1b87d250c
commit
c0b5fea680
@ -36,6 +36,12 @@ ram_wipe() {
|
||||
fi
|
||||
fi
|
||||
|
||||
kernel_wiperamexit_setting=$(getarg wiperamexit)
|
||||
if [ "$kernel_wiperamexit_setting" = "yes" ]; then
|
||||
warn "wipe-ram.sh: Skip, because wiperamexit=yes to avoid RAM wipe reboot loop."
|
||||
return 0
|
||||
fi
|
||||
|
||||
info "wipe-ram.sh: Cold boot attack defense... Starting RAM wipe on shutdown..."
|
||||
|
||||
drop_caches
|
||||
@ -73,6 +79,7 @@ dmsetup_actual_output: '$dmsetup_actual_output'"
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
info "wipe-ram.sh: Now running kexec --exec..."
|
||||
if kexec --exec ; then
|
||||
info "wipe-ram.sh: kexec --exec succeeded."
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user