projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e3d0dbb
)
bpf: Properly mark live registers for indirect jumps
author
Anton Protopopov
<a.s.protopopov@gmail.com>
Wed, 14 Jan 2026 16:25:43 +0000
(16:25 +0000)
committer
Alexei Starovoitov
<ast@kernel.org>
Thu, 15 Jan 2026 03:08:09 +0000
(19:08 -0800)
For a `gotox rX` instruction the rX register should be marked as used
in the compute_insn_live_regs() function. Fix this.
Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
Link:
https://lore.kernel.org/r/20260114162544.83253-2-a.s.protopopov@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/verifier.c
patch
|
blob
|
history
diff --git
a/kernel/bpf/verifier.c
b/kernel/bpf/verifier.c
index
62ad7c7
..
7a375f6
100644
(file)
--- a/
kernel/bpf/verifier.c
+++ b/
kernel/bpf/verifier.c
@@
-24848,6
+24848,12
@@
static void compute_insn_live_regs(struct bpf_verifier_env *env,
case BPF_JMP32:
switch (code) {
case BPF_JA:
+ def = 0;
+ if (BPF_SRC(insn->code) == BPF_X)
+ use = dst;
+ else
+ use = 0;
+ break;
case BPF_JCOND:
def = 0;
use = 0;