public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Puranjay Mohan <puranjay@kernel.org>
To: Leon Hwang <hffilwlqm@gmail.com>, bpf@vger.kernel.org
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
	maciej.fijalkowski@intel.com, jakub@cloudflare.com,
	pulehui@huawei.com, hffilwlqm@gmail.com,
	kernel-patches-bot@fb.com, puranjay12@gmail.com
Subject: Re: [PATCH v5 bpf-next 2/3] bpf, arm64: Fix tailcall hierarchy
Date: Wed, 26 Jun 2024 12:05:47 +0000	[thread overview]
Message-ID: <mb61pwmmbykmc.fsf@kernel.org> (raw)
In-Reply-To: <20240623161528.68946-3-hffilwlqm@gmail.com>

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

Leon Hwang <hffilwlqm@gmail.com> writes:

> This patch fixes a tailcall issue caused by abusing the tailcall in
> bpf2bpf feature on arm64 like the way of "bpf, x64: Fix tailcall
> hierarchy".
>
> On arm64, when a tail call happens, it uses tail_call_cnt_ptr to
> increment tail_call_cnt, too.
>
> At the prologue of main prog, it has to initialize tail_call_cnt and
> prepare tail_call_cnt_ptr.
>
> At the prologue of subprog, it pushes x26 register twice, and does not
> initialize tail_call_cnt.
>
> At the epilogue, it pops x26 twice, no matter whether it is main prog or
> subprog.
>
> Fixes: d4609a5d8c70 ("bpf, arm64: Keep tail call count across bpf2bpf calls")
> Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>

Acked-by: Puranjay Mohan <puranjay@kernel.org>

Thanks,
Puranjay

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

  reply	other threads:[~2024-06-26 12:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23 16:15 [PATCH v5 bpf-next 0/3] bpf: Fix tailcall hierarchy Leon Hwang
2024-06-23 16:15 ` [PATCH v5 bpf-next 1/3] bpf, x64: " Leon Hwang
2024-07-11  0:15   ` Eduard Zingerman
2024-07-11  2:02     ` Leon Hwang
2024-06-23 16:15 ` [PATCH v5 bpf-next 2/3] bpf, arm64: " Leon Hwang
2024-06-26 12:05   ` Puranjay Mohan [this message]
2024-06-23 16:15 ` [PATCH v5 bpf-next 3/3] selftests/bpf: Add testcases for tailcall hierarchy fixing Leon Hwang
2024-07-11  2:01   ` Eduard Zingerman
2024-07-11 14:36     ` Leon Hwang

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=mb61pwmmbykmc.fsf@kernel.org \
    --to=puranjay@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=hffilwlqm@gmail.com \
    --cc=jakub@cloudflare.com \
    --cc=kernel-patches-bot@fb.com \
    --cc=maciej.fijalkowski@intel.com \
    --cc=pulehui@huawei.com \
    --cc=puranjay12@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox