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]
Message-ID: <20081022111154.GD18951@hmsreliant.think-freely.org>
Date:	Wed, 22 Oct 2008 07:11:54 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Alexander van Heukelum <heukelum@...tmail.fm>
Cc:	Ingo Molnar <mingo@...e.hu>, kexec@...ts.infradead.org,
	linux-kernel@...r.kernel.org, vgoyal@...hat.com, hbabu@...ibm.com,
	hpa@...or.com, akpm@...ux-foundation.org, ebiederm@...ssion.com,
	tglx@...utronix.de
Subject: Re: [PATCH 3/7] x86_64, dumpstack: move kexec_crash from __die to
	oops_end

On Wed, Oct 22, 2008 at 12:00:10PM +0200, Alexander van Heukelum wrote:
> oops_end is preceded by either a call to __die, or a conditional
> call to crash_kexec. Move the conditional call to crash_kexec
> from the end of __die to the start of oops_end and remove
> the superfluous call to crash_kexec in die_nmi.
> 
> Signed-off-by: Alexander van Heukelum <heukelum@...tmail.fm>

Acked-by: Neil Horman <nhorman@...driver.com>

> ---
>  arch/x86/kernel/dumpstack_64.c |    9 ++++-----
>  1 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
> index ffefea6..57ce11b 100644
> --- a/arch/x86/kernel/dumpstack_64.c
> +++ b/arch/x86/kernel/dumpstack_64.c
> @@ -458,6 +458,9 @@ unsigned __kprobes long oops_begin(void)
>  
>  void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr)
>  {
> +	if (regs && kexec_should_crash(current))
> +		crash_kexec(regs);
> +
>  	die_owner = -1;
>  	bust_spinlocks(0);
>  	die_nest_count--;
> @@ -501,8 +504,6 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
>  	printk(KERN_ALERT "RIP ");
>  	printk_address(regs->ip, 1);
>  	printk(" RSP <%016lx>\n", regs->sp);
> -	if (kexec_should_crash(current))
> -		crash_kexec(regs);
>  	return 0;
>  }
>  
> @@ -536,11 +537,9 @@ die_nmi(char *str, struct pt_regs *regs, int do_panic)
>  	printk(" on CPU%d, ip %08lx, registers:\n",
>  		smp_processor_id(), regs->ip);
>  	show_registers(regs);
> -	if (kexec_should_crash(current))
> -		crash_kexec(regs);
> +	oops_end(flags, regs, 0);
>  	if (do_panic || panic_on_oops)
>  		panic("Non maskable interrupt");
> -	oops_end(flags, regs, 0);
>  	nmi_exit();
>  	local_irq_enable();
>  	do_exit(SIGBUS);
> -- 
> 1.5.4.3
> 
> 

-- 
/****************************************************
 * Neil Horman <nhorman@...driver.com>
 * Software Engineer, Red Hat
 ****************************************************/
--
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