Re: [RFC PATCH 1/5] livepatch: ftrace: arm64: Add support for DYNAMIC_FTRACE_WITH_REGS

2015-05-29 Thread Li Bin
On 2015/5/29 15:14, Paul Bolle wrote: > On Thu, 2015-05-28 at 13:51 +0800, Li Bin wrote: >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig > >> select HAVE_DYNAMIC_FTRACE >> +select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE > > What's the point of "if

Re: [RFC PATCH 1/5] livepatch: ftrace: arm64: Add support for DYNAMIC_FTRACE_WITH_REGS

2015-05-29 Thread Paul Bolle
On Thu, 2015-05-28 at 13:51 +0800, Li Bin wrote: > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > select HAVE_DYNAMIC_FTRACE > + select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE What's the point of "if HAVE_DYNAMIC_FTRACE" here? That test should always evaluate to

Re: [RFC PATCH 1/5] livepatch: ftrace: arm64: Add support for DYNAMIC_FTRACE_WITH_REGS

2015-05-29 Thread Paul Bolle
On Thu, 2015-05-28 at 13:51 +0800, Li Bin wrote: --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig select HAVE_DYNAMIC_FTRACE + select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE What's the point of if HAVE_DYNAMIC_FTRACE here? That test should always evaluate to true,

Re: [RFC PATCH 1/5] livepatch: ftrace: arm64: Add support for DYNAMIC_FTRACE_WITH_REGS

2015-05-29 Thread Li Bin
On 2015/5/29 15:14, Paul Bolle wrote: On Thu, 2015-05-28 at 13:51 +0800, Li Bin wrote: --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig select HAVE_DYNAMIC_FTRACE +select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE What's the point of if HAVE_DYNAMIC_FTRACE here? That

[RFC PATCH 1/5] livepatch: ftrace: arm64: Add support for DYNAMIC_FTRACE_WITH_REGS

2015-05-27 Thread Li Bin
If ftrace_ops is registered with flag FTRACE_OPS_FL_SAVE_REGS, the arch that support DYNAMIC_FTRACE_WITH_REGS will pass a full set of pt_regs to the ftrace_ops callback function, which may read or change the value of the pt_regs and the pt_regs will be restored to support work flow redirection

[RFC PATCH 1/5] livepatch: ftrace: arm64: Add support for DYNAMIC_FTRACE_WITH_REGS

2015-05-27 Thread Li Bin
If ftrace_ops is registered with flag FTRACE_OPS_FL_SAVE_REGS, the arch that support DYNAMIC_FTRACE_WITH_REGS will pass a full set of pt_regs to the ftrace_ops callback function, which may read or change the value of the pt_regs and the pt_regs will be restored to support work flow redirection