Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1748465rda; Tue, 24 Oct 2023 01:53:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDRHz9pH7PQ/WMnoU+YzlKOfbr84B1kpovjeNxBmeBf2BUisXmgt+O5uZNDHbs1YCgnuo0 X-Received: by 2002:a05:6a20:2324:b0:153:7515:9919 with SMTP id n36-20020a056a20232400b0015375159919mr1556705pzc.21.1698137614561; Tue, 24 Oct 2023 01:53:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698137614; cv=none; d=google.com; s=arc-20160816; b=nAplZkvY/kQoiEYkqJpIJV8uOgETZUVmlB239RcLlwg+nfnJ9OcBcalPIvpyuGd0mQ hv0knG8CEOVJF3Irye2HdWZf+J3wkjp1qyc9R1ENJqbin4YnaiEgFeyXZfSRvDc3QuvN F27aUSzs1pJv63LfVrJrk3ADQM0GfvcmXU3GOx4DYPBW/Es3oDYqFP9xxd4y8P7CLR3V YG0crC+oAG972Vd2MtydAmNvbyYIMge0GQcC0NyKsb6RF8PWH0IU0sZqTjCV3u0pF8at 3SXWCh12GfgPcHHYJmdHaD/lyK5i56DK1yetLBsb5gNEdBDKvgTZ+wfBwV3j7HcSDu88 P38w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=lS1Bbe/z0U0icdz60j0w4WUA/D2ksSJYKyfO95quWrM=; fh=naV9MMXPdc6hMsF/4ETZkFQMJcEe8RiclHCx4G3RCbc=; b=thsHGENUI0H5IzK3Y++KlTegzJPJTpPTDa0Wpr2I0BgPf6EnUvcEGidbOxIp+pcnIy S7BLwcvcEapMAgr+6cTvfZvrT6YQMQ5GPpDf0dagVfSLaUPQ/Q1XvVc+2ewr7u1eW23X aWw+0g95kZ4/Yx+YdTwQNIft12hGdKA7kgmu3C9MHoALfSNNswTl+PYBqlnfCdJJ14T3 r9xsS8bqXh+uo/5q8JcRgBtLVfLGHDDGOo5bMoU8SMyqoq9RP7weYm8ddblZMjJxTCOx jlXEfd85tPRNnpNcZ1Z/BrV77pQ2LbCQUTXkq6MIhT1SKlv9+Azg6FJSL5FIpUQv5DD0 50VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ArY7IDPO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id h12-20020a056a00230c00b00690d695b113si8370644pfh.337.2023.10.24.01.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 01:53:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ArY7IDPO; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0FCF1803B351; Tue, 24 Oct 2023 01:53:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232926AbjJXIxR (ORCPT + 99 others); Tue, 24 Oct 2023 04:53:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234088AbjJXIxE (ORCPT ); Tue, 24 Oct 2023 04:53:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D224B172C; Tue, 24 Oct 2023 01:52:46 -0700 (PDT) Date: Tue, 24 Oct 2023 08:52:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1698137565; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lS1Bbe/z0U0icdz60j0w4WUA/D2ksSJYKyfO95quWrM=; b=ArY7IDPOixc5JG7+NbR8XOV6whtERyE6OztxH6tl3VKxYsX2+ngdsYR4osRKzseEqXFwn7 6SGNpNyOLVOKjTjxQYot+wOJb66F31U0Vtd55pX0mFjsDIw/l6KvU2KIkNmGtWPnqvm4Th h9ubDkiSi+u9l9VctDPR8JuArsHqDFmmUpgJj+Z67yMHwiIAR8byZlGHpoqVoIueQR5kvq k5WtQ7xempEYGy1JD1mYpdcZYiuOADIshCJq7YW6wzBiTLAZaWA2DlglCtRFN9qTP5Zl+l MQNdBncx/1ykl3s80BS1tkrjdWQrW/eO/L+hDIhX5cw/uA8qz8ZfxHXQbGUI4g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1698137565; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lS1Bbe/z0U0icdz60j0w4WUA/D2ksSJYKyfO95quWrM=; b=ZbMfJczIEKE0r8OZbD3RLXqjZVjo64sv9bS2+oRtElem72wF8d7oF8hwoROv4FXUNMDCBj 64D3Zp70ybc0d0BA== From: "tip-bot2 for Will Deacon" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: objtool/core] scripts/faddr2line: Don't filter out non-function symbols from readelf Cc: Josh Poimboeuf , Nick Desaulniers , Will Deacon , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230724234734.zy67gm674vl3p3wv@treble> References: <20230724234734.zy67gm674vl3p3wv@treble> MIME-Version: 1.0 Message-ID: <169813756439.3135.10447231132133711820.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 morse.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 (morse.vger.email [0.0.0.0]); Tue, 24 Oct 2023 01:53:32 -0700 (PDT) The following commit has been merged into the objtool/core branch of tip: Commit-ID: 180af1a5bdaf8d4964837a46a9fce8c3a7fd2d97 Gitweb: https://git.kernel.org/tip/180af1a5bdaf8d4964837a46a9fce8c3a7fd2d97 Author: Will Deacon AuthorDate: Mon, 02 Oct 2023 17:57:47 +01:00 Committer: Josh Poimboeuf CommitterDate: Mon, 23 Oct 2023 08:35:01 -07:00 scripts/faddr2line: Don't filter out non-function symbols from readelf 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. Suggested-by: Josh Poimboeuf Reviewed-by: Nick Desaulniers Link: https://lore.kernel.org/r/20230724234734.zy67gm674vl3p3wv@treble Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20231002165750.1661-2-will@kernel.org Signed-off-by: Josh Poimboeuf --- scripts/faddr2line | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/faddr2line b/scripts/faddr2line index 0e73aca..a35a420 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