mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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>
8 lines
197 B
Makefile
8 lines
197 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Makefile for arch/loongarch/net
|
|
#
|
|
# Copyright (C) 2022 Loongson Technology Corporation Limited
|
|
#
|
|
obj-$(CONFIG_BPF_JIT) += bpf_jit.o bpf_timed_may_goto.o
|