mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge branch 'selftests-bpf-fix-selftests-fails-with-clang23'
KaFai Wan says: ==================== selftests/bpf: Fix selftests fails with clang23 Building with clang/LLVM 23 breaks several selftests. Patches #1 to #4 fix those failures. Changes in v3: - Remove the patch already applied. Changes in v2: - https://lore.kernel.org/bpf/20261014113043.640435-1-kafai.wan@linux.dev/ - Collect the selftest fixes from the two patches in v1 patches: #1, #5, #6 and #7. - Add three new patches: #2, #3 and #4. Changes in v1: - https://lore.kernel.org/bpf/20261012135624.2749743-1-kafai.wan@linux.dev/T/ - https://lore.kernel.org/bpf/20261012140202.2754552-1-kafai.wan@linux.dev/T/ --- ==================== Link: https://patch.msgid.link/20261018005348.2195130-1-kafai.wan@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
commit
a2e3191f5b
|
|
@ -22301,7 +22301,8 @@ int bpf_check_attach_target(struct bpf_verifier_log *log,
|
|||
}
|
||||
conservative = aux->func_info_aux[subprog].unreliable;
|
||||
if (prog_extension) {
|
||||
if (conservative) {
|
||||
if (aux->func_info_aux[subprog].linkage != BTF_FUNC_GLOBAL ||
|
||||
conservative) {
|
||||
bpf_log(log,
|
||||
"Cannot replace static functions\n");
|
||||
return -EINVAL;
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ static void test_exceptions_success(void)
|
|||
bpf_program__fd(skel->progs.exception_throw_subprog),
|
||||
"throwing_subprog"), "set_attach_target"))
|
||||
goto done;
|
||||
}), "throwing_subprog() is not a global function", 0);
|
||||
}), "Cannot replace static functions", 0);
|
||||
|
||||
if (test__start_subtest("non-throwing extension -> non-throwing subprog"))
|
||||
/* non-throwing extension -> non-throwing global subprog : OK */
|
||||
|
|
|
|||
|
|
@ -94,14 +94,14 @@ static int child_func(void *arg)
|
|||
/* wait for parent's kick */
|
||||
err = read(child->go[0], &c, 1);
|
||||
if (err != 1)
|
||||
exit(err);
|
||||
_exit(err);
|
||||
|
||||
uprobe_multi_func_1();
|
||||
uprobe_multi_func_2();
|
||||
uprobe_multi_func_3();
|
||||
usdt_trigger();
|
||||
|
||||
exit(errno);
|
||||
_exit(errno);
|
||||
}
|
||||
|
||||
static int spawn_child_flag(struct child *child, bool clone_vm)
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ __msg("mark_precise: frame1: parent state regs= stack=: frame1: R10=fp0")
|
|||
__msg("mark_precise: frame0: parent state regs= stack=: R10=fp0")
|
||||
__msg("mark_precise: frame1: last_idx 11 first_idx 11 subseq_idx 13")
|
||||
__msg("mark_precise: frame1: regs= stack= before 11: (85) call pc+1")
|
||||
__msg("mark_precise: frame0: parent state regs= stack=: R1=1 R2=2 R3=3 R4=4 R5=5 R10=fp0")
|
||||
__msg("mark_precise: frame0: parent state regs= stack=: R10=fp0")
|
||||
__msg("mark_precise: frame0: last_idx 9 first_idx 7 subseq_idx 11")
|
||||
__msg("mark_precise: frame0: regs= stack= before 9: (05) goto pc+1")
|
||||
__msg("mark_precise: frame0: regs= stack= before 8: (7a) *(u64 *)(r11 -8) = 4")
|
||||
|
|
@ -95,7 +95,7 @@ __msg("mark_precise: frame1: parent state regs= stack=: frame1: R10=fp0")
|
|||
__msg("mark_precise: frame0: parent state regs= stack=: R10=fp0")
|
||||
__msg("mark_precise: frame1: last_idx 11 first_idx 11 subseq_idx 13 ")
|
||||
__msg("mark_precise: frame1: regs= stack= before 11: (85) call pc+1")
|
||||
__msg("mark_precise: frame0: parent state regs= stack=: R1=1 R2=2 R3=3 R4=4 R5=5 R10=fp0")
|
||||
__msg("mark_precise: frame0: parent state regs= stack=: R10=fp0")
|
||||
__msg("mark_precise: frame0: last_idx 10 first_idx 10 subseq_idx 11 ")
|
||||
__msg("mark_precise: frame0: regs= stack= before 10: (7a) *(u64 *)(r11 -8) = 6")
|
||||
__naked void stack_arg_precision_bpf2bpf(void)
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ SEC("tc")
|
|||
__description("stack_arg: pruning with different stack arg types")
|
||||
__failure __log_level(2)
|
||||
__flag(BPF_F_TEST_STATE_FREQ)
|
||||
__msg("arg JOIN insn 9 -> 10 r1: fp0-8 + _ => fp0-8|fp0+0")
|
||||
__msg("arg JOIN insn 9 -> 10 sa0: fp0-8 + _ => fp0-8|fp0+0")
|
||||
__msg("arg JOIN insn 8 -> 10 r1: _ + fp0-8 => fp0-8|fp0+0")
|
||||
__msg("arg JOIN insn 8 -> 10 sa0: _ + fp0-8 => fp0-8|fp0+0")
|
||||
__msg("R{{[0-9]}} invalid mem access 'scalar'")
|
||||
__naked void stack_arg_pruning_type_mismatch(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user