From patchwork Tue Oct 24 08:52:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 157310 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1805654vqx; Tue, 24 Oct 2023 01:53:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH83LJDsYr5tdlZYEmrzr/1w/p+LOAoOOOlJwovm/P5WpnUMH1HrpyiJcO6dlCriz6eOQ9b X-Received: by 2002:a17:903:27ce:b0:1c1:f6d1:3118 with SMTP id km14-20020a17090327ce00b001c1f6d13118mr10542608plb.27.1698137624915; Tue, 24 Oct 2023 01:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698137624; cv=none; d=google.com; s=arc-20160816; b=gX4Rd8YYNM3pGUoy6DjidqhwqQBOpDGjgkC6FzNvyrAoeJ3x5ysPihowOKyfk+7waH HY2q7UJI8Pz6UaVdGm7dolkZfr62i1y2iXaiuNRQmRLRZCTdpeKCiuS/dBT9E3Za+TkP dRGqJ3a8+1j6hgSOV913gQA8bcsBUL0PcTf2lQCTCi9Y8YznY+nEkhxxI5eMud9F+SrQ q/MbW0namPxTo7KAWyG+kqa/6nKCwkQODUwATuui8Q070kZsO349S/tjtB3cOSoSzKjc jqkLpUIerWSzbqmrJqzfr3aFFobo9mrlFIMlcx3l/zVe/zCgBckpE/QIoT+3znSGaI2M jEjQ== 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; 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id e17-20020a17090301d100b001c9cd55e303si8159796plh.589.2023.10.24.01.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 01:53:44 -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; 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 92DE1803B351; Tue, 24 Oct 2023 01:53:42 -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 S234023AbjJXIxS (ORCPT + 26 others); Tue, 24 Oct 2023 04:53:18 -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 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:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780626357875885132 X-GMAIL-MSGID: 1780626357875885132 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