On 13/11/2019 16:22, Juergen Gross wrote:
> Debugger support in the hypervisor is rarely used and it is opening a
> way for dom0 to modify the running hypervisor by very easy means.
>
> Add a Kconfig option to control support of gdbsx. Default is off.
>
> Signed-off-by: Juergen Gross <jgr...@suse.com>
> ---
>  xen/Kconfig.debug              |  4 ++++
>  xen/arch/x86/Kconfig           |  1 -
>  xen/arch/x86/domctl.c          |  4 ++++
>  xen/common/Kconfig             |  3 ---
>  xen/common/domain.c            |  2 +-
>  xen/include/asm-x86/debugger.h | 30 ++++++++++++++++++------------
>  xen/include/xen/sched.h        |  4 ++++
>  7 files changed, 31 insertions(+), 17 deletions(-)
>
> diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug
> index 22573e74db..84a6e1b8eb 100644
> --- a/xen/Kconfig.debug
> +++ b/xen/Kconfig.debug
> @@ -13,9 +13,13 @@ config DEBUG
>  
>  if DEBUG || EXPERT = "y"
>  
> +config GDBSX
> +     bool
> +
>  config CRASH_DEBUG
>       bool "Crash Debugging Support"
>       depends on X86
> +     select GDBSX
>       ---help---
>         If you want to attach gdb to Xen to debug Xen if it crashes
>         then say Y.

CRASH_DEBUG and GDBSX are unrelated.

The former is gdbstub over serial for Xen itself (which I've never seen
used, and therefore doubt functions), while the latter is a set of dom0
hypercalls used by the gdbsx utility.

I'm happy to make CONFIG_GDBSX more useful than it currently is, but I
don't think the two options want conflating.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to