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:	Thu, 31 May 2012 15:26:33 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Dave Jones <davej@...hat.com>, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 3/5] x86: Reset the debug_stack update counter

On Thu, 2012-05-31 at 12:19 -0700, H. Peter Anvin wrote:
> On 05/30/2012 06:28 PM, Steven Rostedt wrote:
> >> 
> > diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index
> > 9087527..c1fffc5 100644 --- a/arch/x86/kernel/nmi.c +++
> > b/arch/x86/kernel/nmi.c @@ -450,8 +450,10 @@ static inline void
> > nmi_nesting_preprocess(struct pt_regs *regs)
> > 
> > static inline void nmi_nesting_postprocess(void) { -	if
> > (unlikely(__get_cpu_var(update_debug_stack))) +	if
> > (unlikely(__get_cpu_var(update_debug_stack))) { 
> > debug_stack_reset(); +		__get_cpu_var(update_debug_stack) = 0; +	} 
> > } #endif
> > 
> 
> Please don't use __get_cpu_var(); it causes a pointer to be manifest,
> which is free or almost free on most architectures but quite expensive
> on x86.
> 
> Instead use this_cpu_read()/this_cpu_write().

OK, will change.

Thanks!

-- Steve


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