Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3227905ybz; Mon, 27 Apr 2020 12:15:36 -0700 (PDT) X-Google-Smtp-Source: APiQypLh2Ob0hwuki6qjvd2iAgDQWdV5uPy0q3wiAw9QcSix7l6ZlV2TBYG54k6VcNFr5tTO2jdz X-Received: by 2002:a17:906:b896:: with SMTP id hb22mr20664147ejb.209.1588014936327; Mon, 27 Apr 2020 12:15:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588014936; cv=none; d=google.com; s=arc-20160816; b=Kp8pH3GD30vRuPoM7ZRwA3fxiuygvknnA+i2Uw1dVTQRFNm70qYsbAPT5zKg4DglaC mTAE8fVsqVAHZA3ZvhAsNLL8Nv50k2jJKn29piYbtiPxe2SIhOBs0Y3TRnz1x0fHD5KP 8Dv1YyLWllGh6KZDH2LGUsi9nFsgjbE8DNO59QTqnsGTySA40WYdCpdSe4+rf0GymAfk fEtb3o+O88NTaj13cL227FzEVD4Vo9mb5/7PEOR8Lz6tJPZgkjhGsIW/j9oK7AdIxDrx 9Jv/hRQBp2S2lM37cMBHISrjt2I2gbId6xaMtAcoCYU3INoA5GAOcEL2fTcs4FPmcFhm FCvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=9zkyLL/8OII26EKnr+jOcrrt8ZtA3CphISX84CYBk5s=; b=yWJ3s6c4hxCSM5lcfiD7lkS4Plre5YZYLKZnowdFNiFzslVwxA56/bJtgl2G0gp/3r Z2FLej5KhhULVouvjY8YEYKFXj0KqJPVP/STZ0mrIziprLLCOT3TGxzNcA2EO+W/lg+2 4q9LCSwofwzThwf5D+/BAea/OQLOoVgQ6sYQfNfgoUO6nEgzTy+uQRw9xA61o6dbT2ou BV4i2RXZ89JxWGlcH3jVFWQGcezVpSt0vFXXkZbJ2oURzsgUOmwpmmFwWc+uB67KI6DP y8XT0pYa8c2lfFm4f/V+IWC4bsckZGF41pp5RXSaKQ+r1VY3eDvzMJIgj6u5LYd0l/VY KQmQ== 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 i8si326053edy.253.2020.04.27.12.15.12; Mon, 27 Apr 2020 12:15:36 -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 S1726495AbgD0TNv (ORCPT + 99 others); Mon, 27 Apr 2020 15:13:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:38094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbgD0TNu (ORCPT ); Mon, 27 Apr 2020 15:13:50 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C9D38206B8; Mon, 27 Apr 2020 19:13:49 +0000 (UTC) Date: Mon, 27 Apr 2020 15:13:48 -0400 From: Steven Rostedt To: Konstantin Khlebnikov Cc: Brian Gerst , linux-kernel@vger.kernel.org, Thomas Gleixner , Dominik Brodowski , Andy Lutomirski , Ingo Molnar Subject: Re: [PATCH] tracing/x86: fix trace event registration for syscalls without arguments Message-ID: <20200427151348.6a55abd9@gandalf.local.home> In-Reply-To: References: <158636958997.7900.16485049455470033557.stgit@buzz> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Apr 2020 16:16:20 +0300 Konstantin Khlebnikov wrote: > Bump, bug still present in 5.7.0-rc3 > > root@kernel0:~# uname -r > 5.7.0-rc3-test > > root@kernel0:~# ls -d /sys/kernel/tracing/events/syscalls/sys_enter_{sync,fsync} > ls: cannot access '/sys/kernel/tracing/events/syscalls/sys_enter_sync': No such file or directory > /sys/kernel/tracing/events/syscalls/sys_enter_fsync > > On 08/04/2020 21.13, Konstantin Khlebnikov wrote: > > Syscalls without arguments now has no ABI subs, instead of that macro > > 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") This is the first I've seen of this patch. > > > > 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)); > > } Acked-by: Steven Rostedt (VMware) -- Steve > > > > #ifndef COMPILE_OFFSETS > >