Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4888843pjb; Mon, 27 Jul 2020 07:40:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOBhzE5/ecCTFlCyJ4RQGfD9Abo+Uv1Usvb9W/qfZVi7ZbhW4kl07Iu5dJs2lTaVhvNPeb X-Received: by 2002:a17:906:8542:: with SMTP id h2mr21100404ejy.517.1595860801405; Mon, 27 Jul 2020 07:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860801; cv=none; d=google.com; s=arc-20160816; b=KTWOfw+aQ9vrB391g6txOKc1K12g23EZ9DCamD8HO+c39FovW8mYMUMydbI3uzB020 2/Q8CrzavaF4gvYAd1Bh5PurLA3ROxr+3z/WKCKmNhq06hnK0b/0aqYo1508CYzqCmb4 /32L4WVG0pEhnw8giEFFxblj5bDJtfcQFUTWEi+1QVZLjtlrpCTDFsoCDxFV5+9tn8Yv yTBSHz37YmSZoi5pqm9bS21OAJWSZN9nYe6xvl2Spl91pziwyTyqO/qi5SvCkvCDi3DE inPVSU06hOSFU/RMfXvlvzG/nSRHv9suAfvIQA6205mMPw6lFxkVUyCd2zu36Mrc/UZP qEYg== 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=8GUOBrSAqB5PyWSOSX1kzRzMl54BlKSwEhX0kuScGsU=; b=BoPdFB5DuJO4C9MN2uDBzjqzZ7Dwsau4d2bkvjqh2rtVYuHwrK1hyKL//Ib1awrXGC ca6hpew1k9YNEKCe2+/3NLrEOEPG1AsZh1hUmr49+cpiI3mZABRWYlUc+sYmkBWOTgbC STrL2LQDkJYxMRnZgll139LJLlM4VYZXNv7C1K/mN4ME1IN1FKiPQCKyr1b4/DjO3dU8 1x2B0L0vN4X+m0pev7MMmR2pI+QOtVU5IFj4y7yaEq9WHSD0C0gn8AWfCUtZYUh2f/jJ EV0CKPwK3JmljMeNDOEhoJlQ/aUxlC8k5Q/s18Zikv7mh0f8fDtbLr+e34XAVYpNqqhS 6g8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kv99Toye; 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 ck29si5196689edb.236.2020.07.27.07.39.39; Mon, 27 Jul 2020 07:40:01 -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=kv99Toye; 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 S1729875AbgG0OKg (ORCPT + 99 others); Mon, 27 Jul 2020 10:10:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:33566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729866AbgG0OKf (ORCPT ); Mon, 27 Jul 2020 10:10:35 -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 4DBD322B45; Mon, 27 Jul 2020 14:10:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859034; bh=XHA81FS07KlpOQaz+1Q2JY0Vb4pS95BjEb+hC8iEUVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kv99ToyeAqoAy0ze1PM7nrpp7T1S8D2TUxbYfeoS5t0VI+SURhBrYCyZQCstXTzzj RvB2GOf+cDQjSipylkNC4ji5kZg1a7rfivGkDuZIKCTuckI7EOaLPigLZI3mDzgho7 LQoPQObE6qjgGeQdqaLVDyXPkZ+T+pdKFLKpsBsM= 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 4.19 42/86] scripts/gdb: fix lx-symbols gdb.error while loading modules Date: Mon, 27 Jul 2020 16:04:16 +0200 Message-Id: <20200727134916.556617777@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134914.312934924@linuxfoundation.org> References: <20200727134914.312934924@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 4644f1a83b578..aa4f87e3ddb12 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