From: Masami Hiramatsu <mhiramat@kernel.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
kbuild-all@lists.01.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH] ARM: kprobes: Make __kretprobe_trampoline as a pure asm function
Date: Fri, 25 Mar 2022 00:18:31 +0900 [thread overview]
Message-ID: <20220325001831.e363577abe647f99b0714be8@kernel.org> (raw)
In-Reply-To: <CAMj1kXFtrogyse1MOF1KDBuYwtxNDvCu3rF=o7b__83Lu6Fj4A@mail.gmail.com>
Hi Ard,
On Thu, 24 Mar 2022 14:34:46 +0100
Ard Biesheuvel <ardb@kernel.org> wrote:
> --- a/arch/arm/probes/kprobes/core.c
> +++ b/arch/arm/probes/kprobes/core.c
> @@ -377,7 +377,7 @@ void __naked __kprobes __kretprobe_trampoline(void)
> {
> __asm__ __volatile__ (
> #ifdef CONFIG_FRAME_POINTER
> - "ldr lr, =__kretprobe_trampoline \n\t"
> + "ldr lr, .L__kretprobe_trampoline \n\t"
> /* __kretprobe_trampoline makes a framepointer on pt_regs. */
> #ifdef CONFIG_CC_IS_CLANG
> "stmdb sp, {sp, lr, pc} \n\t"
> @@ -407,6 +407,11 @@ void __naked __kprobes __kretprobe_trampoline(void)
> "bx lr \n\t"
> #else
> "mov pc, lr \n\t"
> +#endif
> +#ifdef CONFIG_FRAME_POINTER
> + ".align 2 \n\t"
> + ".L__kretprobe_trampoline: \n\t"
> + ".long __kretprobe_trampoline \n\t"
> #endif
> : : : "memory");
> }
Yes, I confirmed this works too :-)
Can you send the patch with my Tested-by ?
Thank you!
>
>
> On Thu, 24 Mar 2022 at 14:23, Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >
> > On Thu, 24 Mar 2022 15:21:08 +0900
> > Masami Hiramatsu <mhiramat@kernel.org> wrote:
> >
> > > Hi,
> > >
> > > I found a better solution for this issue from Ard :-)
> > >
> > > https://lore.kernel.org/all/20220203082204.1176734-6-ardb@kernel.org/T/#u
> > >
> > > I should use mov_l instead of ldr for loading the symbol address.
> >
> > Hm, these macros are only for the pure assembly file (.S), so we have to
> > split this in a asm file to use that.
> >
>
>
> What about the below?
--
Masami Hiramatsu <mhiramat@kernel.org>
prev parent reply other threads:[~2022-03-24 15:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 22:00 /tmp/ccIWiggX.s:22: Error: invalid literal constant: pool needs to be closer kernel test robot
2022-03-15 9:25 ` Masami Hiramatsu
2022-03-15 9:52 ` [PATCH] ARM: kprobes: Make __kretprobe_trampoline as a pure asm function Masami Hiramatsu
2022-03-24 6:21 ` Masami Hiramatsu
2022-03-24 13:23 ` Masami Hiramatsu
2022-03-24 13:34 ` Ard Biesheuvel
2022-03-24 13:35 ` Ard Biesheuvel
2022-03-24 15:18 ` Masami Hiramatsu [this message]
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=20220325001831.e363577abe647f99b0714be8@kernel.org \
--to=mhiramat@kernel.org \
--cc=ardb@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ndesaulniers@google.com \
--cc=rostedt@goodmis.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