Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754515AbcKOPSb (ORCPT ); Tue, 15 Nov 2016 10:18:31 -0500 Received: from bes.se.axis.com ([195.60.68.10]:34638 "EHLO bes.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbcKOPSa (ORCPT ); Tue, 15 Nov 2016 10:18:30 -0500 Date: Tue, 15 Nov 2016 16:18:27 +0100 From: Rabin Vincent To: Steven Rostedt Cc: Russell King - ARM Linux , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: ftrace: fix syscall name matching Message-ID: <20161115151826.GA14085@axis.com> References: <1479128625-20948-1-git-send-email-rabin.vincent@axis.com> <20161114134017.GJ1041@n2100.armlinux.org.uk> <20161114104008.36e9c40d@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161114104008.36e9c40d@gandalf.local.home> User-Agent: Mutt/1.5.23 (2014-03-12) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 19 On Mon, Nov 14, 2016 at 10:40:08AM -0500, Steven Rostedt wrote: > On Mon, 14 Nov 2016 13:40:17 +0000 > Russell King - ARM Linux wrote: > > On Mon, Nov 14, 2016 at 02:03:45PM +0100, Rabin Vincent wrote: > > > +static inline bool arch_syscall_match_sym_name(const char *sym, > > > + const char *name) > > > +{ > > > + /* Skip sys_ */ > > > + sym += 4; > > > + name += 4; > > > > 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. I ended up just getting rid of the skip and comparing the whole name instead. I've sent a v2.