From: Julien Thierry <julien.thierry@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Arnd Bergmann <arnd@arndb.de>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org,
AKASHI Takahiro <takahiro.akashi@linaro.org>,
Ingo Molnar <mingo@redhat.com>, Torsten Duwe <duwe@lst.de>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Amit Daniel Kachhap <amit.kachhap@arm.com>,
live-patching@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 2/3] arm64: implement ftrace with regs
Date: Thu, 7 Feb 2019 14:58:55 +0000 [thread overview]
Message-ID: <5efd27b1-81b5-267a-9fe8-67bb084d56eb@arm.com> (raw)
In-Reply-To: <20190207095157.3dea1086@gandalf.local.home>
On 07/02/2019 14:51, Steven Rostedt wrote:
> On Thu, 7 Feb 2019 10:33:50 +0000
> Julien Thierry <julien.thierry@arm.com> wrote:
>
>> I don't see really much documentation on that function. As far as I can
>> tell it is only called once for each site (and if it didn't, we'd always
>> be placing the same instruction, but I agree it wouldn't be nice). It
>> could depend on how far you can expand the notion of "adjusting" :) .
>>
>> Steven, do you have an opinion on whether it would be acceptable to
>> modify function entry code in ftrace_call_adjust() ?
>
> Just to make sure I'm on the same page as you are. You want to modify
> the function entry code at the time of the ftrace_call_adjust()?
>
Yes, that was the intention, the reason being that we want to have an
instruction that is just patched once on each entry for initialization.
> I would update the rec->ip to the offset you want at
> ftrace_call_adjust() but not do any modifications. It really isn't safe
> to do it there. But right after that is called, you will have the arch
> specific call of ftrace_make_nop() called with MCOUNT_ADDR as the
> second parameter to let you know that this is the first time the call
> is made at this address. This is where you can do that initial
> modifications.
Yes, this is was the current version of this patch is doing, I was just
wondering whether we could clean things up a little (i.e. have
ftrace_make_nop() not generate a non-nop instruction :) ).
But we're not going to hack through the API if this is definitely not
what it's intended for. We'll keep it as is and just update the rec->ip
with ftrace_call_adjust().
If we really want to clean things up, we could look into patching this
at instruction at build time. But if it's not trivial I guess we can
keep that for a later time.
Thanks,
--
Julien Thierry
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-07 14:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 16:37 [PATCH v7 0/3] arm64: ftrace with regs Torsten Duwe
2019-01-18 16:39 ` [PATCH v7 1/3] arm64: replace -pg with CC_FLAGS_FTRACE in Makefiles Torsten Duwe
2019-01-18 17:24 ` Mark Rutland
2019-01-18 16:39 ` [PATCH v7 2/3] arm64: implement ftrace with regs Torsten Duwe
2019-01-22 1:39 ` Singh, Balbir
2019-01-22 13:09 ` Torsten Duwe
2019-01-23 20:38 ` Singh, Balbir
2019-01-22 10:18 ` Julien Thierry
2019-01-22 13:28 ` Torsten Duwe
2019-01-22 13:49 ` Julien Thierry
2019-01-22 13:55 ` Ard Biesheuvel
2019-02-04 12:03 ` Torsten Duwe
2019-02-04 13:43 ` Ard Biesheuvel
2019-02-06 8:59 ` Julien Thierry
2019-02-06 9:30 ` Julien Thierry
2019-02-06 14:09 ` Steven Rostedt
2019-02-06 15:05 ` Torsten Duwe
2019-02-07 10:33 ` Julien Thierry
2019-02-07 12:51 ` Torsten Duwe
2019-02-07 13:47 ` Julien Thierry
2019-02-07 14:51 ` Steven Rostedt
2019-02-07 14:58 ` Julien Thierry [this message]
2019-02-07 15:00 ` Torsten Duwe
2019-04-03 2:48 ` Mark Rutland
2019-04-03 12:30 ` Steven Rostedt
2019-04-03 13:05 ` Torsten Duwe
2019-01-18 16:39 ` [PATCH v7 3/3] arm64: use -fpatchable-function-entry if available Torsten Duwe
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=5efd27b1-81b5-267a-9fe8-67bb084d56eb@arm.com \
--to=julien.thierry@arm.com \
--cc=amit.kachhap@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=duwe@lst.de \
--cc=jpoimboe@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=takahiro.akashi@linaro.org \
--cc=will.deacon@arm.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).