]>
Commit | Line | Data |
---|---|---|
0fa05ca6 AW |
1 | #!/bin/bash |
2 | ||
3 | cd "$1" || exit 1 | |
4 | ||
1e390209 AW |
5 | # Find all valid retpoline information, collate the detected and |
6 | # safe information together. Join the result to find the detected | |
7 | # but non-safe elements. These are our concern. | |
8 | tmp="/tmp/retpoline-check.$$" | |
9 | find "." -path './drivers/firmware/efi/libstub' -prune -o \ | |
10 | -path './arch/x86/boot' -prune -o \ | |
11 | -path './arch/x86/purgatory' -prune -o \ | |
12 | -name \*.ur-detected | xargs cat | \ | |
13 | sed -e "s@^$1@@" -e "s@ $2/@ @" -e "s@^/@@" | \ | |
14 | sort -k 1b,1 >"$tmp.ur-detected" | |
15 | find "." -name \*.ur-safe | xargs cat | \ | |
16 | sed -e "s@^$1@@" -e "s@^/@@" | \ | |
17 | sort -k 1b,1 >"$tmp.ur-safe" | |
18 | ||
19 | join -v 1 -j 1 "$tmp.ur-detected" "$tmp.ur-safe" | sed -s 's/[^ ]* *//' | |
20 | ||
21 | rm -f "$tmp".* |