提交 07c5c007 编写于 作者: K Kuan-Ying Lee 提交者: Zheng Zengkai

scripts/gdb: change kernel config dumping method

stable inclusion
from stable-v5.10.122
commit 13639c970fdb18ebfd621df71861a9d8b8491d53
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5W6OE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=13639c970fdb18ebfd621df71861a9d8b8491d53

--------------------------------

[ Upstream commit 1f7a6cf6 ]

MAGIC_START("IKCFG_ST") and MAGIC_END("IKCFG_ED") are moved out
from the kernel_config_data variable.

Thus, we parse kernel_config_data directly instead of considering
offset of MAGIC_START and MAGIC_END.

Fixes: 13610aa9 ("kernel/configs: use .incbin directive to embed config_data.gz")
Signed-off-by: NKuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 5aecaabb
...@@ -24,9 +24,9 @@ class LxConfigDump(gdb.Command): ...@@ -24,9 +24,9 @@ class LxConfigDump(gdb.Command):
filename = arg filename = arg
try: try:
py_config_ptr = gdb.parse_and_eval("kernel_config_data + 8") py_config_ptr = gdb.parse_and_eval("&kernel_config_data")
py_config_size = gdb.parse_and_eval( py_config_ptr_end = gdb.parse_and_eval("&kernel_config_data_end")
"sizeof(kernel_config_data) - 1 - 8 * 2") py_config_size = py_config_ptr_end - py_config_ptr
except gdb.error as e: except gdb.error as e:
raise gdb.GdbError("Can't find config, enable CONFIG_IKCONFIG?") raise gdb.GdbError("Can't find config, enable CONFIG_IKCONFIG?")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册