Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp948015ybz; Fri, 1 May 2020 11:27:30 -0700 (PDT) X-Google-Smtp-Source: APiQypLLKeVbJtQAdnxKFuCZfBOFSqGGS4+WaX21nHTEhX4+2F95Y/zVYvB2zQwgwqNiI3uE0s+C X-Received: by 2002:a05:6402:1ad0:: with SMTP id ba16mr4717421edb.11.1588357650497; Fri, 01 May 2020 11:27:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588357650; cv=none; d=google.com; s=arc-20160816; b=TT1GfZ/CDQT3HShJQUZx+4vAdhR5zS8T/ahNMvevBApfAOuaZwTo8KLbjuY35P9qw8 LEZ29GAJSD+YLpgT2eYLY/Y/Q2VITC3C9Otwqev2xZxtRo/nlrjaXMChpIzs6sks+JVf wR8DiAQLVInJ8DsS5LdEss7XW2BLh45AvSaY9LwA/wKVdjnlh5zjyKTYZG1PMhYf5ZKZ W4bxyctUu0Fj8lQuwSE9aVLFgErY70yUAP/96Q58LYhX3YnY7wVysAWe4gPYw0e5SAux c4oqBI9X/jphclrWZLxoDsBDItfddzCc+w1d4/2w+8kA3W4WVgFIkTLB+Ni0e+PtDEod o4qQ== 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 :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=pBc2U3jksjhyGy9IMmnSXQ8oHkSceV7INtjYlzR2yKs=; b=nvz5LB0x66ez1wRS4VBF5aqxJKgTyiFK2K9K9eqNZWqy4rNmJDEao1QAhYaQrUcLVC RWmJrcEOBlsy13p9hiMHAfr1IefopSWDwG3nZF81Hs87YkrPHJBAKVyOAwYanKzoOmnh vKow/3qVcRoWlpPgM9eTbjgsuYy9SnXJsVxx36Dw1yTJGt+xCaVptNilzNHG+pZT9fo7 /tOJKtrQXmROthrX7UObGXBNFxQ/K3rWpytOHXAwaalZXtdRAtfY9deAf1dp72AYCoiQ beekUWac7iX9t/WrycAokyavmPe0yttZKY1Lc0OxzSz0Em9W0QyhjOp6XOL8YkQwSA+C GbFA== 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 i21si2296685ejh.256.2020.05.01.11.27.07; Fri, 01 May 2020 11:27:30 -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 S1730888AbgEASXJ (ORCPT + 99 others); Fri, 1 May 2020 14:23:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730703AbgEASWb (ORCPT ); Fri, 1 May 2020 14:22:31 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7418CC061A0E; Fri, 1 May 2020 11:22:31 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jUaIu-0003jK-2s; Fri, 01 May 2020 20:22:28 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id CF7781C04DD; Fri, 1 May 2020 20:22:24 +0200 (CEST) Date: Fri, 01 May 2020 18:22:24 -0000 From: "tip-bot2 for Konstantin Khlebnikov" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] ftrace/x86: Fix trace event registration for syscalls without arguments Cc: Konstantin Khlebnikov , Thomas Gleixner , "Steven Rostedt (VMware)" , x86 , LKML In-Reply-To: <158636958997.7900.16485049455470033557.stgit@buzz> References: <158636958997.7900.16485049455470033557.stgit@buzz> MIME-Version: 1.0 Message-ID: <158835734479.8414.1154640678275011655.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 The following commit has been merged into the x86/urgent branch of tip: Commit-ID: fdc63ff0e49c588884992b4b2656345a5e878b32 Gitweb: https://git.kernel.org/tip/fdc63ff0e49c588884992b4b2656345a5e878b32 Author: Konstantin Khlebnikov AuthorDate: Wed, 08 Apr 2020 21:13:10 +03:00 Committer: Thomas Gleixner CommitterDate: Fri, 01 May 2020 19:15:40 +02:00 ftrace/x86: Fix trace event registration for syscalls without arguments The refactoring of SYSCALL_DEFINE0() macros removed the ABI stubs and simply defines __abi_sys_$NAME as alias of __do_sys_$NAME. As a result kallsyms_lookup() returns "__do_sys_$NAME" which does not match with the declared trace event name. See also commit 1c758a2202a6 ("tracing/x86: Update syscall trace events to handle new prefixed syscall func names"). Add __do_sys_ to the valid prefixes which are checked in arch_syscall_match_sym_name(). Fixes: d2b5de495ee9 ("x86/entry: Refactor SYSCALL_DEFINE0 macros") Signed-off-by: Konstantin Khlebnikov Signed-off-by: Thomas Gleixner Acked-by: Steven Rostedt (VMware) Link: https://lkml.kernel.org/r/158636958997.7900.16485049455470033557.stgit@buzz --- 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 85be2f5..70b96ca 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