Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1463758rdb; Mon, 2 Oct 2023 10:11:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE2jzq4HSWP9BCpfwkzCt4xe1x2pkxTUWfURvqKRx/Ipyv4qL7bmMY06hdnWE/qLpzPdUrd X-Received: by 2002:a17:90b:11d6:b0:276:7806:9aee with SMTP id gv22-20020a17090b11d600b0027678069aeemr11522156pjb.26.1696266660552; Mon, 02 Oct 2023 10:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696266660; cv=none; d=google.com; s=arc-20160816; b=x3v+jbmB/g/DTJiOvRd3MOEsxHXLIQnW2UlXYKT72v3q2VaCCRs649JTnstxQLJ7U6 YkE9PA/o9xZTjdaxYdVRX3H1oWmG6h25FihhHH4ywQW7fEqUyNJmfLZahviXsbPS/pJx 8TYpPUM7qv7PGkuokGccz5dEIynqxd5EuRAif12yjbML/+IzA7aGroRP5w6OwhF1JaQ2 iv8HwjN7U02+rblIhGRD5hcV4xzQgIdoweRJFq3W54AqlIVQn9pKBy9kgLC5JlPFT/cO PmtKNh/pthCWm29oxtHN/MOixilcwvzE0dgByzWRva4rgoFO2eWv3DL9K0aT6t4Vanbg 0zvw== 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=jYrFI080nZi5RKonwh7CXVdzhsApxR87GYYT80YkBds=; fh=wjEl6BofP0c7WzG34c/USSQ7C1FfAme8r/K9vYTfZuw=; b=bWxXSOx0u8A7BjKTQ+bzG/2H/oREo0cVv9771w7mDjZalH8oS6FTM0kXZi3V7nOC4b Sd8eIMWC5bPDavooJ0zeZuTaNW+GQ4s1+4vYqHEHApXZ+5KeA4u2obWQI0wU3SzGrNpX L9es9Hx2TQBhVKjFDJ/+Ta0d8QMLxiYTtLoarzsU9pfgAP17JYbGT87TFZuAoM2926md Op+EcP8uG3Mvsbv6JGrm3cRNnPuH2qQw6uiEsqFCihAP3DkratMId/bb3hDSgDrAEA6L Xe0QjmW07Za3ER7r0pqAEdXz7nwvou/kFthIyAdXYSokDUfNq5ccG2bo7DGVyc2VWsN9 7xpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hmy8ZejQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id lr14-20020a17090b4b8e00b002773b2dd112si8519598pjb.54.2023.10.02.10.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Hmy8ZejQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 62C06801B6C9; Mon, 2 Oct 2023 09:58:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238453AbjJBQ6E (ORCPT + 99 others); Mon, 2 Oct 2023 12:58:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238530AbjJBQ6C (ORCPT ); Mon, 2 Oct 2023 12:58:02 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CBA9B3; Mon, 2 Oct 2023 09:58:00 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05865C433CC; Mon, 2 Oct 2023 16:57:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696265880; bh=y6877j2bTNQK/NlDbP64SUFTPt4nOaXWX04vbP+P73g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hmy8ZejQMQr9mppLprDw2FZUxnXL+GWtTdfc5nxI8WF7LrtdYXmB8aPOcC1PYcs9n EI4Kg0gqqHVkF+v1KN2+CEtMfxb/+iWB19vFi1NDZONKB461wxPKUHdKSeQDoOYxLS /KA7mrChpNt2Rvi1LPGfKgTjMSMPnmtiWvJMNQekpdf2ayWMbE0Tc5ncFh4vqLZU6K +s62izIU3+M4JJKZXJRlWVoTnUYQW3V1vChjWCN38WSUF0vbUgJlRh0nGTBs7BDVV9 DsR+fqXIef71qsHr2IXBy031ChUI51Wl3o3Wqo/dFO4mR9pIpTCWFgTao2uiv6b2Vi KPRTgl6Ye96Ww== 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 v5 1/3] scripts/faddr2line: Don't filter out non-function symbols from readelf Date: Mon, 2 Oct 2023 17:57:47 +0100 Message-Id: <20231002165750.1661-2-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20231002165750.1661-1-will@kernel.org> References: <20231002165750.1661-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Mon, 02 Oct 2023 09:58:19 -0700 (PDT) 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: John Stultz Suggested-by: Josh Poimboeuf Reviewed-by: Nick Desaulniers 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.582.g8ccd20d70d-goog