From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55584 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755409AbeFSCrq (ORCPT ); Mon, 18 Jun 2018 22:47:46 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5J2i4RF030416 for ; Mon, 18 Jun 2018 22:47:46 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jpna800v1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 18 Jun 2018 22:47:45 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jun 2018 03:47:44 +0100 Date: Tue, 19 Jun 2018 08:17:32 +0530 From: "Naveen N. Rao" Subject: Re: [PATCH 4.16 188/279] powerpc/trace/syscalls: Update syscall name matching logic To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Sasha Levin , Michael Ellerman , stable@vger.kernel.org References: <20180618080608.851973560@linuxfoundation.org> <20180618080616.710967415@linuxfoundation.org> In-Reply-To: <20180618080616.710967415@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT Message-Id: <1529376430.qcfk1uw0rc.naveen@linux.ibm.com> Sender: stable-owner@vger.kernel.org List-ID: Greg Kroah-Hartman wrote: > 4.16-stable review patch. If anyone has any objections, please let me know. Please drop this and the next patch since these depend on commit e145242ea0df6, which is not in v4.16. - Naveen > > ------------------ > > From: "Naveen N. Rao" > > [ Upstream commit 0b7758aaf6543b9a10c8671db559e9d374a3fd95 ] > > On powerpc64 ABIv1, we are enabling syscall tracing for only ~20 > syscalls. This is due to commit e145242ea0df6 ("syscalls/core, > syscalls/x86: Clean up syscall stub naming convention") which has > changed the syscall entry wrapper prefix from "SyS" to "__se_sys". > > Update the logic for ABIv1 to not just skip the initial dot, but also > the "__se_sys" prefix. > > Fixes: commit e145242ea0df6 ("syscalls/core, syscalls/x86: Clean up syscall stub naming convention") > Reported-by: Michael Ellerman > Signed-off-by: Naveen N. Rao > Signed-off-by: Michael Ellerman > Signed-off-by: Sasha Levin > Signed-off-by: Greg Kroah-Hartman > --- > arch/powerpc/include/asm/ftrace.h | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > --- a/arch/powerpc/include/asm/ftrace.h > +++ b/arch/powerpc/include/asm/ftrace.h > @@ -73,13 +73,9 @@ struct dyn_arch_ftrace { > #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME > static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) > { > - /* > - * Compare the symbol name with the system call name. Skip the .sys or .SyS > - * prefix from the symbol name and the sys prefix from the system call name and > - * just match the rest. This is only needed on ppc64 since symbol names on > - * 32bit do not start with a period so the generic function will work. > - */ > - return !strcmp(sym + 4, name + 3); > + /* We need to skip past the initial dot, and the __se_sys alias */ > + return !strcmp(sym + 1, name) || > + (!strncmp(sym, ".__se_sys", 9) && !strcmp(sym + 6, name)); > } > #endif > #endif /* CONFIG_FTRACE_SYSCALLS && !__ASSEMBLY__ */ > > >