From: Steven Rostedt <rostedt@goodmis.org>
To: Florent Revest <revest@chromium.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
bpf@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org,
mhiramat@kernel.org, mark.rutland@arm.com, ast@kernel.org,
daniel@iogearbox.net, andrii@kernel.org, kpsingh@kernel.org,
jolsa@kernel.org, xukuohai@huaweicloud.com, lihuafei1@huawei.com
Subject: Re: [PATCH v2 04/10] ftrace: Store direct called addresses in their ops
Date: Wed, 15 Mar 2023 19:43:34 -0400 [thread overview]
Message-ID: <20230315194334.58eb56ab@gandalf.local.home> (raw)
In-Reply-To: <20230207182135.2671106-5-revest@chromium.org>
On Tue, 7 Feb 2023 19:21:29 +0100
Florent Revest <revest@chromium.org> wrote:
> @@ -5445,6 +5445,7 @@ __modify_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)
> /* Enable the tmp_ops to have the same functions as the direct ops */
> ftrace_ops_init(&tmp_ops);
> tmp_ops.func_hash = ops->func_hash;
> + tmp_ops.direct_call = addr;
>
> err = register_ftrace_function_nolock(&tmp_ops);
> if (err)
> @@ -5466,6 +5467,7 @@ __modify_ftrace_direct(struct ftrace_ops *ops, unsigned long addr)
> entry->direct = addr;
> }
> }
> + WRITE_ONCE(ops->direct_call, addr);
I'm curious about the use of WRITE_ONCE(). It should not go outside the
mutex barrier.
-- Steve
>
> mutex_unlock(&ftrace_lock);
>
next prev parent reply other threads:[~2023-03-15 23:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 18:21 [PATCH v2 00/10] Add ftrace direct call for arm64 Florent Revest
2023-02-07 18:21 ` [PATCH v2 01/10] ftrace: Replace uses of _ftrace_direct APIs with _ftrace_direct_multi Florent Revest
2023-03-15 23:33 ` Steven Rostedt
2023-03-16 15:40 ` Florent Revest
2023-02-07 18:21 ` [PATCH v2 02/10] ftrace: Remove the legacy _ftrace_direct API Florent Revest
2023-02-07 18:21 ` [PATCH v2 03/10] ftrace: Rename _ftrace_direct_multi APIs to _ftrace_direct APIs Florent Revest
2023-02-07 18:21 ` [PATCH v2 04/10] ftrace: Store direct called addresses in their ops Florent Revest
2023-03-15 23:43 ` Steven Rostedt [this message]
2023-03-16 15:40 ` Florent Revest
2023-03-16 15:45 ` Steven Rostedt
2023-03-16 16:15 ` Florent Revest
2023-02-07 18:21 ` [PATCH v2 05/10] ftrace: Make DIRECT_CALLS work WITH_ARGS and !WITH_REGS Florent Revest
2023-02-07 18:21 ` [PATCH v2 06/10] ftrace: selftest: remove broken trace_direct_tramp Florent Revest
2023-03-15 23:51 ` Steven Rostedt
2023-03-16 15:41 ` Florent Revest
2023-02-07 18:21 ` [PATCH v2 07/10] arm64: ftrace: Add direct call support Florent Revest
2023-02-07 18:21 ` [PATCH v2 08/10] arm64: ftrace: Simplify get_ftrace_plt Florent Revest
2023-02-07 18:21 ` [PATCH v2 09/10] arm64: ftrace: Add direct call trampoline samples support Florent Revest
2023-02-07 18:21 ` [PATCH v2 10/10] selftests/bpf: Update the tests deny list on aarch64 Florent Revest
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=20230315194334.58eb56ab@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel@iogearbox.net \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=lihuafei1@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=revest@chromium.org \
--cc=will@kernel.org \
--cc=xukuohai@huaweicloud.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;
as well as URLs for NNTP newsgroup(s).