lkml.org 
[lkml]   [2021]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 5/5] powerpc/ftrace: Add support for livepatch to PPC32
On Thu 2021-10-28 14:24:05, Christophe Leroy wrote:
> This is heavily copied from PPC64. Not much to say about it.
>
> Livepatch sample modules all work.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> diff --git a/arch/powerpc/include/asm/livepatch.h b/arch/powerpc/include/asm/livepatch.h
> index 4fe018cc207b..daf24d837241 100644
> --- a/arch/powerpc/include/asm/livepatch.h
> +++ b/arch/powerpc/include/asm/livepatch.h
> @@ -23,8 +23,8 @@ static inline void klp_arch_set_pc(struct ftrace_regs *fregs, unsigned long ip)
> static inline unsigned long klp_get_ftrace_location(unsigned long faddr)
> {
> /*
> - * Live patch works only with -mprofile-kernel on PPC. In this case,
> - * the ftrace location is always within the first 16 bytes.
> + * Live patch works on PPC32 and only with -mprofile-kernel on PPC64. In
> + * both cases, the ftrace location is always within the first 16 bytes.

Nit: I had some problems to parse it. I wonder if the following is
better:

* Live patch works on PPC32 out of box and on PPC64 only with
* -mprofile-kernel. In both cases, the ftrace location is always
* within the first 16 bytes.


> */
> return ftrace_location_range(faddr, faddr + 16);
> }

Best Regards,
Petr

\
 
 \ /
  Last update: 2021-11-08 11:01    [W:0.292 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site