bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: bot+bpf-ci@kernel.org, bpf@vger.kernel.org, ast@kernel.org,
	andrii@kernel.org
Cc: daniel@iogearbox.net, martin.lau@linux.dev, kernel-team@fb.com,
	 yonghong.song@linux.dev, memxor@gmail.com, npc@anthropic.com,
	 martin.lau@kernel.org, mason@kernel.org,
	ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf 2/3] bpf: update disasm.c to print BPF_PROBE_ATOMIC as atomics
Date: Thu, 03 Sep 2026 12:38:28 -0700	[thread overview]
Message-ID: <2f40ba155a98bd357ff5c1182308ce10a425811a.camel@gmail.com> (raw)
In-Reply-To: <2ddb3272d086e995630c56ed4c2cc2cdec75debd5fff9c10cb0bfe8c0fe664ef@mail.kernel.org>

On Thu, 2026-09-03 at 18:11 +0000, bot+bpf-ci@kernel.org wrote:
> > bpf: update disasm.c to print BPF_PROBE_ATOMIC as atomics
> > 
> > bpf_convert_ctx_accesses() rewrites an atomic on an arena pointer from
> > BPF_STX | BPF_ATOMIC to BPF_STX | BPF_PROBE_ATOMIC, this patch adjusts
> > print_bpf_insn() to print such instructions as regular atomics with a
> > 'probe_' prefix (instead of printing them as BUG_XX).
> 
> The changelog says the instructions are printed "as regular atomics with
> a 'probe_' prefix", but looking at the implementation:
> 
>     const char *probe_pfx = BPF_MODE(insn->code) == BPF_PROBE_ATOMIC ? "probe " : "";
>     ...
>     verbose(cbs->private_data, "(%02x) %sr0 = atomic%s_cmpxchg((%s *)(r%d %+d), r0, r%d)",
>             insn->code, probe_pfx, ...);
> 
> the code emits a separate word "probe " (trailing space, no underscore)
> at the start of the rendered instruction, producing output like:
> 
>     probe r0 = atomic_cmpxchg((u32 *)(r1 +0), r0, r2)
> 
> rather than:
> 
>     r0 = probe_atomic_cmpxchg(...)
> 
> as the message suggests. For the fetch/cmpxchg/xchg/load_acquire/
> store_release forms, this also detaches the qualifier from the operation
> it qualifies (e.g. "probe r%d = atomic..._fetch_...", reading as if
> "probe" modified the destination register).
> 
> Should the changelog describe the emitted "probe " prefix, or should the
> prefix be attached to the operation name (probe_atomic_cmpxchg,
> probe_load_acquire, etc.) to match the message?

Yes, I should have updated the log. The intent is to print:

  (hex) probe ...something-something...

will respin v2, waiting for sashiko.

  reply	other threads:[~2026-09-03 19:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 17:15 [PATCH bpf 1/3] bpf: zero extend the result of an arena 32-bit cmpxchg Eduard Zingerman
2026-09-03 17:15 ` [PATCH bpf 2/3] bpf: update disasm.c to print BPF_PROBE_ATOMIC as atomics Eduard Zingerman
2026-09-03 18:11   ` bot+bpf-ci
2026-09-03 19:38     ` Eduard Zingerman [this message]
2026-09-03 17:15 ` [PATCH bpf 3/3] selftests/bpf: check zero extension of an arena 32-bit cmpxchg Eduard Zingerman
2026-09-04  2:00 ` [PATCH bpf 1/3] bpf: zero extend the result " 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=2f40ba155a98bd357ff5c1182308ce10a425811a.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bot+bpf-ci@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=ihor.solodrai@linux.dev \
    --cc=kernel-team@fb.com \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=npc@anthropic.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;
as well as URLs for NNTP newsgroup(s).