Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp126375rdb; Mon, 18 Sep 2023 09:58:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqR8L7Iqkr3MqUcCly6xWjlADJ6s84XHbH9h/G1BzTM+dTVLPc2THQm40Vs+k/u32EsKuV X-Received: by 2002:a05:6a20:42a7:b0:138:92ef:78f9 with SMTP id o39-20020a056a2042a700b0013892ef78f9mr10144619pzj.6.1695056314029; Mon, 18 Sep 2023 09:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695056314; cv=none; d=google.com; s=arc-20160816; b=UIvN/TuW5HWp/3z3J1F2rCzC1dK5i9lGraCjaksClVgT+s05eVX18UrqrkrV4ZtF78 06lmVzqhntFxiFvP/MwJ2FuyKrN6HSY7qpiyrO46ONjuhmqEYxTw/R/K2BGbyddCDEtA PWTjykVBn+Ysi2G8ywyVbMnIjo0vV+J6kYlACjWD2dyk6OUkzmSYIUFJ3RHaL4fo8zbR ZzH7RqozHbfwW6TAUxj112RASrp1G4go7d4xKcOtVtkOwpF0UgxcMQpJRwpq1QEBSjEr E03woHpUE/U1iBcQjMmPw1tBbVw9VjjxYhlS3R2jZP80TIZbBuQ+XEKPDMs7ybEg4FRe vi2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=npyytzb/8fGfFOzFWav6JIpKQnixl0/mUAWigmTXJoE=; fh=scilAdHnzANmInNSp/ngESS8QzLXo4k1m5+MMoKuvtc=; b=J3PO8GBmQ4pedBV1Xybb3p5jp1yAoV8lPEe/KK0MLhvn93W8WVr1cFf1ihk2oZFezl 3AH9m2d1GOiR66yepAaNXQ60L3eP+RwAZ4tfFQjp+d/hlGf73YHmsxcTwdnxoVIghxAt 7lrGHUlSMHmmU0AdUdErFV1VIk0IASuoU+CfS6NKlwVONDQHpSIEHiZzDGhv2MnENo+n MK40XJfXPUUg3Z9l7nFknR8qwdMr5bJro4eXGJEZWdR1jgJo4HPX9nc+00X+hXIsvHMw 7Gcyz3U/pAOQAAZJSsTlbEjFV+Y+RAMq5vW4qZ8bl818/DY4SceBnL8vIGEsBlz+3HZo gNZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=KER+sb53; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id 203-20020a6301d4000000b0057888936295si1975087pgb.767.2023.09.18.09.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 09:58: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=@google.com header.s=20230601 header.b=KER+sb53; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 0C61F8087CAC; Mon, 18 Sep 2023 09:08: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 S229905AbjIRQIa (ORCPT + 99 others); Mon, 18 Sep 2023 12:08:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjIRQIJ (ORCPT ); Mon, 18 Sep 2023 12:08:09 -0400 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE9518C for ; Mon, 18 Sep 2023 09:06:16 -0700 (PDT) Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-41215efeb1aso30560951cf.1 for ; Mon, 18 Sep 2023 09:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695053176; x=1695657976; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=npyytzb/8fGfFOzFWav6JIpKQnixl0/mUAWigmTXJoE=; b=KER+sb53uKOLf9hVKWXR3A6+wLTGwA3dJryEkYbj4mUmUJolfVJ/65dbpU+gqfS2d/ vAqaOcTEq+uwydtWtaTfeUhvx3ad1O03Tsa0bHmWw6H+uWUe0f51KZT/caB0SNX9+EA7 nhkuQNwFT1ATwMDVR2IGWBNd+iHusLvpUQ7BpJzzOJ7wH0L0cI2PwXrcAnFGw1DmBT0b 0YJeyORXR0ZOzo4j3VIO2tvzrG0fff28GGSyr3sXRRK3diflEa4ITBBltBWexjq3qAIB FE+YCffC0yBEJgUb6JDVxAgAFVwyvzulMKXXtcnZRYSJB0h1SK86Cq22PKfbtT9fZfAE bMlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695053176; x=1695657976; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=npyytzb/8fGfFOzFWav6JIpKQnixl0/mUAWigmTXJoE=; b=E6ybKnWcT0tVl3GPaKDjtPxJp7P2phUdiu3S1M10VwjILu1+KTynzWO3XAbaI77OpJ tpo63rFt4CgMMXTIk3ADTwP5WFq+f5/cmjcEOUKvKKqdTGj9G2rpcc9rlVxQEVqonVbd JA1IIcv1lk4003A7Sfih7SAGwP2HMo1B/ZaaNU7WDUm76ve9Q96SLtSPhD6OQncojEvZ 2UmhOK7axfZ2xIdcMKqutqZ5sUDS7agC74/LPILdCunIQ6k8Zb+sjmi6z5vZPUheOkWX 4Hd9cKwvGMrkEebbQpop+aJ7lSP6NmgGReMdTAPZ/z6LBBec+HxfiO30ZYmsoQo+N8a4 rlBQ== X-Gm-Message-State: AOJu0Ywq+haGmKXxc6b7+WgHpEirbafWritPi78+kkKu2W94kuVvBaZl nWcquxZQHYdBbX+NEM5Hgxy9sGJ1sPIcNqzlcZYhIJnXHyyB+mkEemw= X-Received: by 2002:a0c:f547:0:b0:63c:fbd0:6361 with SMTP id p7-20020a0cf547000000b0063cfbd06361mr9120163qvm.37.1695052283895; Mon, 18 Sep 2023 08:51:23 -0700 (PDT) MIME-Version: 1.0 References: <20230914131225.13415-1-will@kernel.org> <20230914131225.13415-2-will@kernel.org> In-Reply-To: <20230914131225.13415-2-will@kernel.org> From: Nick Desaulniers Date: Mon, 18 Sep 2023 08:51:13 -0700 Message-ID: Subject: Re: [PATCH v4 1/3] scripts/faddr2line: Don't filter out non-function symbols from readelf To: Will Deacon Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Josh Poimboeuf , John Stultz , linux-kbuild@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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]); Mon, 18 Sep 2023 09:08:32 -0700 (PDT) X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On Thu, Sep 14, 2023 at 6:12=E2=80=AFAM Will Deacon wrote= : > > As Josh points out in 20230724234734.zy67gm674vl3p3wv@treble: Perhaps a suggested-by tag would be appropriate then? Next time. > > > 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 LGTM; thanks for the patch! Reviewed-by: Nick Desaulniers > --- > 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=3D1 > > - done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' = | ${AWK} -v fn=3D$sym_name '$4 =3D=3D "FUNC" && $8 =3D=3D fn') > + done < <(${READELF} --symbols --wide $objfile | sed 's/\[.*\]//' = | ${AWK} -v fn=3D$sym_name '$8 =3D=3D fn') > } > > [[ $# -lt 2 ]] && usage > -- > 2.42.0.283.g2d96d420d3-goog > --=20 Thanks, ~Nick Desaulniers