linux-next: manual merge of the bpf-next tree with the bpf tree
From: Mark Brown
Date: Thu Sep 03 2026 - 10:45:18 EST
Hi all,
Today's linux-next merge of the bpf-next tree got a conflict in:
kernel/bpf/backtrack.c
between commit:
e3e4f66cc4b72 ("bpf: backtracking shouldn't clear outer frame R1-R5 for callbacks")
from the bpf tree and commit:
5bbb242c08590 ("bpf: Handle R2 as a return register in precision backtracking")
from the bpf-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
I'm not entirely happy with this resolution but I think it's OK?
diff --cc kernel/bpf/backtrack.c
index 47282ffeeaf94,653db80bcc47b..0000000000000
--- a/kernel/bpf/backtrack.c
+++ b/kernel/bpf/backtrack.c
@@@ -533,8 -538,12 +537,12 @@@ static int backtrack_insn(struct bpf_ve
from_subprog_call = subseq_idx - 1 >= 0 &&
bpf_pseudo_call(&env->prog->insnsi[subseq_idx - 1]);
- /* Sample the return registers before the callback
- * handling below clears R1-R5.
- */
r0_precise = from_subprog_call && bt_is_reg_set(bt, BPF_REG_0);
+ r2_precise = from_subprog_call && bt_is_reg_set(bt, BPF_REG_2);
+
++ bt_clear_reg(bt, BPF_REG_0);
++ bt_clear_reg(bt, BPF_REG_2);
+
/* Backtracking to a nested function call, 'idx' is a part of
* the inner frame 'subseq_idx' is a part of the outer frame.
* In case of a regular function call, instructions giving
Attachment:
signature.asc
Description: PGP signature