[PATCHv2 1/6] ARM: ftrace: remove useless memory checks

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Feb 22 16:28:21 EST 2012


On Wed, Feb 22, 2012 at 07:43:17PM +0530, Rabin Vincent wrote:
> On Mon, Feb 20, 2012 at 04:16:01PM +0000, Russell King - ARM Linux wrote:
> > On Sat, Jan 28, 2012 at 07:05:20PM +0530, Rabin Vincent wrote:
> > > diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
> > > index c0062ad..e9488ad 100644
> > > --- a/arch/arm/kernel/ftrace.c
> > > +++ b/arch/arm/kernel/ftrace.c
> > > @@ -125,11 +125,13 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old,
> > >  {
> > >  	unsigned long replaced;
> > >  
> > > -	if (probe_kernel_read(&replaced, (void *)pc, MCOUNT_INSN_SIZE))
> > > -		return -EFAULT;
> > > +	if (old) {
> > 
> > So, we're using the instruction value '0' to mean that we don't want to
> > check?  Wouldn'it it be better to pass a flag in to indicate this instead
> > of creating a magic value?
> 
> OK.  I think you applied this patch as-is anyway, so here is a follow-on
> patch:

I'd still much prefer it to be part of the original patch.  I can replace
the patch I've merged or augment it with another patch - whichever way
you prefer.



More information about the linux-arm-kernel mailing list