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, 29 Jul 2020 18:24:26 +1000
From:   Alexey Kardashevskiy <aik@...abs.ru>
To:     linux-kernel@...r.kernel.org
Cc:     Nicholas Piggin <npiggin@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH kernel] panic: Dump registers on panic_on_warn

Ping?


On 30/06/2020 19:38, Alexey Kardashevskiy wrote:
> Currently we print stack and registers for ordinary warnings but
> we do not for panic_on_warn which looks as oversight - panic()
> will reboot the machine but won't print registers.
> 
> This moves printing of registers and modules earlier.
> 
> This does not move the stack dumping as panic() dumps it.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@...abs.ru>
> ---
>  kernel/panic.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/kernel/panic.c b/kernel/panic.c
> index e2157ca387c8..798eff8156f3 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -589,6 +589,11 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
>  	if (args)
>  		vprintk(args->fmt, args->args);
>  
> +	print_modules();
> +
> +	if (regs)
> +		show_regs(regs);
> +
>  	if (panic_on_warn) {
>  		/*
>  		 * This thread may hit another WARN() in the panic path.
> @@ -600,12 +605,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
>  		panic("panic_on_warn set ...\n");
>  	}
>  
> -	print_modules();
> -
> -	if (regs)
> -		show_regs(regs);
> -	else
> -		dump_stack();
> +	dump_stack();
>  
>  	print_irqtrace_events(current);
>  
> 

-- 
Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ