From patchwork Sat Jan 7 13:32:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 40392 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1301694wrt; Sat, 7 Jan 2023 05:33:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXu9O5HgU4SzrR1ix2HXhczzki5aoLgTtfNbhLE+XSGGsrNwenKiXWq3k1smXL7WfCYReeLT X-Received: by 2002:aa7:d7c2:0:b0:472:cee9:bbd3 with SMTP id e2-20020aa7d7c2000000b00472cee9bbd3mr52359931eds.27.1673098438744; Sat, 07 Jan 2023 05:33:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673098438; cv=none; d=google.com; s=arc-20160816; b=r7K9cvaTuz1jiJivhk/E/UYkqZ8pxKj+mOzQ4ELf6H4yePNB0DakZGH/1/qZAq8TOg yN/F0wZXGVp5NIE5D9KqG2ImWLt/Ddv7XjdhP/BDDyY8MMaawNHgy6L49WLNNObIwHZE c6LJziK+uCaffKU9M9XOv9BGQ6NTdSvNalJF88HlBeq4i8LH9f6mPT1+7dmfyQqaQi37 0WfAVZlUn+EObhVPTMq/xBedABnCKosvV0HM3rc9QQgLTOVp1MpnfEHJju+BVQANSSfo AZ/rcT7Ni7wTn6tkqSQYUYU+yh+YFCjfAs2M83TJupB80R2Td14jptRXL5rsaYRBC9lp Xafg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=28E7gdYazt531c2beqCT8itDtKdSeodKvxC3nw5q6lI=; b=DnVsO7gATUmnL6ynJcsh0Zg6JogHKem8l+FNJmgrORI3vc1LLXDTikjYytkA5h+r87 4noJMm6IawtIRxluYJ2VuZTJPxtLr8kGb6o3dft1Zx7zP17UGodjL3boWBHuYnkOSHc9 DMi1gU0dQ2G8PcxpBXjPhg04WYvk59/hXHYIE9NcXlQ5RewIRb8Qacol8rjFFvQtdFsq 98Ade0LhkfKF5KE9RtSO/pho7gzC8a5UvRWHNhUlqYFTVncTGp3GCVxXHVzCBipm/M9a kHBUVFnevJh0PVwzRbFIyMQ7wgqyhR9Tzh76Gy7I7LiFsMC3usZ8et47H2qwvdVqYj2j fJ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u5v0ZpD7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r19-20020a05640251d300b00485220caa05si5191029edd.597.2023.01.07.05.33.35; Sat, 07 Jan 2023 05:33:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u5v0ZpD7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbjAGNdO (ORCPT + 99 others); Sat, 7 Jan 2023 08:33:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232342AbjAGNcl (ORCPT ); Sat, 7 Jan 2023 08:32:41 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B1305E0B7; Sat, 7 Jan 2023 05:32:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9B1E960C08; Sat, 7 Jan 2023 13:32:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B7D7C433EF; Sat, 7 Jan 2023 13:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673098360; bh=QQjmgf5W/T/Kzs3A2mqRoW9fGZAadyb1nwhZ/JNs3Uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u5v0ZpD7GrnovovNTeycO7D8G9AusoUDyOmMLdWFRQXW2hGZat6+XCcMYZlvUIkcr 3Si5qSbWy8UEMjnx2xg7tuPr4jsi2uaBf67bpkW0xmc+kGAUUDNVQ7xpGCayNWXlFj 7fV2ib8aRBgK1Ke1cZZFM0N8y1sMS89yuTJKvRZMMCbMynFiAuZjCi4vjoEPyRP0lI pkwq2Jpme+73ahSaxONYJ7Wbi9aRRhYrCgshZxV/39CTOqBQ+9ZivZ3yzD7hWqI5Vc mKR908XXakWA0rznLWnDbW+DrZ0nghg7Wr6JPBqAyRmn5+OZxVKFByLJkaryo9D/DC vGOoyXIfw6NCQ== From: "Masami Hiramatsu (Google)" To: Shuah Khan , Steven Rostedt Cc: Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH 3/3] selftests/ftrace: Fix probepoint testcase to ignore __pfx_* symbols Date: Sat, 7 Jan 2023 22:32:36 +0900 Message-Id: <167309835609.640500.9664678940260305746.stgit@devnote3> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <167309832823.640500.13244630381161014364.stgit@devnote3> References: <167309832823.640500.13244630381161014364.stgit@devnote3> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754370868552112725?= X-GMAIL-MSGID: =?utf-8?q?1754370868552112725?= From: Masami Hiramatsu (Google) Fix kprobe probepoint testcase to ignore __pfx_* prefix symbols. Those are introduced by commit b341b20d648b ("x86: Add prefix symbols for function padding") for identifying PADDING_BYTES of NOPs. Since kprobe events can not probe these prefix symbols, this testcase has to skip those symbols. Fixes: b341b20d648b ("x86: Add prefix symbols for function padding") Signed-off-by: Masami Hiramatsu (Google) --- .../selftests/ftrace/test.d/kprobe/probepoint.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/probepoint.tc b/tools/testing/selftests/ftrace/test.d/kprobe/probepoint.tc index 624269c8d534..68425987a5dd 100644 --- a/tools/testing/selftests/ftrace/test.d/kprobe/probepoint.tc +++ b/tools/testing/selftests/ftrace/test.d/kprobe/probepoint.tc @@ -21,7 +21,7 @@ set_offs() { # prev target next # We have to decode symbol addresses to get correct offsets. # If the offset is not an instruction boundary, it cause -EILSEQ. -set_offs `grep -A1 -B1 ${TARGET_FUNC} /proc/kallsyms | cut -f 1 -d " " | xargs` +set_offs `grep -v __pfx_ /proc/kallsyms | grep -A1 -B1 ${TARGET_FUNC} | cut -f 1 -d " " | xargs` UINT_TEST=no # printf "%x" -1 returns (unsigned long)-1.