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:	Fri, 10 Sep 2010 14:01:31 -0700
From:	Suresh Siddha <suresh.b.siddha@...el.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Jeff Chua <jeff.chua.linux@...il.com>,
	Nico Schottelius <nico-nospam@...ottelius.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Nico Schottelius <nico-linux-20100709@...ottelius.org>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Florian Pritz <flo@...n.at>,
	"stable@...nel.org" <stable@...nel.org>,
	Ingo Molnar <mingo@...e.hu>, "Brown, Len" <lenb@...nel.org>
Subject: Re: [PATCH] x86, tsc: Fix a preemption leak in
 restore_sched_clock_state()

On Fri, 2010-09-10 at 13:32 -0700, Peter Zijlstra wrote:
> D'0h !! *facepalm*
> 
> Shame on me for not spotting that sooner.
> 
> ---
> Subject: x86, tsc: Fix a preemption leak in restore_sched_clock_state()
> 
> A real life genuine preemption leak..
> 
> Reported-by: Jeff Chua <jeff.chua.linux@...il.com>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> ---
>  arch/x86/kernel/tsc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
> index 873a321..4496315 100644
> --- a/arch/x86/kernel/tsc.c
> +++ b/arch/x86/kernel/tsc.c
> @@ -655,7 +655,7 @@ void restore_sched_clock_state(void)
>  
>  	local_irq_save(flags);
>  
> -	get_cpu_var(cyc2ns_offset) = 0;
> +	__get_cpu_var(cyc2ns_offset) = 0;
>  	offset = cyc2ns_suspend - sched_clock();
>  
>  	for_each_possible_cpu(cpu)

Acked-by: Suresh Siddha <suresh.b.siddha@...el.com>

Before heading for lunch, I was scratching my head and thinking that I
might be doing something wrong with the local_irq_disable() and
local_irq_enable() in that patch. But you got it right.

Thanks for looking at this and thanks to Jeff for reporting.

Original patch was marked as stable for 2.6.32+, so we need to make sure
that Greg picks up this piece too along with the original patch.

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