Commit f7e0bea
bpf, x86: Generate trampolines from bpf_tramp_links
Replace struct bpf_tramp_progs with struct bpf_tramp_links to collect
struct bpf_tramp_link(s) for a trampoline. struct bpf_tramp_link
extends bpf_link to act as a linked list node.
arch_prepare_bpf_trampoline() accepts a struct bpf_tramp_links to
collects all bpf_tramp_link(s) that a trampoline should call.
Change BPF trampoline and bpf_struct_ops to pass bpf_tramp_links
instead of bpf_tramp_progs.
Signed-off-by: Kui-Feng Lee <kuifeng@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220510205923.3206889-2-kuifeng@fb.com1 parent cb41154 commit f7e0bea
File tree
10 files changed
+164
-103
lines changed- arch/x86/net
- include
- linux
- uapi/linux
- kernel/bpf
- net/bpf
- tools
- bpf/bpftool
- include/uapi/linux
10 files changed
+164
-103
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1762 | 1762 | | |
1763 | 1763 | | |
1764 | 1764 | | |
1765 | | - | |
| 1765 | + | |
| 1766 | + | |
1766 | 1767 | | |
1767 | 1768 | | |
1768 | 1769 | | |
| 1770 | + | |
1769 | 1771 | | |
1770 | 1772 | | |
1771 | 1773 | | |
| |||
1850 | 1852 | | |
1851 | 1853 | | |
1852 | 1854 | | |
1853 | | - | |
| 1855 | + | |
1854 | 1856 | | |
1855 | 1857 | | |
1856 | 1858 | | |
1857 | 1859 | | |
1858 | 1860 | | |
1859 | | - | |
1860 | | - | |
| 1861 | + | |
| 1862 | + | |
1861 | 1863 | | |
1862 | 1864 | | |
1863 | 1865 | | |
| |||
1866 | 1868 | | |
1867 | 1869 | | |
1868 | 1870 | | |
1869 | | - | |
| 1871 | + | |
1870 | 1872 | | |
1871 | 1873 | | |
1872 | 1874 | | |
| |||
1877 | 1879 | | |
1878 | 1880 | | |
1879 | 1881 | | |
1880 | | - | |
1881 | | - | |
| 1882 | + | |
| 1883 | + | |
1882 | 1884 | | |
1883 | 1885 | | |
1884 | 1886 | | |
| |||
1980 | 1982 | | |
1981 | 1983 | | |
1982 | 1984 | | |
1983 | | - | |
| 1985 | + | |
1984 | 1986 | | |
1985 | 1987 | | |
1986 | 1988 | | |
1987 | 1989 | | |
1988 | | - | |
1989 | | - | |
1990 | | - | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
1991 | 1993 | | |
1992 | 1994 | | |
1993 | 1995 | | |
| |||
2078 | 2080 | | |
2079 | 2081 | | |
2080 | 2082 | | |
2081 | | - | |
| 2083 | + | |
2082 | 2084 | | |
2083 | 2085 | | |
2084 | 2086 | | |
2085 | 2087 | | |
2086 | | - | |
2087 | | - | |
| 2088 | + | |
| 2089 | + | |
2088 | 2090 | | |
2089 | 2091 | | |
2090 | 2092 | | |
| |||
2111 | 2113 | | |
2112 | 2114 | | |
2113 | 2115 | | |
2114 | | - | |
| 2116 | + | |
2115 | 2117 | | |
2116 | 2118 | | |
2117 | 2119 | | |
| |||
2121 | 2123 | | |
2122 | 2124 | | |
2123 | 2125 | | |
2124 | | - | |
| 2126 | + | |
2125 | 2127 | | |
2126 | 2128 | | |
2127 | 2129 | | |
2128 | 2130 | | |
2129 | | - | |
| 2131 | + | |
2130 | 2132 | | |
2131 | 2133 | | |
2132 | 2134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
727 | 727 | | |
728 | | - | |
729 | | - | |
730 | | - | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
731 | 731 | | |
732 | 732 | | |
733 | 733 | | |
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | | - | |
| 756 | + | |
757 | 757 | | |
758 | 758 | | |
759 | 759 | | |
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
| 855 | + | |
855 | 856 | | |
856 | | - | |
857 | | - | |
| 857 | + | |
| 858 | + | |
858 | 859 | | |
859 | 860 | | |
860 | 861 | | |
| |||
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
908 | | - | |
| 909 | + | |
909 | 910 | | |
910 | 911 | | |
911 | 912 | | |
912 | 913 | | |
913 | | - | |
| 914 | + | |
914 | 915 | | |
915 | 916 | | |
916 | 917 | | |
| |||
1009 | 1010 | | |
1010 | 1011 | | |
1011 | 1012 | | |
1012 | | - | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
| |||
1096 | 1096 | | |
1097 | 1097 | | |
1098 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
1099 | 1111 | | |
1100 | 1112 | | |
1101 | 1113 | | |
| |||
1133 | 1145 | | |
1134 | 1146 | | |
1135 | 1147 | | |
1136 | | - | |
1137 | | - | |
| 1148 | + | |
| 1149 | + | |
1138 | 1150 | | |
1139 | 1151 | | |
1140 | 1152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
| 1016 | + | |
1016 | 1017 | | |
1017 | 1018 | | |
1018 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
321 | 337 | | |
322 | 338 | | |
323 | 339 | | |
324 | 340 | | |
325 | 341 | | |
326 | | - | |
327 | | - | |
| 342 | + | |
| 343 | + | |
328 | 344 | | |
329 | 345 | | |
330 | | - | |
| 346 | + | |
331 | 347 | | |
332 | 348 | | |
333 | 349 | | |
| |||
338 | 354 | | |
339 | 355 | | |
340 | 356 | | |
341 | | - | |
| 357 | + | |
342 | 358 | | |
343 | 359 | | |
344 | 360 | | |
| |||
362 | 378 | | |
363 | 379 | | |
364 | 380 | | |
365 | | - | |
366 | | - | |
| 381 | + | |
| 382 | + | |
367 | 383 | | |
368 | 384 | | |
369 | 385 | | |
| |||
386 | 402 | | |
387 | 403 | | |
388 | 404 | | |
| 405 | + | |
389 | 406 | | |
390 | 407 | | |
391 | 408 | | |
| |||
439 | 456 | | |
440 | 457 | | |
441 | 458 | | |
442 | | - | |
443 | 459 | | |
444 | 460 | | |
445 | 461 | | |
446 | 462 | | |
| 463 | + | |
447 | 464 | | |
448 | 465 | | |
449 | 466 | | |
450 | 467 | | |
451 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
452 | 479 | | |
453 | 480 | | |
454 | 481 | | |
| |||
491 | 518 | | |
492 | 519 | | |
493 | 520 | | |
494 | | - | |
| 521 | + | |
495 | 522 | | |
496 | 523 | | |
497 | 524 | | |
| |||
546 | 573 | | |
547 | 574 | | |
548 | 575 | | |
549 | | - | |
| 576 | + | |
550 | 577 | | |
551 | | - | |
| 578 | + | |
552 | 579 | | |
553 | 580 | | |
554 | 581 | | |
| |||
597 | 624 | | |
598 | 625 | | |
599 | 626 | | |
600 | | - | |
601 | | - | |
| 627 | + | |
| 628 | + | |
602 | 629 | | |
603 | 630 | | |
604 | | - | |
| 631 | + | |
605 | 632 | | |
606 | 633 | | |
607 | 634 | | |
| |||
0 commit comments