From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v4 6/7] tracing/probes: Add this_cpu_read() and this_cpu_ptr() dereference method to fetcharg
Date: Tue, 16 Jun 2026 10:15:18 +0900 [thread overview]
Message-ID: <20260616101518.798465295df36bec64f0f279@kernel.org> (raw)
In-Reply-To: <178148609402.185520.8189233495763938815.stgit@devnote2>
On Mon, 15 Jun 2026 10:14:54 +0900
"Masami Hiramatsu (Google)" <mhiramat@kernel.org> wrote:
> + case FETCH_OP_DEREF_CPU:
> + val = (unsigned long)this_cpu_ptr((void __percpu *)val);
> + ret = probe_mem_read(&val, (void *)val, sizeof(val));
> + break;
> + case FETCH_OP_CPU_PTR:
> + val = (unsigned long)this_cpu_ptr((void __percpu *)val);
> + ret = 0;
> + break;
Hmm, maybe I can just convert the FETCH_OP_DEREF_CPU to
FETCH_OP_CPU_PTR + FETCH_OP_DEREF to simply the code.
> + default:
> + lval = llval;
> + goto out;
> + }
> if (ret)
> return ret;
> + llval = lval;
> code++;
> } while (1);
> +out:
>
> s3 = code;
> stage3:
> @@ -181,6 +195,10 @@ process_fetch_insn_bottom(struct fetch_insn *code, unsigned long val,
> case FETCH_OP_ST_UMEM:
> probe_mem_read_user(dest, (void *)val + code->offset, code->size);
> break;
> + case FETCH_OP_ST_CPUMEM:
> + val = (unsigned long)this_cpu_ptr((void __percpu *)val);
> + probe_mem_read(dest, (void *)val, code->size);
> + break;
Then, I can just drop this change.
Thanks,
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2026-06-16 1:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 1:13 [PATCH v4 0/7] tracing/probes: Add more typecast features Masami Hiramatsu (Google)
2026-06-15 1:14 ` [PATCH v4 1/7] tracing/events: Fix to check the simple_tsk_fn creation Masami Hiramatsu (Google)
2026-06-15 1:14 ` [PATCH v4 2/7] tracing/probes: Support typecast for various probe events Masami Hiramatsu (Google)
2026-06-15 1:14 ` [PATCH v4 3/7] tracing/probes: Support nested typecast Masami Hiramatsu (Google)
2026-06-15 1:14 ` [PATCH v4 4/7] tracing/probes: Support field specifier option for typecast Masami Hiramatsu (Google)
2026-06-15 1:14 ` [PATCH v4 5/7] tracing/probes: Add $current variable support Masami Hiramatsu (Google)
2026-06-15 1:14 ` [PATCH v4 6/7] tracing/probes: Add this_cpu_read() and this_cpu_ptr() dereference method to fetcharg Masami Hiramatsu (Google)
2026-06-16 1:15 ` Masami Hiramatsu [this message]
2026-06-15 1:15 ` [PATCH v4 7/7] tracing/probes: Add a new testcase for BTF typecasts Masami Hiramatsu (Google)
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=20260616101518.798465295df36bec64f0f279@kernel.org \
--to=mhiramat@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.org \
/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