[PATCH] ARM: ftrace: fix syscall name matching

Steven Rostedt rostedt at goodmis.org
Mon Nov 14 07:44:32 PST 2016


On Mon, 14 Nov 2016 10:40:08 -0500
Steven Rostedt <rostedt at goodmis.org> wrote:


> > Is this really safe?  What guarantees that we can wind forward four
> > bytes here?  If it's always safe, it needs a better comment than just
> > two words.  
> 
> I believe it is, but a comment would do well.

Also, the generic function that is called if the arch does not define
ARCH_HAS_SYSCALL_MATCH_SYM_NAME does this too.

	return !strcmp(sym + 3, name + 3);

And looking at this, it really should be + 4 and not + 3, because it
doesn't match the comment above, where it says it can handle both
".SyS" and "SyS", but it doesn't handle ".SyS" compared to ".sys".

-- Steve



More information about the linux-arm-kernel mailing list