Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2969539ybz; Mon, 27 Apr 2020 07:47:16 -0700 (PDT) X-Google-Smtp-Source: APiQypLdLxmrAn4SeGGOSkzqPjC8OTgvoMU8cVcGmo/ONzpOKrqc8c49dEc8BKjP4AnTNwRd+tpI X-Received: by 2002:a17:906:7ac8:: with SMTP id k8mr20641617ejo.235.1587998836638; Mon, 27 Apr 2020 07:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587998836; cv=none; d=google.com; s=arc-20160816; b=BmE/BpfR4BeHhq6kQOM++EO/ZhoLVhESCupAIYOZTa2LXhALBEgpS6PnQcCovos9lX WsewnY6xZbp7OxhuIlgbmA616Jw5niEagWs2VCrf7CMg1u9kJnHJtKzZLU/bSImh2ThZ X8rHk6scloj82bLW49JKGLKR5UKnnzRlfEPfzLMc9AObaLGFWfuUg4bCsuuSZ6mouKAk btpQ3Qki8UuTmuMWwlNq2DRns7dVXmJyvfkhkRdvfhQxGQDrP2TwrKeAlzMAmI76tuqt LZ0UGJdU+0RqkmDFQG3Z/Vkyr6RdUTDqHiWTaI/4jhXIGjESKyFSUAY6VNcPQ9Tw+YP6 J8Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=CIgo4vHF1CVgMlXydW6jPT2SeFNw9AIyUKG4rt0kifc=; b=xG4AUcL0n9mRHPLtHeRINfe8dNeKjjVCKQzBHepgUIAt2uDPFgUM8u0bRtOZSw5yO1 S0v2MomYgtjPFOhquFCwR+xjG7q+ZlQZvS6TruafILYcmN3sQlF0LM9GjNQ1XUgjO35r 0zm1GO7tptrjh1Pd69rT10cJGgPvo251waXtHY4A/B6XFT4n9abL72hxdyGwOxomLwpM zrByMjOabe4qgc/d4rhNKF7+ODLzMA9DvufkN+VneGG4YMcBOPUL5nL/yvpKYZThxHUk Tsd+yGfQ/SGQSD0jMmVg5Xe+gME2uJF+HYDP/g9VHXJaY1YcuQ+kNW3Aat66e1LHP8Lx yp3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 35si8270109edm.560.2020.04.27.07.46.46; Mon, 27 Apr 2020 07:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727981AbgD0Oou (ORCPT + 99 others); Mon, 27 Apr 2020 10:44:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727077AbgD0Oot (ORCPT ); Mon, 27 Apr 2020 10:44:49 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A27D4C0610D5 for ; Mon, 27 Apr 2020 07:44:49 -0700 (PDT) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jT501-0005LI-NJ; Mon, 27 Apr 2020 16:44:45 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id E65B0100606; Mon, 27 Apr 2020 16:44:44 +0200 (CEST) From: Thomas Gleixner To: Konstantin Khlebnikov , Brian Gerst , linux-kernel@vger.kernel.org Cc: Dominik Brodowski , Andy Lutomirski Subject: Re: [PATCH] tracing/x86: fix trace event registration for syscalls without arguments In-Reply-To: <158636958997.7900.16485049455470033557.stgit@buzz> References: <158636958997.7900.16485049455470033557.stgit@buzz> Date: Mon, 27 Apr 2020 16:44:44 +0200 Message-ID: <87368pq97n.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Konstantin Khlebnikov writes: > Syscalls without arguments now has no ABI subs, instead of that macro What is 'ABI subs'? > SYSCALL_DEFINE0() defines __abi_sys_name as aliase to __do_sys_name. > > As a result in find_syscall_meta() kallsyms_lookup() returns > "__do_sys_name" which does not match with declared trace event. > > Also see commit 1c758a2202a6 ("tracing/x86: Update syscall trace events > to handle new prefixed syscall func names") > > Fixes: d2b5de495ee9 ("x86/entry: Refactor SYSCALL_DEFINE0 macros") > Signed-off-by: Konstantin Khlebnikov > --- > arch/x86/include/asm/ftrace.h | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/include/asm/ftrace.h b/arch/x86/include/asm/ftrace.h > index 85be2f506272..70b96cae5b42 100644 > --- a/arch/x86/include/asm/ftrace.h > +++ b/arch/x86/include/asm/ftrace.h > @@ -61,11 +61,12 @@ 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 > - * "__x64_sys", "__ia32_sys" or simple "sys" prefix. > + * "__x64_sys", "__ia32_sys", "__do_sys" or simple "sys" prefix. > */ > return !strcmp(sym + 3, name + 3) || > (!strncmp(sym, "__x64_", 6) && !strcmp(sym + 9, name + 3)) || > - (!strncmp(sym, "__ia32_", 7) && !strcmp(sym + 10, name + 3)); > + (!strncmp(sym, "__ia32_", 7) && !strcmp(sym + 10, name + 3)) || > + (!strncmp(sym, "__do_sys", 8) && !strcmp(sym + 8, name + 3)); > } > > #ifndef COMPILE_OFFSETS