lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Oct 2015 15:26:45 +0000
From:	Luis Henriques <luis.henriques@...onical.com>
To:	Jiri Slaby <jslaby@...e.cz>
Cc:	stable@...r.kernel.org, linux-kernel@...r.kernel.org,
	Vitaly Kuznetsov <vkuznets@...hat.com>,
	David Vrabel <david.vrabel@...rix.com>
Subject: Re: [PATCH 3.12 032/123] x86/xen: Support kexec/kdump in HVM guests
 by doing a soft reset

On Wed, Oct 28, 2015 at 02:50:49PM +0100, Jiri Slaby wrote:
...
>  #include <linux/memblock.h>
>  #include <linux/edd.h>
>  
> +#ifdef CONFIG_KEXEC_CORE

As already suggested by David Vrabel, this should be CONFIG_KEXEC for
kernels <= 4.2, and not CONFIG_KEXEC_CORE.

Cheers,
--
Luís


> +#include <linux/kexec.h>
> +#endif
> +
>  #include <xen/xen.h>
>  #include <xen/events.h>
>  #include <xen/interface/xen.h>
> @@ -1746,6 +1750,21 @@ static struct notifier_block xen_hvm_cpu_notifier = {
>  	.notifier_call	= xen_hvm_cpu_notify,
>  };
>  
> +#ifdef CONFIG_KEXEC_CORE
> +static void xen_hvm_shutdown(void)
> +{
> +	native_machine_shutdown();
> +	if (kexec_in_progress)
> +		xen_reboot(SHUTDOWN_soft_reset);
> +}
> +
> +static void xen_hvm_crash_shutdown(struct pt_regs *regs)
> +{
> +	native_machine_crash_shutdown(regs);
> +	xen_reboot(SHUTDOWN_soft_reset);
> +}
> +#endif
> +
>  static void __init xen_hvm_guest_init(void)
>  {
>  	init_hvm_pv_info();
> @@ -1762,6 +1781,10 @@ static void __init xen_hvm_guest_init(void)
>  	x86_init.irqs.intr_init = xen_init_IRQ;
>  	xen_hvm_init_time_ops();
>  	xen_hvm_init_mmu_ops();
> +#ifdef CONFIG_KEXEC_CORE
> +	machine_ops.shutdown = xen_hvm_shutdown;
> +	machine_ops.crash_shutdown = xen_hvm_crash_shutdown;
> +#endif
>  }
>  
>  static uint32_t __init xen_hvm_platform(void)
> diff --git a/include/xen/interface/sched.h b/include/xen/interface/sched.h
> index 9ce083960a25..f18490985fc8 100644
> --- a/include/xen/interface/sched.h
> +++ b/include/xen/interface/sched.h
> @@ -107,5 +107,13 @@ struct sched_watchdog {
>  #define SHUTDOWN_suspend    2  /* Clean up, save suspend info, kill.         */
>  #define SHUTDOWN_crash      3  /* Tell controller we've crashed.             */
>  #define SHUTDOWN_watchdog   4  /* Restart because watchdog time expired.     */
> +/*
> + * Domain asked to perform 'soft reset' for it. The expected behavior is to
> + * reset internal Xen state for the domain returning it to the point where it
> + * was created but leaving the domain's memory contents and vCPU contexts
> + * intact. This will allow the domain to start over and set up all Xen specific
> + * interfaces again.
> + */
> +#define SHUTDOWN_soft_reset 5
>  
>  #endif /* __XEN_PUBLIC_SCHED_H__ */
> -- 
> 2.6.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ