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: <4D8A5BE0.30802@gmail.com>
Date:	Wed, 23 Mar 2011 23:45:20 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	Don Zickus <dzickus@...hat.com>
CC:	Jack Steiner <steiner@....com>, Ingo Molnar <mingo@...e.hu>,
	tglx@...utronix.de, hpa@...or.com, x86@...nel.org,
	linux-kernel@...r.kernel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Robert Richter <robert.richter@....com>
Subject: Re: [PATCH] x86, UV: Fix NMI handler for UV platforms

On 03/23/2011 11:00 PM, Don Zickus wrote:
> On Wed, Mar 23, 2011 at 01:53:20PM -0400, Don Zickus wrote:
>> Let me know if the patch fixes that problem.  Then it will be one less
>> thing to worry about. :-)
> 
> Ok, I was an idiot and made the patch against RHEL-6.  Here is the one
> against 2.6.38.  Sorry about that.
> 
> Cheers,
> Don
> 
> 
> diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> index 87eab4a..62ec8e9 100644
> --- a/arch/x86/kernel/cpu/perf_event.c
> +++ b/arch/x86/kernel/cpu/perf_event.c
> @@ -1375,7 +1375,7 @@ perf_event_nmi_handler(struct notifier_block *self,
>  	if ((handled > 1) ||
>  		/* the next nmi could be a back-to-back nmi */
>  	    ((__this_cpu_read(pmu_nmi.marked) == this_nmi) &&
> -	     (__this_cpu_read(pmu_nmi.handled) > 1))) {
> +	     (__this_cpu_read(pmu_nmi.handled) > 0) && handled && this_nmi)) {

Don, why do you need to check for this_nmi here? it's zero for first nmi in a
system (right?), so I fail to get the reason for such check. What I miss?

>  		/*
>  		 * We could have two subsequent back-to-back nmis: The
>  		 * first handles more than one counter, the 2nd
> @@ -1386,6 +1386,8 @@ perf_event_nmi_handler(struct notifier_block *self,
>  		 * handling more than one counter. We will mark the
>  		 * next (3rd) and then drop it if unhandled.
>  		 */
> +		//if ((__this_cpu_read(pmu_nmi.handled) == 1) && (handled == 1))
> +		//	trace_printk("!! fixed?\n");
>  		__this_cpu_write(pmu_nmi.marked, this_nmi + 1);
>  		__this_cpu_write(pmu_nmi.handled, handled);
>  	}


-- 
    Cyrill
--
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