Commit 9e1e647
arm64/cfi,bpf: Support kCFI + BPF on arm64
Currently, bpf_dispatcher_*_func() is marked with `__nocfi` therefore
calling BPF programs from this interface doesn't cause CFI warnings.
When BPF programs are called directly from C: from BPF helpers or
struct_ops, CFI warnings are generated.
Implement proper CFI prologues for the BPF programs and callbacks and
drop __nocfi for arm64. Fix the trampoline generation code to emit kCFI
prologue when a struct_ops trampoline is being prepared.
Signed-off-by: Puranjay Mohan <[email protected]>
Co-developed-by: Maxwell Bland <[email protected]>
Signed-off-by: Maxwell Bland <[email protected]>
Co-developed-by: Sami Tolvanen <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
Tested-by: Dao Huang <[email protected]>
Acked-by: Will Deacon <[email protected]>1 parent 2e9b5df commit 9e1e647
2 files changed
+34
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| |||
174 | 183 | | |
175 | 184 | | |
176 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
177 | 192 | | |
178 | 193 | | |
179 | 194 | | |
| |||
503 | 518 | | |
504 | 519 | | |
505 | 520 | | |
506 | | - | |
507 | 521 | | |
508 | 522 | | |
509 | 523 | | |
| |||
529 | 543 | | |
530 | 544 | | |
531 | 545 | | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
532 | 549 | | |
533 | 550 | | |
534 | 551 | | |
| |||
2146 | 2163 | | |
2147 | 2164 | | |
2148 | 2165 | | |
2149 | | - | |
| 2166 | + | |
2150 | 2167 | | |
2151 | | - | |
| 2168 | + | |
2152 | 2169 | | |
2153 | 2170 | | |
2154 | 2171 | | |
| |||
2527 | 2544 | | |
2528 | 2545 | | |
2529 | 2546 | | |
| 2547 | + | |
| 2548 | + | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
2530 | 2553 | | |
2531 | 2554 | | |
2532 | 2555 | | |
| |||
3045 | 3068 | | |
3046 | 3069 | | |
3047 | 3070 | | |
| 3071 | + | |
3048 | 3072 | | |
3049 | 3073 | | |
3050 | 3074 | | |
| |||
0 commit comments