Commit e384c7b
bpf, x86: Create bpf_tramp_run_ctx on the caller thread's stack
BPF trampolines will create a bpf_tramp_run_ctx, a bpf_run_ctx, on
stacks and set/reset the current bpf_run_ctx before/after calling a
bpf_prog.
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-3-kuifeng@fb.com1 parent f7e0bea commit e384c7b
File tree
4 files changed
+66
-19
lines changed- arch/x86/net
- include/linux
- kernel/bpf
4 files changed
+66
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1763 | 1763 | | |
1764 | 1764 | | |
1765 | 1765 | | |
1766 | | - | |
| 1766 | + | |
1767 | 1767 | | |
1768 | 1768 | | |
1769 | 1769 | | |
| 1770 | + | |
1770 | 1771 | | |
1771 | 1772 | | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
1772 | 1785 | | |
1773 | 1786 | | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
1774 | 1790 | | |
1775 | 1791 | | |
1776 | 1792 | | |
| |||
1816 | 1832 | | |
1817 | 1833 | | |
1818 | 1834 | | |
| 1835 | + | |
| 1836 | + | |
1819 | 1837 | | |
1820 | 1838 | | |
1821 | 1839 | | |
| |||
1853 | 1871 | | |
1854 | 1872 | | |
1855 | 1873 | | |
1856 | | - | |
| 1874 | + | |
1857 | 1875 | | |
1858 | 1876 | | |
1859 | 1877 | | |
1860 | 1878 | | |
1861 | 1879 | | |
1862 | 1880 | | |
1863 | | - | |
| 1881 | + | |
1864 | 1882 | | |
1865 | 1883 | | |
1866 | 1884 | | |
| |||
1869 | 1887 | | |
1870 | 1888 | | |
1871 | 1889 | | |
1872 | | - | |
| 1890 | + | |
1873 | 1891 | | |
1874 | 1892 | | |
1875 | 1893 | | |
| |||
1880 | 1898 | | |
1881 | 1899 | | |
1882 | 1900 | | |
1883 | | - | |
| 1901 | + | |
1884 | 1902 | | |
1885 | 1903 | | |
1886 | 1904 | | |
| |||
1986 | 2004 | | |
1987 | 2005 | | |
1988 | 2006 | | |
1989 | | - | |
| 2007 | + | |
1990 | 2008 | | |
1991 | 2009 | | |
1992 | 2010 | | |
| |||
2016 | 2034 | | |
2017 | 2035 | | |
2018 | 2036 | | |
| 2037 | + | |
| 2038 | + | |
2019 | 2039 | | |
2020 | 2040 | | |
2021 | 2041 | | |
| |||
2034 | 2054 | | |
2035 | 2055 | | |
2036 | 2056 | | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
2037 | 2060 | | |
2038 | 2061 | | |
2039 | 2062 | | |
| |||
2081 | 2104 | | |
2082 | 2105 | | |
2083 | 2106 | | |
2084 | | - | |
| 2107 | + | |
2085 | 2108 | | |
2086 | 2109 | | |
2087 | 2110 | | |
| |||
2092 | 2115 | | |
2093 | 2116 | | |
2094 | 2117 | | |
2095 | | - | |
| 2118 | + | |
2096 | 2119 | | |
2097 | 2120 | | |
2098 | 2121 | | |
| |||
2129 | 2152 | | |
2130 | 2153 | | |
2131 | 2154 | | |
2132 | | - | |
| 2155 | + | |
2133 | 2156 | | |
2134 | 2157 | | |
2135 | 2158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
733 | 735 | | |
734 | 736 | | |
735 | 737 | | |
| |||
756 | 758 | | |
757 | 759 | | |
758 | 760 | | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
763 | 766 | | |
764 | 767 | | |
765 | 768 | | |
| |||
1351 | 1354 | | |
1352 | 1355 | | |
1353 | 1356 | | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
1354 | 1363 | | |
1355 | 1364 | | |
1356 | 1365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5020 | 5020 | | |
5021 | 5021 | | |
5022 | 5022 | | |
| 5023 | + | |
5023 | 5024 | | |
5024 | 5025 | | |
5025 | 5026 | | |
| |||
5047 | 5048 | | |
5048 | 5049 | | |
5049 | 5050 | | |
5050 | | - | |
| 5051 | + | |
| 5052 | + | |
| 5053 | + | |
5051 | 5054 | | |
5052 | 5055 | | |
5053 | 5056 | | |
5054 | 5057 | | |
5055 | 5058 | | |
5056 | | - | |
| 5059 | + | |
5057 | 5060 | | |
5058 | 5061 | | |
5059 | 5062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
| 571 | + | |
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
576 | 579 | | |
577 | 580 | | |
578 | 581 | | |
| |||
602 | 605 | | |
603 | 606 | | |
604 | 607 | | |
605 | | - | |
| 608 | + | |
606 | 609 | | |
607 | 610 | | |
| 611 | + | |
| 612 | + | |
608 | 613 | | |
609 | 614 | | |
610 | 615 | | |
611 | 616 | | |
612 | 617 | | |
613 | 618 | | |
614 | | - | |
| 619 | + | |
615 | 620 | | |
616 | 621 | | |
617 | 622 | | |
618 | 623 | | |
| 624 | + | |
619 | 625 | | |
620 | 626 | | |
621 | 627 | | |
622 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
623 | 632 | | |
624 | 633 | | |
625 | 634 | | |
626 | | - | |
| 635 | + | |
| 636 | + | |
627 | 637 | | |
| 638 | + | |
| 639 | + | |
628 | 640 | | |
629 | 641 | | |
630 | 642 | | |
| |||
0 commit comments