Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3899296rdb; Thu, 14 Sep 2023 06:16:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IED9aIOmuGFrg56NcvO0i1EzpTMZUxBCgN8MYmkO0VqGW0Zo+eSmEuAAKbC1mHcqFyvIRCN X-Received: by 2002:a05:6a20:9749:b0:154:a1e3:f967 with SMTP id hs9-20020a056a20974900b00154a1e3f967mr4752404pzc.47.1694697380269; Thu, 14 Sep 2023 06:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694697380; cv=none; d=google.com; s=arc-20160816; b=izaJRRoMgkNaL56CLnR6qqSI8T5zjE9k6e/Lvn8kXaHbAftvojK4nJ68AGovzbHh93 +PT7p9vpq9ypz6dS3HHZw+AuV2Gtz9T/ZzEYN4msq0bSFW0XpH3uyNRFRvEgZIvk9ydP Xn+Cnr3jTReEU1y8nohLlJ2QP5bLtKwScZLaBUAcAXvfckrrbZgESGIrWQEMXFuARDoT sf/dyOjdaIhw/pd2uxS86Hu35ta+Q8KKJilv8hd/jkU0SHgeZBihnh2RBR6bU3JjdI3O 1TEYNU+dVfSme3rmWWJ0aaazyFrvJEl/yJpabSf2y5938MIuLX3LPaaJQ0esFaXu0VXg aOXg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NbW7MIkyXIxzJ6gvf17IozPiUnh7uppLTtGK4+198js=; fh=wjEl6BofP0c7WzG34c/USSQ7C1FfAme8r/K9vYTfZuw=; b=QtU1DDNuBSMyM/Ue++wgilkrtFl6QjSMCGMmEmAIjnmfFHsfd27UH+v9sY/FvPrCwn I1jaFjsl/5lGupgnj7M7WOQGsixrH3aAcEXKNXfkCIVvEC8LGKdaeBXKdXlJX+uZ1+pS 6cuW//FxI/hoLWgYqzAhLg94MLYJO6yTHq8C5EbAa/HgRk3T0T19BOMWZ08eY/+pg0dd srETH/MT/jdyfQRfkgEnNzGzx35HlBYpE9YvBQsNV86Hz0ReC3xd4aZDTjT/SjjA36dj y6QceN/kZEsnHW7c1ppVQYCodVkf46WKs8lhGPWWybyGqP8JksFqgtyEZGtM6zULdYu7 ctgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mvbcY6MF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id ch12-20020a17090af40c00b0025c0d113469si1606063pjb.58.2023.09.14.06.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 06:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mvbcY6MF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 471D081A6C20; Thu, 14 Sep 2023 06:13:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238823AbjINNMl (ORCPT + 99 others); Thu, 14 Sep 2023 09:12:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238756AbjINNMi (ORCPT ); Thu, 14 Sep 2023 09:12:38 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E87DB1FD4; Thu, 14 Sep 2023 06:12:34 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C3D7C433CD; Thu, 14 Sep 2023 13:12:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694697154; bh=ryVlOrDaoRgntnJXWPI3E7+mf/qDBDaxMn5hmEwKnuQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mvbcY6MF+vDO55aFOcSpYn72XwI1Mzgfy0qmQ109sGU/5cF/I/RENkA2xjQ2L4GRT dCVwSJH+TAGtdGStoqDG9/YmTAJg3Uru9UuUbvSc9gXyxdHvFn5Oql0P2btAMyI5GF Ida5b4gBA4PAg10AOp7wHD8w/78/45gwIQWGmeY8Or2QT6hhvtfuixcB8ViuJrX9H6 6k3NV4EtPU2dgBczU2bAxkVl6bgaOY5U/A/f18ze5fntrcZ/Q8IiFWTjZVf7NegJsz KPnyR8ioMiuN2IeoTgipKYb/TF9cfRRi6mLNv4PzKabkDxj/God0+wF6N+hsNW48qn WxnZ4uWO+3BDw== From: Will Deacon To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, Will Deacon , Masahiro Yamada , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Josh Poimboeuf , John Stultz , linux-kbuild@vger.kernel.org Subject: [PATCH v4 1/3] scripts/faddr2line: Don't filter out non-function symbols from readelf Date: Thu, 14 Sep 2023 14:12:23 +0100 Message-Id: <20230914131225.13415-2-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230914131225.13415-1-will@kernel.org> References: <20230914131225.13415-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 14 Sep 2023 06:13:25 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email As Josh points out in 20230724234734.zy67gm674vl3p3wv@treble: > Problem is, I think the kernel's symbol printing code prints the > nearest kallsyms symbol, and there are some valid non-FUNC code > symbols. For example, syscall_return_via_sysret. so we shouldn't be considering only 'FUNC'-type symbols in the output from readelf. Drop the function symbol type filtering from the faddr2line outer loop. Cc: Josh Poimboeuf Cc: John Stultz Link: https://lore.kernel.org/r/20230724234734.zy67gm674vl3p3wv@treble Signed-off-by: Will Deacon --- scripts/faddr2line | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/faddr2line b/scripts/faddr2line index 0e73aca4f908..a35a420d0f26 100755 --- a/scripts/faddr2line +++ b/scripts/faddr2line @@ -260,7 +260,7 @@ __faddr2line() { DONE=1 - done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v fn=$sym_name '$4 == "FUNC" && $8 == fn') + done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' | ${AWK} -v fn=$sym_name '$8 == fn') } [[ $# -lt 2 ]] && usage -- 2.42.0.283.g2d96d420d3-goog