diff options
| author | George Guo <guodongtai@kylinos.cn> | 2026-08-17 22:07:40 +0800 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2026-08-17 22:07:40 +0800 |
| commit | 3fbf3534c2ba6d9018dca04f2f96efa9f4b35fe4 (patch) | |
| tree | 6b52010d86c57e0635019f73e8488a72df04ad59 /scripts | |
| parent | 1db6d003e93d033fca25bcfbef73e2780a7e46d7 (diff) | |
| download | linux-3fbf3534c2ba6d9018dca04f2f96efa9f4b35fe4.tar.gz linux-3fbf3534c2ba6d9018dca04f2f96efa9f4b35fe4.zip | |
LoongArch: BPF: Add timed may_goto implementation
Implement arch_bpf_timed_may_goto() support and advertise it through
bpf_jit_supports_timed_may_goto() so the verifier lowers may_goto into
the timed variant: instead of a fixed iteration counter, the loop is
bounded by a wall-clock timeout maintained in a per-loop stack slot.
arch_bpf_timed_may_goto() uses a custom calling convention: the verifier
passes the count/timestamp stack offset in BPF_REG_AX and expects the
updated count back in the same register. The JIT call path therefore can
skip the usual 'BPF_REG_0 = C return value' move for this helper.
Acked-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
