-
Notifications
You must be signed in to change notification settings - Fork 14
/
meltdown-spectre-patch-check.bash
30 lines (24 loc) · 1.21 KB
/
meltdown-spectre-patch-check.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Latest revision date: January 20, 2018:
sudo apt update
sudo apt install git wget xterm iucode-tool intel-microcode
/usr/sbin/iucode_tool -tb -lS /lib/firmware/intel-ucode/*
read -rsp $'Press any key to continue...\n' -n1 key
cd
rm -rf spectre-meltdown-checker
git clone https://github.com/speed47/spectre-meltdown-checker.git
cd spectre-meltdown-checker
chmod +x spectre-meltdown-checker.sh
sudo ./spectre-meltdown-checker.sh
read -rsp $'Press any key to continue...\n' -n1 key
grep CONFIG_PAGE_TABLE_ISOLATION=y /boot/config-`uname -r` && echo "CONFIG_PAGE_TABLE_ISOLATION patched :)" || echo "CONFIG_PAGE_TABLE_ISOLATION unpatched :("
grep cpu_insecure /proc/cpuinfo && echo "cpu_insecure /proc/cpuinfo -> patched :)" || echo "cpu_insecure /proc/cpuinfo -> unpatched :("
sudo dmesg | grep "Kernel/User page tables isolation: enabled" && echo "Kernel/User page tables isolation -> patched :)" || echo "Kernel/User page tables isolation -> unpatched :("
uname -a
read -rsp $'Press any key to continue...\n' -n1 key
#added on January 18, 2018:
cd
rm -rf Spectre-Meltdown-Checker-Automated
git clone https://github.com/linuxlite/Spectre-Meltdown-Checker-Automated
cd Spectre-Meltdown-Checker-Automated
chmod +x sm-*
./sm-start