From nobody Sat Sep 21 23:34:48 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3905C43334 for ; Fri, 10 Jun 2022 07:15:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346603AbiFJHPQ (ORCPT ); Fri, 10 Jun 2022 03:15:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244941AbiFJHPL (ORCPT ); Fri, 10 Jun 2022 03:15:11 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1192194BDE for ; Fri, 10 Jun 2022 00:15:09 -0700 (PDT) X-UUID: c7881e8812cf4e198c58810b993b162f-20220610 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:2713b238-328a-4f95-b3a8-ba94f5fe33ea,OB:0,LO B:0,IP:0,URL:5,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACT ION:release,TS:0 X-CID-META: VersionHash:2a19b09,CLOUDID:6c035fe5-2ba2-4dc1-b6c5-11feb6c769e0,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:0,BEC:nil X-UUID: c7881e8812cf4e198c58810b993b162f-20220610 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 556457494; Fri, 10 Jun 2022 15:15:05 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Fri, 10 Jun 2022 15:15:04 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 10 Jun 2022 15:15:04 +0800 From: Kuan-Ying Lee To: Jan Kiszka , Kieran Bingham , Matthias Brugger , Masahiro Yamada , Andrew Morton CC: , , , , Kuan-Ying Lee , , , Subject: [PATCH] scripts/gdb: change kernel config dumping method Date: Fri, 10 Jun 2022 15:14:57 +0800 Message-ID: <20220610071500.9656-1-Kuan-Ying.Lee@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" MAGIC_START("IKCFG_ST") and MAGIC_END("IKCFG_ED") are moved out from the kernel_config_data variable [1]. Thus, we parse kernel_config_data directly instead of considering offset of MAGIC_START and MAGIC_END. [1] https://lore.kernel.org/lkml/1550108893-21226-1-git-send-email-yamada.m= asahiro@socionext.com/ Fixes: 13610aa908dc ("kernel/configs: use .incbin directive to embed config= _data.gz") Signed-off-by: Kuan-Ying Lee --- scripts/gdb/linux/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/gdb/linux/config.py b/scripts/gdb/linux/config.py index 90e1565b1967..8843ab3cbadd 100644 --- a/scripts/gdb/linux/config.py +++ b/scripts/gdb/linux/config.py @@ -24,9 +24,9 @@ class LxConfigDump(gdb.Command): filename =3D arg =20 try: - py_config_ptr =3D gdb.parse_and_eval("kernel_config_data + 8") - py_config_size =3D gdb.parse_and_eval( - "sizeof(kernel_config_data) - 1 - 8 * 2") + py_config_ptr =3D gdb.parse_and_eval("&kernel_config_data") + py_config_ptr_end =3D gdb.parse_and_eval("&kernel_config_data_= end") + py_config_size =3D py_config_ptr_end - py_config_ptr except gdb.error as e: raise gdb.GdbError("Can't find config, enable CONFIG_IKCONFIG?= ") =20 --=20 2.18.0