Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4878766pjb; Mon, 27 Jul 2020 07:26:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy32fE5Alu8moZ5/LJaSZ4d+swR7oGpAY6QY/EXNzn3vulCBAC5MBuejHFsEyYYhStityj X-Received: by 2002:a05:6402:2037:: with SMTP id ay23mr15418877edb.48.1595859991524; Mon, 27 Jul 2020 07:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859991; cv=none; d=google.com; s=arc-20160816; b=i5Kk9SitidHBaPRdt3kr9a30LGELQPRhZYlaVUfwQZVXYT0PPwqj6jimZdKGjHYLSw kw+G+7NoPBwSLcsFlf1uK+pIlRtjDuqiC+VsigwQ+OXa4vzV7PBOHJDyNhcS3xlvjygZ tDYd6NYelop2yC4xzZN4AMuBJe8Wlyiz6mofJtlrn+fgd6mfSq81piOvTmP4/678yWA0 nhIE9Gncszzb0Prkw/MGptgcgLiljpBaB1pgl01zHFJtCJ75jjIcp8Zf6De5EpP0U44y 1A8xfzqgyTgR3Sm8HTwHudfv1nLheZjz3bMLW2gbfLtJBC5aEOuFoPwptPy9KN8bsYhH IMFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3EDUvcMxGctz9o0mdMeGnQA6WeeW4tI5iBa9oyPTq70=; b=QIYfTCfvxwjQZKniFy+Zpy43Ou6fK7Fj6VfpBBgX28Dw0z+hV3FyxnyfDTccyzDDLP qSIQj3x2+hykRjRShreO7P9+UFLpiLN7JoNhb4hhjbaECTUG9wKdxesulwQevW5N3SQA DLWOthBCcg8ChHps7reyUr6ssn3RKJNvdkKpQ5Jk1QWj42RgpJJUfTd8bJyLrROwQx+D k2+/Y1ITf/AUIVh3F3SqlskD5f5k1ENUHgDMGm9VlpMpM51Dv0/cb80epuDAXIO917WD rwSW2U+GPNTSLh4MD56c+ZlA+xraFDvc3NZ3hI7mX+54ILNZUlB5T8Eztqc8gBz7vFZu FLAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iUt8UUy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si5586187ejx.555.2020.07.27.07.26.08; Mon, 27 Jul 2020 07:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iUt8UUy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731960AbgG0OWr (ORCPT + 99 others); Mon, 27 Jul 2020 10:22:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:51772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731950AbgG0OWq (ORCPT ); Mon, 27 Jul 2020 10:22:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CDCFC2070B; Mon, 27 Jul 2020 14:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859765; bh=XWAO2rDwOr0pL/+FcfDAObp3HO8jmPTq0soq/G32Nt0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iUt8UUy0w0d9E5WbYmnnTsLbggO52DlwhAOoO7ZTWLM857Q5Zeq69IyTk9jTMeojJ 6eAbWQWvoSsz01VtZCPtGdgu/f0Im2ULBBAHJzwlEHR19fOXbdflep68FPXeVvIPOU FmdLbUX7BfXl2CnquQwC2rK3U5ICitGkCay9zb4k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefano Garzarella , Andrew Morton , Jan Kiszka , Kieran Bingham , Linus Torvalds , Sasha Levin Subject: [PATCH 5.7 097/179] scripts/gdb: fix lx-symbols gdb.error while loading modules Date: Mon, 27 Jul 2020 16:04:32 +0200 Message-Id: <20200727134937.382845323@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefano Garzarella [ Upstream commit 7359608a271ce81803de148befefd309baf88c76 ] Commit ed66f991bb19 ("module: Refactor section attr into bin attribute") removed the 'name' field from 'struct module_sect_attr' triggering the following error when invoking lx-symbols: (gdb) lx-symbols loading vmlinux scanning for modules in linux/build loading @0xffffffffc014f000: linux/build/drivers/net/tun.ko Python Exception There is no member named name.: Error occurred in Python: There is no member named name. This patch fixes the issue taking the module name from the 'struct attribute'. Fixes: ed66f991bb19 ("module: Refactor section attr into bin attribute") Signed-off-by: Stefano Garzarella Signed-off-by: Andrew Morton Reviewed-by: Jan Kiszka Reviewed-by: Kieran Bingham Link: http://lkml.kernel.org/r/20200722102239.313231-1-sgarzare@redhat.com Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- scripts/gdb/linux/symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py index be984aa29b759..1be9763cf8bb2 100644 --- a/scripts/gdb/linux/symbols.py +++ b/scripts/gdb/linux/symbols.py @@ -96,7 +96,7 @@ lx-symbols command.""" return "" attrs = sect_attrs['attrs'] section_name_to_address = { - attrs[n]['name'].string(): attrs[n]['address'] + attrs[n]['battr']['attr']['name'].string(): attrs[n]['address'] for n in range(int(sect_attrs['nsections']))} args = [] for section_name in [".data", ".data..read_mostly", ".rodata", ".bss", -- 2.25.1