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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 14 Feb 2020 15:09:25 +0100
From:   "Bouvier, Benjamin (Nokia - FR/Lannion)" <benjamin.bouvier@...ia.com>
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de
Cc:     hpa@...or.com, x86@...nel.org, linux-kernel@...r.kernel.org,
        Patrick Lelu <patrick.lelu@...ia.com>
Subject: Re: [PATCH] x86/reboot: Enable restart_handler mechanism

Hi,

Gentle reminder.

Thanks.
Benjamin

On 17/01/2020 14:45, Benjamin Bouvier wrote:
> Drivers may want to register restart_handlers for case where an external
> reset is needed to reset a complete system and not only the processor.
> This case is currently missing in x86 architecture.
> So include call to do_kernel_restart() to use handlers registered
> through register_restart_handler() API when the processor restarts.
> 
> do_kernel_restart() cannot be called in machine_restart() as required by
> documentation as final step, because it will never be reached (restart
> having already been carried out). So call is done inside
> native_machine_restart(), and only here to not let drivers managed reset
> in hypervisor case where function native_machine_restart() is overridden.
> 
> Co-developed-by: Patrick Lelu <patrick.lelu@...ia.com>
> Signed-off-by: Patrick Lelu <patrick.lelu@...ia.com>
> Signed-off-by: Benjamin Bouvier <benjamin.bouvier@...ia.com>
> ---
>  arch/x86/kernel/reboot.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
> index 0cc7c0b106bb..53c3d5a3f89d 100644
> --- a/arch/x86/kernel/reboot.c
> +++ b/arch/x86/kernel/reboot.c
> @@ -718,12 +718,13 @@ static void __machine_emergency_restart(int emergency)
>  	machine_ops.emergency_restart();
>  }
>  
> -static void native_machine_restart(char *__unused)
> +static void native_machine_restart(char *cmd)
>  {
>  	pr_notice("machine restart\n");
>  
>  	if (!reboot_force)
>  		machine_shutdown();
> +	do_kernel_restart(cmd);
>  	__machine_emergency_restart(0);
>  }
>  
> 

Powered by blists - more mailing lists