public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Feng Yang <yangfeng59949@163.com>
Cc: alexei.starovoitov@gmail.com, andrii@kernel.org, ast@kernel.org,
	bpf@vger.kernel.org, daniel@iogearbox.net, eddyz87@gmail.com,
	haoluo@google.com, john.fastabend@gmail.com, jolsa@kernel.org,
	kpsingh@kernel.org, linux-kernel@vger.kernel.org,
	linux-trace-kernel@vger.kernel.org, martin.lau@linux.dev,
	sdf@fomichev.me, song@kernel.org, yonghong.song@linux.dev
Subject: Re: [BUG] Failed to obtain stack trace via bpf_get_stackid on ARM64 architecture
Date: Wed, 24 Sep 2025 17:04:16 +0900	[thread overview]
Message-ID: <20250924170416.0874e56c2ce99a4de92e05b8@kernel.org> (raw)
In-Reply-To: <20250924062536.471231-1-yangfeng59949@163.com>

On Wed, 24 Sep 2025 14:25:36 +0800
Feng Yang <yangfeng59949@163.com> wrote:

> By the way, during my testing, I also noticed that when executing bpf_get_stackid via kprobes or tracepoints, 
> the command bpftrace -e 'kprobe:bpf_get_stackid {printf("bpf_get_stackid\n");}' produces no output. 

I think this is because the bpf_get_stackid is a kind of recursive
event from kprobes. Kprobe handler can not be reentered.

> However, it does output something when bpf_get_stackid is invoked via uprobes. 
> This phenomenon also occurs on the x86 architecture, could this be a bug as well?

Maybe if bpf_get_stackid() is kicked from uprobes, it is not recursive
call from kprobes, so it works.

So it is expected behavior, not a bug. Sorry for confusion.


Thank you,

> 
> Thanks.
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  parent reply	other threads:[~2025-09-24  8:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-19  7:19 [BUG] Failed to obtain stack trace via bpf_get_stackid on ARM64 architecture Feng Yang
2025-09-20  2:56 ` Alexei Starovoitov
2025-09-20 22:17   ` Jiri Olsa
2025-09-21 13:30   ` Masami Hiramatsu
2025-09-22  2:15     ` Feng Yang
2025-09-23 15:32       ` Masami Hiramatsu
2025-09-24  6:25         ` Feng Yang
2025-09-24  7:31           ` Masami Hiramatsu
2025-09-24  8:04           ` Masami Hiramatsu [this message]
2025-09-24 10:53             ` Feng Yang
2025-09-24 22:00               ` Masami Hiramatsu
2025-09-24 15:42           ` Jiri Olsa
2025-09-24 21:56             ` Masami Hiramatsu

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=20250924170416.0874e56c2ce99a4de92e05b8@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=yangfeng59949@163.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox