Re: [PATCH bpf-next v3 07/13] bpf: introduce forward arg-tracking dataflow analysis

bot+bpf-ci
2026-04-10T10:10:58Z

[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]

> diff --git a/kernel/bpf/liveness.c b/kernel/bpf/liveness.c
> index a3af5972520f..b5ac0800c18a 100644
> --- a/kernel/bpf/liveness.c
> +++ b/kernel/bpf/liveness.c

[ ... ]

> +/* Track callee stack slots fp-8 through fp-512 (64 slots of 8 bytes each) */
> +#define MAX_ARG_SPILL_SLOTS 64

[ ... ]

> +/*
> + * Convert a byte offset from FP to a callee stack slot index (0-7).
> + * Returns -1 if out of range or not 8-byte aligned.
> + * Slot 0 = fp-8, slot 1 = fp-16, ..., slot 7 = fp-64.
> + */
> +static int fp_off_to_slot(s16 off)
> +{
> + if (off == OFF_IMPRECISE)
> + return -1;
> + if (off >= 0 || off < -(int)(MAX_ARG_SPILL_SLOTS * 8))
> + return -1;

Should the comment above say (0-63) and slot 63 = fp-512 instead of
(0-7) and slot 7 = fp-64? MAX_ARG_SPILL_SLOTS is 64, and the bounds
check here uses MAX_ARG_SPILL_SLOTS * 8 = 512, matching the comment
on the #define itself ("fp-8 through fp-512 (64 slots of 8 bytes
each)").

> + if (off % 8)
> + return -1;
> + return (-off) / 8 - 1;
> +}

---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/24236538770