Commit dc7d744
bpf, arm64: Fix incorrect runtime stats
When __bpf_prog_enter() returns zero, the arm64 register x20 that stores
prog start time is not assigned to zero, causing incorrect runtime stats.
To fix it, assign the return value of bpf_prog_enter() to x20 register
immediately upon its return.
Fixes: efc9909 ("bpf, arm64: Add bpf trampoline for arm64")
Reported-by: Ivan Babrou <ivan@cloudflare.com>
Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Ivan Babrou <ivan@cloudflare.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240416064208.2919073-2-xukuohai@huaweicloud.com1 parent 37eacb9 commit dc7d744
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1844 | 1844 | | |
1845 | 1845 | | |
1846 | 1846 | | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
1847 | 1850 | | |
1848 | 1851 | | |
1849 | 1852 | | |
1850 | 1853 | | |
1851 | 1854 | | |
1852 | 1855 | | |
1853 | | - | |
1854 | | - | |
1855 | | - | |
1856 | 1856 | | |
1857 | 1857 | | |
1858 | 1858 | | |
| |||
0 commit comments