summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2026-10-27 16:26:22 +0000
committerAlexei Starovoitov <ast@kernel.org>2026-10-27 16:26:22 +0000
commit9ce722236a20e7a913b54df8b6098ec6324ba58a (patch)
tree005669bf71b0f6f6142aa68f6d99d830742ea86a /include/linux
parent195a3519ff27bff5575e05b5086e38ee92715776 (diff)
parent8fd732e5a64b5c584b1c8701e6a8bb98da830205 (diff)
Merge branch 'bpf-fixes-and-follow-ups-for-32-64-bit-scalar-evolution'
Eduard Zingerman says: ==================== bpf: fixes and follow-ups for 32-/64-bit scalar evolution Fixes: - bpf: avoid false infinite loop reports after changes in SCEV clamping - bpf: do not intersect with current register range on clamp - bpf: reject pointer operands for 32-bit recurrences/latches Follow-ups: - bpf: (zext32 (zext32 X)) -> (zext32 X) SCEV simplification rule - bpf: check the iteration count before the predicted exit value Note: this supersedes [1]. [1] bpf: reject pointer operands for 32-bit recurrences/latches https://lore.kernel.org/bpf/a7b9422e00b9a3f5438e996f01e97bef476040e0.camel@gmail.com/ There are some veristat improvements after clamping changes and new zext32 simplification rule. A: master; B: scev-simpler-clamp. Corpora: cilium, meta, scx, selftests. Object exclusions: verifier_scev.bpf.o. Histogram: selected programs, without the table filters. Total progs: 8071 -85 .. -75 %: 1 -35 .. -25 %: 3 -25 .. -20 %: 18 -20 .. -10 %: 5 -10 .. 0 %: 13 0 .. 5 %: 8031 Tables: success in both runs; baseline Insns >= 5,000. Ranked by percentage change, then instruction-count change, file, program. Meta names are anonymized; numbered objects are distinct files. Top wins -------- File Program Insns (A) Insns (B) Insns (DIFF) ------------------------- --------------------------------- --------- --------- ---------------- profiler-06.bpf.o on_perf_event 94751 64595 -30156 (-31.83%) profiler-19.bpf.o sched_switch_offcpu 21906 15726 -6180 (-28.21%) profiler-12.bpf.o sched_switch 12105 9015 -3090 (-25.53%) profiler-26.bpf.o handle_cu_mem_address_reserve 12702 9738 -2964 (-23.33%) profiler-26.bpf.o handle_cu_mem_create 12702 9738 -2964 (-23.33%) profiler-26.bpf.o handle_malloc 12702 9738 -2964 (-23.33%) profiler-26.bpf.o handle_cu_mem_map 12900 9936 -2964 (-22.98%) profiler-09.bpf.o on_custom_event_start 12951 9987 -2964 (-22.89%) profiler-09.bpf.o trace_func_entry 12951 9987 -2964 (-22.89%) profiler-19.bpf.o sched_waking 6642 5160 -1482 (-22.31%) profiler-27.bpf.o handle_cuda_launch_exc 6665 5183 -1482 (-22.24%) profiler-27.bpf.o handle_cuda_launch 6678 5196 -1482 (-22.19%) profiler-12.bpf.o on_custom_event_begin 6885 5403 -1482 (-21.53%) profiler-12.bpf.o on_custom_event_end 6889 5407 -1482 (-21.51%) profiler-26.bpf.o handle_mtia_cached_alloc 13870 10906 -2964 (-21.37%) profiler-26.bpf.o handle_mtia_allocate_enter 13931 10967 -2964 (-21.28%) profiler-26.bpf.o handle_pytorch_malloc 14223 11259 -2964 (-20.84%) profiler-19.bpf.o oncpu 7178 5696 -1482 (-20.65%) profiler-12.bpf.o on_task_enqueued 7223 5741 -1482 (-20.52%) profiler-12.bpf.o sched_waking 7258 5776 -1482 (-20.42%) profiler-12.bpf.o on_task_dequeued 7398 5916 -1482 (-20.03%) profiler-12.bpf.o on_request_context_event 7489 6007 -1482 (-19.79%) profiler-12.bpf.o on_pytorch_event 7490 6008 -1482 (-19.79%) profiler-12.bpf.o on_task_stats 7572 6090 -1482 (-19.57%) profiler-12.bpf.o oncpu 7676 6194 -1482 (-19.31%) profiler-12.bpf.o get_crochet_walltime_stacks 22063 18973 -3090 (-14.01%) profiler-24.bpf.o get_task_stacks 64928 61154 -3774 (-5.81%) Changelog: v1 -> v2: - changed series target to bpf. - change in the bpf_is_state_visited() to avoid infinite loop detection interference for terminating loops. v1: https://lore.kernel.org/bpf/dc27fabc3f3c7d862c3f2ae583a3650a4d48804d.camel@gmail.com/T/47e07d3ab05 --- ==================== Link: https://patch.msgid.link/20261026-scev-simpler-clamp-v2-0-f373aec9825f@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bpf_verifier.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
index 5926f13ff43c..e51984cb3035 100644
--- a/include/linux/bpf_verifier.h
+++ b/include/linux/bpf_verifier.h
@@ -1280,6 +1280,7 @@ __printf(3, 4) void verbose_linfo(struct bpf_verifier_env *env,
u32 insn_off,
const char *prefix_fmt, ...);
void bpf_verbose_snum(struct bpf_verifier_env *env, s64 num);
+void bpf_verbose_snum32(struct bpf_verifier_env *env, s32 num);
#define verifier_bug_if(cond, env, fmt, args...) \
({ \