lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXGHbQq0dU1KwD4VJMMZ+LOhaXXvZC6anTGuX3KmT34tMw@mail.gmail.com>
Date:   Thu, 24 Mar 2022 14:35:54 +0100
From:   Ard Biesheuvel <ardb@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Steven Rostedt <rostedt@...dmis.org>, kbuild-all@...ts.01.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] ARM: kprobes: Make __kretprobe_trampoline as a pure asm function

On Thu, 24 Mar 2022 at 14:34, Ard Biesheuvel <ardb@...nel.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");
>  }
>
>

Pardon the copy/paste error.

> What about the below?

was meant to refer to the diff above.


> On Thu, 24 Mar 2022 at 14:23, Masami Hiramatsu <mhiramat@...nel.org> wrote:
> >
> > On Thu, 24 Mar 2022 15:21:08 +0900
> > Masami Hiramatsu <mhiramat@...nel.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?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ