diff options
| author | Eduard Zingerman <eddyz87@gmail.com> | 2026-09-03 13:58:19 -0700 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-09-03 18:55:40 -0700 |
| commit | 0b1c83dc3c4401cd7e846548f62e3caf3d06742e (patch) | |
| tree | 255c3a538a7a6dc38290baa439848ab4bd3eccb1 /scripts/Makefile.thinlto | |
| parent | 54ed91950363c116bec9be1b7015ff2bfa989950 (diff) | |
| download | linux-0b1c83dc3c4401cd7e846548f62e3caf3d06742e.tar.gz linux-0b1c83dc3c4401cd7e846548f62e3caf3d06742e.zip | |
bpf: don't rewrite bpf_fastcall patterns entered by a jump
mark_fastcall_pattern_for_call() must ensure that matched
"spill; call; fill" instruction series is not interrupted by a jump.
Otherwise the rewrite applied by bpf_remove_fastcall_spills_fills()
is not sound.
Record the instructions targeted by jumps in
insn_aux_data[*].jump_target when the CFG is built and use this flag
to stop growing a pattern at such an instruction. Jumps to the first
spill are fine.
Note that existing insn_aux_data[*].jmp_point field can't be reused,
as it marks subprogram return instructions.
Fixes: 5b5f51bff1b6 ("bpf: no_caller_saved_registers attribute for helper calls")
Reported-by: Nicholas Carlini <npc@anthropic.com>
Suggested-by: Nicholas Carlini <npc@anthropic.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260903205820.1743087-1-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
