Commit 0dfefc2
James Morse
arm64: bpf: Add BHB mitigation to the epilogue for cBPF programs
A malicious BPF program may manipulate the branch history to influence
what the hardware speculates will happen next.
On exit from a BPF program, emit the BHB mititgation sequence.
This is only applied for 'classic' cBPF programs that are loaded by
seccomp.
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>1 parent a1152be commit 0dfefc2
File tree
3 files changed
+52
-5
lines changed- arch/arm64
- include/asm
- kernel
- net
3 files changed
+52
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
| 1024 | + | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
939 | 941 | | |
940 | 942 | | |
941 | 943 | | |
942 | | - | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
943 | 986 | | |
944 | 987 | | |
945 | 988 | | |
| |||
952 | 995 | | |
953 | 996 | | |
954 | 997 | | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
955 | 1001 | | |
956 | 1002 | | |
957 | 1003 | | |
958 | | - | |
| 1004 | + | |
959 | 1005 | | |
960 | 1006 | | |
961 | 1007 | | |
| |||
1898 | 1944 | | |
1899 | 1945 | | |
1900 | 1946 | | |
1901 | | - | |
| 1947 | + | |
1902 | 1948 | | |
1903 | 1949 | | |
1904 | 1950 | | |
| |||
1961 | 2007 | | |
1962 | 2008 | | |
1963 | 2009 | | |
1964 | | - | |
| 2010 | + | |
1965 | 2011 | | |
1966 | 2012 | | |
1967 | 2013 | | |
| |||
0 commit comments