xen: some CONFIG_DEBUG_INFO changes
v3 cover xen: some CONFIG_DEBUG_INFO changes
Enabling crash dump analysis of the hypervisor requires the hypervisor having been built with CONFIG_DEBUG_INFO enabled. Today this requires either CONFIG_DEBUG or CONFIG_EXPERT set, which are both not security supported.
This small series changes that in order to allow security supported Xen builds with the capability to do crash dump analysis via the "crash" tool.
Note that due to problems with test machines proper support for EFI booted systems hasn't been verified, so this will likely need some more work.
Changes in V2:
- comments addressed
Changes in V3:
- comments addressed
Juergen Gross (2):
xen: move CONFIG_DEBUG_INFO out of EXPERT section
xen: update CONFIG_DEBUG_INFO help text
xen/Kconfig.debug | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
Signature · 1 line
2.35.3
PATCH v3 1/2 xen: move CONFIG_DEBUG_INFO out of EXPERT section
In order to support hypervisor analysis of crash dumps, xen-syms needs to contain debug_info. It should be allowed to configure the hypervisor to be built with CONFIG_DEBUG_INFO in non-debug builds without having to enable EXPERT.
Using a rather oldish gcc (7.5) it was verified that code generation doesn't really differ between CONFIG_DEBUG_INFO on or off without CONFIG_DEBUG being set (only observed differences were slightly different symbol addresses, verified via "objdump -d", resulting from the different config.gz in the binary). The old gcc version selection was based on the assumption, that newer gcc won't regress in this regard.
So move CONFIG_DEBUG_INFO out of the section guarded by EXPERT.
It should be mentioned that there have been reports that the linking of the xen.efi might take considerably longer with CONFIG_DEBUG_INFO selected when using newer binutils.
---
V2:
- expanded commit message (Jan Beulich)
V3:
- move DEBUG_INFO block to the end of the file (Jan Beulich)
--- xen/Kconfig.debug | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
xen/Kconfig.debug +7 -7
@@ -28,13 +28,6 @@ config GDBSX If you want to enable support for debugging guests from dom0 via gdbsx then say Y. -config DEBUG_INFO - bool "Compile Xen with debug info" - default y - ---help--- - If you say Y here the resulting Xen will include debugging info - resulting in a larger binary image. - config FRAME_POINTER bool "Compile Xen with frame pointers" default DEBUG
@@ -132,4 +125,11 @@ source "arch/$(SRCARCH)/Kconfig.debug" endif # DEBUG || EXPERT +config DEBUG_INFO + bool "Compile Xen with debug info" + default DEBUG + help + If you say Y here the resulting Xen will include debugging info + resulting in a larger binary image. + endmenu
Signature · 1 line
2.35.3
RE: [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section
Hi Juergen,
Quoted 67 lines
From: Xen-devel <[email protected]> On Behalf Of Juergen Gross
Sent: Wednesday, April 5, 2023 3:56 PM
To: [email protected]
Cc: Juergen Gross <[email protected]>; Andrew Cooper <[email protected]>; George Dunlap <[email protected]>; Jan Beulich <[email protected]>; Julien Grall <[email protected]>; Stefano Stabellini <[email protected]>; Wei Liu <[email protected]>
Subject: [PATCH v3 1/2] xen: moveCONFIG_DEBUG_INFOout of EXPERT sectionIn order to support hypervisor analysis of crash dumps, xen-syms needs to contain
debug_info. It should be allowed to configure the hypervisor to be built withCONFIG_DEBUG_INFOin non-debug builds without having to enable EXPERT.Using a rather oldish gcc (7.5) it was verified that code generation doesn't really differ between
CONFIG_DEBUG_INFOon or off withoutCONFIG_DEBUGbeing set (only observed differences were slightly different symbol addresses, verified via "objdump -d", resulting from the different config.gz in the binary). The old gcc version selection was based on the assumption, that newer gcc won't regress in this regard.So move
CONFIG_DEBUG_INFOout of the section guarded by EXPERT.It should be mentioned that there have been reports that the linking of the xen.efi might take considerably longer with
CONFIG_DEBUG_INFOselected when using newer binutils.Signed-off-by Juergen Gross <[email protected]>---
V2:
- expanded commit message (Jan Beulich)
V3:
- moveDEBUG_INFOblock to the end of the file (Jan Beulich)--- xen/Kconfig.debug | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)xen/Kconfig.debug +7
-8@@ -28,13 +28,6 @@ config GDBSX If you want to enable support for debugging guests from dom0 via gdbsx then say Y. -config DEBUG_INFO - bool "Compile Xen with debug info" - default y - ---help--- - If you say Y here the resulting Xen will include debugging info - resulting in a larger binary image. - config FRAME_POINTER bool "Compile Xen with frame pointers" default DEBUG@@ -132,4 +125,11 @@ source "arch/$(SRCARCH)/Kconfig.debug" endif # DEBUG || EXPERT +config DEBUG_INFO + bool "Compile Xen with debug info" + default DEBUG + help + If you say Y here the resulting Xen will include debugging info + resulting in a larger binary image. + endmenu --
Quoted 2 lines
2.35.3
For the non-efi xen:
Dietmar.
PATCH v3 2/2 xen: update CONFIG_DEBUG_INFO help text
In reply to Juergen GrossUpdate the help text of the CONFIG_DEBUG_INFO option to be a little bit more specific.
---
V2:
- expand help text, especially mentioning INSTALL_EFI_STRIP (Jan Beulich)
V3:
- expand help text even more (Jan Beulich)
--- xen/Kconfig.debug | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
xen/Kconfig.debug +10 -2
@@ -129,7 +129,15 @@ config DEBUG_INFO bool "Compile Xen with debug info" default DEBUG help - If you say Y here the resulting Xen will include debugging info - resulting in a larger binary image. + Say Y here if you want to build Xen with debug information. This + information is needed e.g. for doing crash dump analysis of the + hypervisor via the "crash" tool. + Saying Y will increase the size of the xen-syms and xen.efi + binaries. In case the space on the EFI boot partition is rather + limited, you may want to install a stripped variant of xen.efi in + the EFI boot partition (look for "INSTALL_EFI_STRIP" in + docs/misc/efi.pandoc for more information - when not using + "make install-xen" for installing xen.efi, stripping needs to be + done outside the Xen build environment). endmenu
Signature · 1 line
2.35.3
Quoted 19 lines · Juergen Gross
Enabling crash dump analysis of the hypervisor requires the hypervisor having been built with
CONFIG_DEBUG_INFOenabled. Today this requires eitherCONFIG_DEBUGorCONFIG_EXPERTset, which are both not security supported.This small series changes that in order to allow security supported Xen builds with the capability to do crash dump analysis via the "crash" tool.
Note that due to problems with test machines proper support for EFI booted systems hasn't been verified, so this will likely need some more work.
Changes in V2:
- comments addressedChanges in V3:
- comments addressed
Quoted 6 lines
Juergen Gross (2):
xen: moveCONFIG_DEBUG_INFOout of EXPERT section
xen: updateCONFIG_DEBUG_INFOhelp textxen/Kconfig.debug | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
Seeing no-one else showing any interest either way:
Jan