All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: <bot+bpf-ci@kernel.org>, <bpf@vger.kernel.org>
Cc: <daniel@iogearbox.net>, <andrii@kernel.org>, <eddyz87@gmail.com>,
	<memxor@gmail.com>, <martin.lau@kernel.org>,
	<yonghong.song@linux.dev>, <mason@kernel.org>,
	<ihor.solodrai@linux.dev>
Subject: Re: [PATCH bpf-next 8/9] bpf: Bump MAX_CALL_FRAMES to 32
Date: Thu, 05 Nov 2026 00:32:48 +0000	[thread overview]
Message-ID: <DMMURTRBZ7LP.17GBF0P67G20T@gmail.com> (raw)
In-Reply-To: <a87dc20e1ec5a9b71efac37998600cdf8449e5cfbfdba8391138f2a79089c90e@mail.kernel.org>

On Wed, Nov 04, 2026 at 02:40 PM bot+bpf-ci@kernel.org <bot+bpf-ci@kernel.org> wrote:
> Can the combination of 32 frames and tail calls overflow the kernel stack
> at run time?

Not from this patch. It's an old bug.
MAX_CALL_FRAMES is what the verifier tracks. It doesn't limit the frames
at run time. A call of a global function resets the count since
commit ad95d3c758d8 ("bpf: Only enforce 8 frame call stack limit for all-static stacks").
Make f1 .. f31 global and add more of them. Such prog loads without
this patch.

The follow up (the verifier rewrite) series address it.

> Would it make sense to limit tail_call_reachable chains to
> MAX_CALL_FRAMES_INTERP frames, or to add a per-frame cost to the 256-byte
> tail call check?

No. dinfo[s].frame is 0 in a global function, so a limit on it doesn't help.
A cost per frame rejects progs that load today, like
tail_call_caller_stack_ok() with 240 bytes in the caller.
Not for this series.

  reply	other threads:[~2026-11-05  0:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 21:55 [PATCH bpf-next 0/9] bpf: Check chains of calls over the call graph, allow 32 frames Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 1/9] bpf: Build the call graph of a prog after the main verification pass Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 2/9] bpf: Use the call graph to find what runs in a callback Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 3/9] bpf: Use the call graph to find what gets to a tail call Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 4/9] bpf: Use the call graph to find callbacks that take a stack in arena Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 5/9] bpf: Use the call graph to choose subprogs with a private stack Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 6/9] bpf: Use the call graph to compute the depth of chains of calls Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 7/9] selftests/bpf: Test what follows from the " Alexei Starovoitov
2026-11-04 21:55 ` [PATCH bpf-next 8/9] bpf: Bump MAX_CALL_FRAMES to 32 Alexei Starovoitov
2026-11-04 22:40   ` bot+bpf-ci
2026-11-05  0:32     ` Alexei Starovoitov [this message]
2026-11-04 21:55 ` [PATCH bpf-next 9/9] selftests/bpf: Test 32 call frames Alexei Starovoitov
2026-11-05  1:30 ` [PATCH bpf-next 0/9] bpf: Check chains of calls over the call graph, allow 32 frames patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DMMURTRBZ7LP.17GBF0P67G20T@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=martin.lau@kernel.org \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.