Xen-Devel Archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes
@ 2023-04-05 13:56 Juergen Gross
  2023-04-05 13:56 ` [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section Juergen Gross
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Juergen Gross @ 2023-04-05 13:56 UTC (permalink / raw
  To: xen-devel
  Cc: Juergen Gross, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu

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(-)

-- 
2.35.3



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section
  2023-04-05 13:56 [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes Juergen Gross
@ 2023-04-05 13:56 ` Juergen Gross
  2023-04-18  5:16   ` Dietmar Hahn (Fujitsu)
  2023-04-05 13:56 ` [PATCH v3 2/2] xen: update CONFIG_DEBUG_INFO help text Juergen Gross
  2023-04-18  6:14 ` [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes Jan Beulich
  2 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2023-04-05 13:56 UTC (permalink / raw
  To: xen-devel
  Cc: Juergen Gross, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu

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.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
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(-)

diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index fad3050d4f..279dbe8274 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -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
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] xen: update CONFIG_DEBUG_INFO help text
  2023-04-05 13:56 [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes Juergen Gross
  2023-04-05 13:56 ` [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section Juergen Gross
@ 2023-04-05 13:56 ` Juergen Gross
  2023-04-18  6:14 ` [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes Jan Beulich
  2 siblings, 0 replies; 5+ messages in thread
From: Juergen Gross @ 2023-04-05 13:56 UTC (permalink / raw
  To: xen-devel
  Cc: Juergen Gross, Andrew Cooper, George Dunlap, Jan Beulich,
	Julien Grall, Stefano Stabellini, Wei Liu

Update the help text of the CONFIG_DEBUG_INFO option to be a little
bit more specific.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
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(-)

diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
index 279dbe8274..94e818ee09 100644
--- a/xen/Kconfig.debug
+++ b/xen/Kconfig.debug
@@ -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
-- 
2.35.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section
  2023-04-05 13:56 ` [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section Juergen Gross
@ 2023-04-18  5:16   ` Dietmar Hahn (Fujitsu)
  0 siblings, 0 replies; 5+ messages in thread
From: Dietmar Hahn (Fujitsu) @ 2023-04-18  5:16 UTC (permalink / raw
  To: Juergen Gross, xen-devel@lists.xenproject.org
  Cc: Andrew Cooper, George Dunlap, Jan Beulich, Julien Grall,
	Stefano Stabellini, Wei Liu

Hi Juergen,

> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Juergen Gross
> Sent: Wednesday, April 5, 2023 3:56 PM
> To: xen-devel@lists.xenproject.org
> Cc: Juergen Gross <jgross@suse.com>; Andrew Cooper <andrew.cooper3@citrix.com>; George Dunlap <george.dunlap@citrix.com>; Jan
> Beulich <jbeulich@suse.com>; Julien Grall <julien@xen.org>; Stefano Stabellini <sstabellini@kernel.org>; Wei Liu <wl@xen.org>
> Subject: [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.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> 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(-)
> 
> diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
> index fad3050d4f..279dbe8274 100644
> --- a/xen/Kconfig.debug
> +++ b/xen/Kconfig.debug
> @@ -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
> --
> 2.35.3
> 

For the non-efi xen:

Tested-by: Dietmar Hahn <dietmar.hahn@fujitsu.com>

Dietmar.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes
  2023-04-05 13:56 [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes Juergen Gross
  2023-04-05 13:56 ` [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section Juergen Gross
  2023-04-05 13:56 ` [PATCH v3 2/2] xen: update CONFIG_DEBUG_INFO help text Juergen Gross
@ 2023-04-18  6:14 ` Jan Beulich
  2 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2023-04-18  6:14 UTC (permalink / raw
  To: Juergen Gross
  Cc: Andrew Cooper, George Dunlap, Julien Grall, Stefano Stabellini,
	Wei Liu, xen-devel

On 05.04.2023 15:56, Juergen Gross wrote:
> 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(-)

Seeing no-one else showing any interest either way:
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-18  6:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-05 13:56 [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes Juergen Gross
2023-04-05 13:56 ` [PATCH v3 1/2] xen: move CONFIG_DEBUG_INFO out of EXPERT section Juergen Gross
2023-04-18  5:16   ` Dietmar Hahn (Fujitsu)
2023-04-05 13:56 ` [PATCH v3 2/2] xen: update CONFIG_DEBUG_INFO help text Juergen Gross
2023-04-18  6:14 ` [PATCH v3 0/2] xen: some CONFIG_DEBUG_INFO changes Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).